## Presentation Device Driver Reference for OS/2

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

### GreBitblt

Select an item:

    Syntax
    Parameters
    Returns
    Remarks
    Glossary

Simulation support:

None. This function is mandatory for all drivers.

Description:

GreBitBlt modifies bit-map data at a target rectangle in the current device context (DC). The modification can copy a rectangle of data from a specified source DC to the target or perform a raster operation on the target.

This function must be supported by the presentation driver. GreBitblt is called by the function GpiBitBlt and is used to modify bit-map data within a target rectangle of the current device context. However, if the destination is larger or smaller than the source, the presentation driver can pass this function to the graphics engine by using the original pointer copied from the dispatch table.

    #define INCL_GRE_BITMAPS

    #include <os2.h>

    HDC             hdc;         /*  Device context handle. */

    HDC             hdcSrc;      /*  Handle to the source DC or bit map. */

    LONG            cPoints;     /*  Number of (X,Y) pairs in paptlPoint. */

    PPOINTL         paptlPoint;  /*  Pointer to an array of (X, Y) coordinate pairs. */

    LONG            lRop;        /*  Raster operation code. */

    ULONG           flOptions;

    PBITBLTATTRS    pBattrs;     /*  Pointer to attributes. */

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

    ULONG           lFunction;

    LONG            rc;          /*  Return Codes. */

    rc = GreBitblt(hdc, hdcSrc, cPoints, paptlPoint,

           lRop, flOptions, pBattrs, pInstance,

           lFunction);