Some applications let you prepare output in multiple stages. For example, a word processing application might permit you to prepare your text first and then add bit maps that enhance and support the text. These applications can use GpiExcludeClipRectangle to exclude an area from a clip region, preventing the user from deleting output that already exists.

To exclude an area from a clip region, first determine the dimensions (in device coordinates) of the smallest rectangle that completely surrounds the area to exclude from the clip region. Then call GpiExcludeClipRectangle, including as input the dimensions of the area to exclude. The following figure illustrates these steps.

#include <os2.h>
void fncCLIP03(void){
    HPS   hps;
    RECTL rcl;
        .
        .  /* Set rectangle coordinates here. */
        .
    GpiExcludeClipRectangle(hps, &rcl);
} /* fncCLIP03 */


[Back] [Next]