Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

DirectDraw Clipping - How do I do that

TommyTheGermanTommyTheGerman Member Posts: 1
Hi there everybody,

is there anyone who can help me? I use DirectDraw to display a stream from a survellance camera. since there are more then one camera, I am supposed to display more then one stream. This works so far. But when the windows got overlapped, all the images are displayed without having clipped out the windows that cover the "monitor". I tried to find something about it. But it's all not much use.

Thank you.

Thomas

Comments

  • HEPHEP Member Posts: 113
    : Hi there everybody,
    :
    : is there anyone who can help me? I use DirectDraw to display a stream from a survellance camera. since there are more then one camera, I am supposed to display more then one stream. This works so far. But when the windows got overlapped, all the images are displayed without having clipped out the windows that cover the "monitor". I tried to find something about it. But it's all not much use.
    :
    : Thank you.
    :
    : Thomas
    :
    You have to create a DirectDraw clipper for the window:
    [code]
    // Pointer to clipper
    LPDIRECTDRAWCLIPPER lpDDClipper = NULL;

    // Create clipper object
    if(FAILED(lpDD7->CreateClipper(NULL, &lpDDClipper,NULL)))
    {
    // error handling
    }

    // Connect clipper with window
    if(FAILED(lpDDClipper->SetHWnd(0,hWnd)))
    {
    // error handling
    }

    //Connect clipper with primary surface
    if(FAILED(lpDDSPrimary->SetClipper(lpDDClipper)))
    {
    // error handling
    }
    [/code]
Sign In or Register to comment.