PgSetStrokeWidth(), PgSetStrokeFWidth(), PgSetStrokeWidthCx(), PgSetStrokeFWidthCx()

Set line thickness

Synopsis:

int PgSetStrokeWidth( int width );

long PgSetStrokeFWidth( long width );

int PgSetStrokeWidthCx( PhGC_t *gc,
                        int width );

long PgSetStrokeFWidthCx(  PhGC_t *gc,
                           long width );

Library:

ph

Description:

These functions set the thickness of lines.

If you call PgSetStrokeWidth*(), the width argument takes an integer that indicates the width of the line in pixels. But if you call PgSetStrokeFWidth*(), the width argument takes a pixel width multiplied by 65,536 (0x10000). For example, specifying a value of 0x80000 will set the line width to 8 pixels.


Note: The minimum line width for PgSetStrokeFWidth*() is one pixel.

PgSetStrokeWidth() and PgSetStrokeFWidth() work on the current graphics context, while you can specify the graphics context gc for PgSetStrokeWidthCx() and PgSetStrokeFWidthCx().

Returns:

The previous width.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

Caveats:

We don't recommend using a line width greater than one pixel. Some graphics drivers might give unexpected results.

See also:

PgDefaultStroke*(), PgDrawEllipse*(), PgDrawLine*(), PgDrawPolygon*(), PgDrawRect*(), PgDrawRoundRect*(), PgSetDrawMode*(), PgSetStrokeCap*(), PgSetStrokeColor*(), PgSetStrokeDash*(), PgSetStrokeDither*(), PgSetStrokeJoin*(), PgSetStrokeTransPat*(), PgSetStrokeXORColor*()

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