GreCombineShortLineRegion

GreCombineShortLineRegion combines an area lying between polyshortline pairs, which is represented by a SCANDATA structure, with a region. The pScanData parameter is ORed into the region. This function is used to build regions for path simulation. The function always expects the points in the shortlines to be in device coordinates. An error is raised when the region specified is currently selected as the clip region.

This function can be hooked by the presentation driver.


 * Simulation support: This function is simulated by a handling routine in the graphics engine.

Syntax
GreCombineShortLineRegion(hdc, hrgn, pScanData, pInstance, lFunction);

Parameters

 * hdc (HDC) - input
 * Device context handle.


 * hrgn (HRGN) - input
 * Region handle.


 * pScanData (PSCANDATA) - input
 * Pointer to a SCANDATA structure:


 * pslFirstLeft
 * Pointer to the left end of the first polyshortline
 * pslLastLeft
 * Pointer the left end of the last polyshortline
 * pslFirstRight
 * Pointer to right edge of first polyshortline
 * pslLastRight
 * Pointer to right edge of last polyshortline
 * c
 * Number of scan lines
 * rclBound
 * RECTL structure defining the bounding rectangle
 * slh
 * SHORTLINEHEADER structure:
 * ulStyle Line style
 * ulFormat Line format
 * ptlStart (x, y) position of start
 * ptlStop (x, y) position of end
 * lxLeft Left edge of bounding rectangle
 * lxRight Right edge of bounding rectangle
 * pslhNext Pointer to next shortline
 * pslhPrev Pointer to previous shortline


 * This structure is a discrete representation of a curve that starts at point (x0, y0) and ends at point (x1, y1). For each of the (y1-y0+1) rows, there is exactly one X value contained in the X array. The final point in the series is not drawn.
 * ax
 * Array of X values, as device coordinates.


 * pInstance (PVOID) - input
 * Pointer to instance data.


 * lFunction (ULONG) - input
 * High-order WORD=flags; low-order WORD=NGreCombineShortLineRegion.

Returns

 * rc (BOOL) - returns
 * This function returns BOOLEAN (fSuccess).


 * TRUE
 * Successful
 * FALSE
 * Error


 * Possible Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:
 * PMERR_HRGN_BUSY
 * PMERR_INSUFFICIENT_MEMORY
 * PMERR_INV_HRGN
 * PMERR_REGION_IS_CLIP_REGION


 * Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.

Sample

 * 1) define INCL_GRE_REGIONS
 * 2) include 

HDC         hdc;        /*  Device context handle. */ HRGN        hrgn;       /*  Region handle. */ PSCANDATA   pScanData;  /*  Pointer to a SCANDATA structure: */ PVOID       pInstance;  /*  Pointer to instance data. */ ULONG       lFunction;  /*  High-order WORD=flags; low-order WORD=NGreCombineShortLineRegion. */ BOOL        rc;         /*  This function returns BOOLEAN (fSuccess). */

rc = GreCombineShortLineRegion(hdc, hrgn,      pScanData, pInstance, lFunction);