Simulation support:

This function is simulated by a handling routine in the graphics engine.

Description

GreGetClipRects fills the buffer indicated by parclRect with a list of (X,Y) coordinate pairs specifying the rectangles, which define the DC region and intersect an optional bounding rectangle (prclRect). The DC region is the intersection of the visible region, clip region, viewing limits, graphics field, and clip path.

Clipping, when performed by the graphics engine, carries a heavy processing overhead. For simple clipping, the presentation driver gains a significant performance advantage by calling this function to enumerate the clip region, and clipping the line to each rectangle in turn.

This function can be used to determine if the banding rectangle is inside, outside, or crossing the device's clip rectangle.

Note: If COM_TRANSFORM is set, the rectangle points are returned in device coordinates. If COM_TRANSFORM is not set, the rectangle points are returned in screen coordinates.

This function can be hooked by the presentation driver.

#define INCL_GRE_CLIP
#include <os2.h>

HDC         hdc;        /*  Device context handle. */
PRECTL      prclBound;  /*  Pointer to bounding rectangle in device or screen coordinates. */
PRGNRECT    pControl;   /*  Pointer to a control structure containing additional parameters: */
PRECTL      parclRect;  /*  Pointer to array of rectangle (RECTL) structures. */
PVOID       pInstance;  /*  Pointer to instance data. */
ULONG       lFunction;  /*  High-order WORD=flags; low-order WORD=NGreGetClipRects. */
BOOL        fSuccess;   /*  Return codes. */

fSuccess = GreGetClipRects(hdc, prclBound,
             pControl, parclRect, pInstance,
             lFunction);


[Back: GreGetClipRects]
[Next: GreGetClipRects Parameter - hdc]