SetLineStyle

Set the OS/2 style line style parameters for drawing patterned lines

Declaration

void NAPI GA_2DStateFuncs::SetLineStyle(
    N_uint32 styleMask,
    N_uint32 styleStep,
    N_uint32 styleValue)

Prototype In

snap/graphics.h

Parameters

styleMask

32-bit style mask for styled lines

styleStep

8-bit value added to styleValue for each major pixel

styleValue

The style value for the first pixel in the line

 

Description

This function sets up the parameters for drawing 32-bit OS/2 style styled lines for all subsequent styled line drawing functions. In the styleMask, pixel 0 corresponds to bit 0, pixel 1 = bit 1, ... pixel 31 = bit 31 etc. If the styled line is drawn in transparent mode, where a bit is 0 in the styleMask the destination pixel remains untouched. If the styled line is drawn in opaque mode, where a bit is 0 in the styleMask the destination pixel is drawn in the background color. In all cases where a bit in the styleMask pattern is 1, the pixel is drawn in the foreground color.

The styleValue passed in is composed of an error value and a mask position as follows:

|====================================================|
|    high word   |  3 bits  |  5 bits  |   8 bits    |
|====================================================|
|    not used    | not used | mask pos | error value |
|====================================================|

The error value determines the error value at the first pixel in the line. The mask position is an index into the styleMask to determine how the pixel should be drawn as outlined above.

See Also

SetLineStipple, SetLineStippleCount, DrawStyleLineInt, DrawBresenhamStyleLine

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com