Simulation support:

None. This function is mandatory for all drivers.

Description:

GreCharStringPos draws a character string. The string can be drawn from the current (X,Y) position or from a position specified.

This function must be supported by the presentation driver. The handling routine must provide full support for drawing characters from an image font in CM_MODE1 when the character direction is CHDIRN_LEFTRIGHT (see Character Attributes). For outline characters or characters in any other mode or direction, the handling routine can dispatch the call to the graphics engine at the address given for this call in the default dispatch table.

GreCharStringPos is called by the function GpiCharStringAt. GreCharStringPos is used to draw a character string either at the current position or at a specified position. It will also update the current presentation space position upon completion of output.

#define INCL_GRE_STRINGS
#include <os2.h>

HDC          hdc;        /*  Device context handle. */
PPOINTL      pptlStart;  /*  Pointer to (X,Y) coordinates of start position. */
PRECTL       prclRect;   /*  Pointer to an opaque or clip rectangle. */
ULONG        flOptions;  /*  Options flag. */
LONG         cChars;     /*  Number of characters in the string. */
PCH          pchString;  /*  Pointer to the character string. */
PLONG        pAdx;       /*  Pointer to Increment array. */
PCSP_INFO    pAttrs;     /*  Pointer to attributes. */
PVOID        pInstance;  /*  Pointer to instance data. */
ULONG        lFunction;  /*  High-order WORD=flags; low-order WORD=NGreCharStringPos. */
LONG         rc;         /*  Return Codes. */

rc = GreCharStringPos(hdc, pptlStart, prclRect,
       flOptions, cChars, pchString, pAdx,
       pAttrs, pInstance, lFunction);


[Back: GreCharStringPos]
[Next: GreCharStringPos Parameter - hdc]