## Presentation Device Driver Reference for OS/2

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

### GreDrawLinesInPath - Parameters

hdc (HDC) - input Device context handle.

prclBound (PRECTL) - input Pointer to a bounding box for the lines.

Pointer to a RECTL structure:

xLeft Minimum X-coordinate of rectangle
yBottom Minimum Y-coordinate of rectangle
xRight Maximum X-coordinate of rectangle
yTop Maximum Y-coordinate of rectangle

pLine (PCURVE) - input Pointer to the first of a series of linked structures.

A pointer to the first structure in the path definition containing the lines that have to be drawn. The LINE structure, shown below, is an example of the more general CURVE structure. These two structures and the FILLETSHARP structure are defined in the header file. They all take the same general form and are distinguished by the value of bType.

The LINE structure is defined as:

bIdent Identifier. This value has no significance for the presentation driver.

bType Structure type. The only significant value is LINE_IDENTIFIER, which indicates that this structure is a LINE structure. If any other value is detected, the handling routine should skip to the structure addressed by npcvNext.

ulStyle Line style. See Line Attributes.

fl Flags. The only flag is:

CURVE_DO_FIRST_PEL When set, the handling routine must draw the first pel in the line. See also First and Last Pel Considerations.

pcvNext Pointer to next structure in the sequence.

pcvPrev Pointer to previous structure.

Reserved1[2] Reserved parameter.

ptfxA Start of the already clipped line (inclusive).

ptfxC End of the already clipped line (inclusive).

ptlA Start point of unclipped line (inclusive).

ptlC End point of unclipped line (inclusive).

lRslope Ignored by the presentation driver.

Reserved2[4] Reserved parameter.

cLines (ULONG) - input Count of LINE structures to draw.

pInstance (PVOID) - input Pointer to instance data.

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

rc (LONG) - returns 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_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

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