Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

PgSetStrokeColor(), PgSetStrokeColorCx()

Set the stroke color

Synopsis:

PgColor_t PgSetStrokeColor( PgColor_t color );

PgColor_t PgSetStrokeColorCx( PhGC_t *gc,
                              PgColor_t color );

Library:

ph

Description:

These functions set the stroke color used for subsequent draws. If the driver doesn't support 24-bit color, it selects the nearest color available to the one requested.

These functions override the color defined by PgSetStrokeDither*().

PgSetStrokeColor() works on the current graphics context, while you can specify the graphics context gc for PgSetStrokeColorCx().


Note: You don't need to set stroke color if you're using widgets; the drawing attributes are set based on the widgets' definitions and resources.

However, in all other cases you should set the stroke color before you begin drawing. The defaults are undefined and drawing before setting the relevant attributes may produce unexpected results.


Returns:

The previous color.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PgARGB(), PgCMY(), PgColor_t, PgDefaultStroke*(), PgGray(), PgHSV(), PgRGB(), PgSetDrawMode*(), PgSetFillColor*(), PgSetStrokeCap*(), PgSetStrokeDash*(), PgSetStrokeDither*(), PgSetStrokeJoin*(), PgSetStrokeTransPat*(), PgSetStrokeWidth*(), PgSetStrokeXORColor*(), PgSetTextColor*()

Drawing attributes and Lines, pixels, and pixel arrays in the Raw Drawing and Animation chapter of the Photon Programmer's Guide