GreDisjointLines
Appearance
GreDisjointLines draws a sequence of disjoint straight lines using the end-point pairs specified. If COM_TRANSFORM is not set, the pairs are expected in screen coordinates.
This function is supported by the graphics engine and can be hooked by the presentation driver.
- Simulation support
- None. This function is mandatory for all drivers.
Syntax
GreDisjointLines(hdc, paptlPoint, cPoints, pInstance, lFunction, rc)
Parameters
- hdc (HDC) - input
- Device context handle.
- paptlPoint (PPOINTL) - input
- Pointer to an array of cPoints (X,Y) pairs.
- Pointer to an array of cPoints (X,Y) pairs containing the end-points for the lines.
- cPoints (LONG) - input
- Number of (X,Y) pairs in the points array.
- When this is passed as 0, the handling routine takes no action except to return Success.
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreDisjointLines.
Returns
- rc (LONG)
- Return Codes.
- On completion, the handling routine must return an integer (cHits) indicating, where appropriate, whether correlation hits were detected:
- GPI_OK Successful
- GPI_HITS Successful with correlation hit (returned by display drivers when the correlation 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
#define INCL_GRE_LINES #include <os2.h> HDC hdc; /* Device context handle. */ PPOINTL paptlPoint; /* Pointer to an array of cPoints (X,Y) pairs. */ LONG cPoints; /* Number of (X,Y) pairs in the points array. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; LONG rc; /* Return Codes. */ GreDisjointLines(hdc, paptlPoint, cPoints, pInstance, lFunction, rc);