hdc (HDC) - input
pRLEHDR (PRLEHDR) - input
Pointer an RLEHDR structure:
typedef struct { LONG lType; BRECTL brectlBounds; PVOID pRLE; } RLEHDR;
GreDrawRLE always supports lType=0. In this format, the pRLE field in the RLE header points to an array of POINTL structures (see below). The brectlBounds rectangle contains the tightest rectangle that fits around the shape.
The RLE array starts with an (X,Y) pair, where Y is the Y-coordinate, and X is the number of runs on the line. The number of (X,Y) pairs follow, where X is the left side of the run and Y is the right side, exclusive. The next (X,Y) pair holds the header of the next line. The Y-coordinate must increase. If the number of points is 0, the end of the data has been reached. For example, the following array of eight POINTL structures defines two scan lines of run-length-encoded data:
(3,45), (20,25), (42,56), (100,350), (Three pairs of runs at Scan Line 45) (2,46), (19,26), (43,56), (Two pairs of runs at Scan Line 46) (0,47) (End of RLE data indicator)
The presentation driver draws lines between the following device-coordinate-space pairs, inclusive, given the data in the above example:
(20 ,45) to (24 ,45) (42 ,45) to (55 ,45) (100,45) to (349,45) (19 ,46) to (25 ,46) (43 ,46) to (55 ,46)
Notice that pels are drawn up to, but not including, the right coordinate of the run. That is, runs are filled inclusive or exclusive.
pInstance (PVOID) - input
lFunction (ULONG) - input
rc (ULONG) - returns
On completion, the handling routine must return an integer (cHits) indicating, where appropriate, whether correlation hits were detected:
GPI_OK
PMERR_BITMAP_NOT_SELECTED PMERR_COORDINATE_OVERFLOW
PMERR_DEV_FUNC_NOT_INSTALLED
PMERR_HDC_BUSY
PMERR_INV_COLOR_DATA
PMERR_INV_COLOR_INDEX
PMERR_INV_COORD_SPACE
PMERR_INV_HDC
PMERR_INV_IN_AREA
PMERR_INV_IN_PATH
PMERR_INV_LENGTH_OR_COUNT
PMERR_INV_PICK_APERTURE_POSN