Caution: This version of this document is no longer maintained. For the latest documentation, see

PgSetStrokeDither(), PgSetStrokeDitherCx()

Set the stroke dither pattern


void PgSetStrokeDither( PgColor_t c1,
                        PgColor_t c0,
                        PgPattern_t pat );

void PgSetStrokeDitherCx( PhGC_t *gc,
                          PgColor_t c1,
                          PgColor_t c0,
                          PgPattern_t pat );




These functions combine two colors according to the pattern defined by pat and applies the pattern to outlines.

The c1 argument represents the color used for “on” bits in the dither pattern and c0 represents the color used for “off” bits. The driver always selects the colors closest to c1 and c0.

The dither pattern is an array of 8 bytes, aligned with the upper-left corner of the application's region. This pattern repeats itself every 8 pixels horizontally and every 8 pixels vertically. For a sample of dither patterns, see PgSetFillDither*().

Note: Because of speed considerations, some graphics drivers don't dither strokes. If a driver doesn't support dithering, it uses c1 to draw strokes.

These functions override the color defined by PgSetStrokeColor*(). For basic colors, see PgColor_t.

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



Interrupt handler No
Signal handler No
Thread No

See also:

PgARGB(), PgCMY(), PgColor_t, PgDefaultStroke*(), PgGray(), PgHSV(), PgRGB(), PgSetDrawMode*(), PgSetFillDither*(), PgSetStrokeCap*(), PgSetStrokeColor*(), PgSetStrokeDash*(), PgSetStrokeJoin*(), PgSetStrokeTransPat*(), PgSetStrokeWidth*(), PgSetStrokeXORColor*(), PgSetTextDither*()

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