GrePolySpline

GrePolySpline draws a sequence of one or more Bezier splines starting at the current (X,Y) position. As each spline is drawn, the specified end point for the spline becomes the start point for the next spline. Upon completion, the current (X,Y) position is the end point of the last spline.

This function can be hooked by the presentation driver.


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

Syntax
GrePolySpline(hdc, paptlPoint, cPoints, pInstance, lFunction);

Parameters

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


 * paptlPoint (PPOINTL) - input
 * Pointer to coordinates array.


 * An array of elements in which each group contains three pairs of (X,Y) coordinates for the control and end points for the splines. If COM_TRANSFORM is not set, the function expects the points to be in screen coordinates.


 * cPoints (LONG) - input
 * Number of coordinate pairs in the array. When this is passed as 0, it returns Successful.


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


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

Returns

 * rc (LONG) - returns
 * Return codes.


 * This function returns an integer (cHits) indicating, where appropriate, whether correlation hits were detected:


 * GPI_OK Successful
 * GPI_HITS Successful with correlate hit (returned by display drivers when the correlate flag is ON and a hit is detected)
 * GPI_ERROR 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_BASE_ERROR
 * 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
 * PMERR_INV_RECT
 * PMERR_PATH_LIMIT_EXCEEDED
 * PMERR_PATH_UNKNOWN


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

Sample

 * 1) define INCL_GRE_ARCS
 * 2) include 

HDC       hdc;         /*  Device context handle. */ PPOINTL   paptlPoint;  /*  Pointer to coordinates array. */ LONG      cPoints; PVOID     pInstance;   /*  Pointer to instance data. */ ULONG     lFunction; LONG      rc;          /*  Return codes. */

rc = GrePolySpline(hdc, paptlPoint, cPoints,      pInstance, lFunction);

Remarks
The shape of each spline is controlled by a set of coordinates for three connected lines. The spline starts at the current position and ends at the end point of the third line. The end points of the first and second lines are used as control points. An individual spline always lies within the area bounded by the start, end, and control points.

Refer to the function "GpiPolySpline" in the Presentation Manager Programming Reference for more information.