## Presentation Device Driver Reference for OS/2

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

### GreGetPel - Syntax

Simulation support:

None. This function is mandatory for all drivers.

Description:

GreGetPel returns the color of a pel at a specified position.

This function must be supported by the presentation driver, and is called by GpiQueryPel. GreGetPel is used to query the value of a pel at a specified (X,Y) coordinate within the DC. This function can be handled by bit-map simulation.

    #define INCL_GRE_BITMAPS

    #include <os2.h>

    HDC        hdc;        /*  Device context handle. */

    PPOINTL    pptlPel;    /*  Pointer to the coordinate (X, Y) pair structure. */

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

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

    LONG       rc;         /*  Return Code. */

    rc = GreGetPel(hdc, pptlPel, pInstance, lFunction);