DrawClippedStyleLineInt

Draws an OS/2 style styled, single pixel wide line with integer coordinates.

Declaration

N_int32 NAPI GA_2DRenderFuncs::DrawClippedStyleLineInt(
N_int32 x1,
N_int32 y1,
N_int32 x2,
N_int32 y2,
N_int32 drawLast,
N_int32 transparent,
N_int32 clipLeft,
N_int32 clipTop,
N_int32 clipRight,
N_int32 clipBottom)

Prototype In

snap/graphics.h

Parameters

x1 | X1 coordinate
y1 | Y1 coordinate
x2 | X2 coordinate
y2 | Y2 coordinate
drawLast | 1 to draw last pixel, 0 to skip it
transparent | 1 if the line is transparent, 0 if opaque
clipLeft | Left coordinate for clip rectangle (inclusive)
clipTop | Top coordinate for clip rectangle (inclusive)
clipRight | Right coordinate for clip rectangle (exclusive)
clipBottom | Bottom coordinate for clip rectangle (exclusive)

Description

This function renders an OS/2 style styled line at the specified location and the currently active colors, mix and style pattern. This routine will render a line from (x1,y1) to (x2,y2) inclusive. If the drawLast parameter is set, the last pixel in the line (x2,y2) will be drawn, otherwise it will be skipped. This feature allows multiple lines to be linked together as a polyline for CAD style operations while drawing in XOR mode (and is also required for compatibility with Microsoft Windows).

If the transparent parameter is set to 1, where a bit is 0 in the style pattern the destination pixel remains untouched. If the transparent parameter is set to 0, where a bit is 0 in the style pattern the destination pixel is drawn in the background color. In all cases where a bit in the style pattern is 1, the pixel is drawn in the foreground color.

The output is clipped against the passed in clipping rectangle.

See Also

GA_2DRenderFuncs_DrawClippedBresenhamStyleLine, DrawClippedLineInt, SetLineStyle

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