## Presentation Device Driver Reference for OS/2

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

### GreSetStyleRatio - Parameters

hdc (HDC) - input The device context handle.

pRatio (PBYTE) - input Pointer to two unsigned bytes corresponding to the aspect of the pels on which a line is drawn. The style ratio is defined as a two-byte value. The low-order byte indicates a step in the X-direction, and the high-order byte a step in the Y-direction. Typical values for style ratios are:

For EGA devices, X-direction equals 64 and Y-direction equals 85.
For one-to-one devices, X-direction equals 64 and Y-direction equals 64. In this case, the style ratio steps are set to 64:64 rather than 1:1 to ensure that a single dot in a line-style pattern is a sensible length. The length of a single dot in the pattern is (256/step_value) pels.

pInstance (PVOID) - input A pointer to instance data.

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

fSuccess (BOOL) - returns Return codes.

On completion, the handling routine must return 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_DEV_FUNC_NOT_INSTALLED
PMERR_INV_HDC