Microsoft Windows CE 3.0  

Clip Lists

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

A clip list consists of one or more RECTstructures, in pixel coordinates. DirectDraw manages clip lists by using a DirectDrawClipper object, which can be attached to any surface.

The IDirectDrawSurface5::Bltmethod copies data only to rectangles in the clip list. For instance, if the upper-right quarter of a surface was excluded by the rectangles in the clip list, and an application blitted to the entire area of the clipped surface, DirectDraw would effectively perform two blits, the first being to the upper-left corner of the surface, and the second being to the bottom half of the surface, as shown in the following diagram.

You can manage a surface's clip list manually or, for a primary surface, have it done automatically by DirectDraw.

To manage the clip list yourself, create a list of rectangles in the form of a RGNDATAstructure and pass this to the IDirectDrawClipper::SetClipListmethod.

To have DirectDraw manage the clip list for a primary surface, you attach the clipper to a window (even a full-screen window) by calling the IDirectDrawClipper::SetHWndmethod, specifying the target window's handle. This has the effect of setting the clipping region to the client area of the window and ensuring that the clip list is automatically updated as the window is resized, covered, or uncovered.

If you set a clipper using a window handle, you cannot set additional rectangles.

Clipping for overlay surfaces is supported only if the overlay hardware can support clipping and if destination color keying is not active.



 Last updated on Tuesday, May 18, 2004

© 2004 Microsoft Corporation. All rights reserved.