## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### GreCreateRectRegion - Syntax

Simulation support:

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

Description

GreCreateRectRegion creates a region by taking the OR of a series of rectangles. When no rectangles are specified (that is, cRect is 0), an empty region is created. If COM_TRANSFORM is not set, the function expects the points to be in device coordinates.

This function can be hooked by the presentation driver.

    #define INCL_GRE_REGIONS

    #include <os2.h>

    HDC      hdc;        /*  Device context handle. */

    PRECT    paRegion;   /*  Pointer to the region definition. */

    LONG     cRect;      /*  Number of rectangles in the region definition. */

    PVOID    pInstance;  /*  Pointer to instance data. */

    ULONG    lFunction;  /*  High-order WORD=flags; low-order WORD=NGreCreateRectRegion. */

    HRGN     rc;         /*  Return codes. */

    rc = GreCreateRectRegion(hdc, paRegion, cRect,

           pInstance, lFunction);