wb_draw_line

bool wb_draw_line (int target, int x0, int y0, int x1, int y1, int color [, int linewidth [, linestyle]])

Draws a straight line. The first parameter, target, may be a WinBinder object, a window handle, a drawing surface or a bitmap.

The start and end points of the line are (x0, y0) and (x1, y1) respectively, in pixels. color is a RGB color value and linewidth is the width of the line, in pixels. A linewidth of zero sets the width to 1 pixel. Parameter linestyle accepts the values specified in the table below.

Returns TRUE on success or FALSE if an error occurs.

Line styles

Refer to the following table.

linestyle

Style

0

Solid line (the default style)

1

Dotted line

2-7

Dashed lines with increasing lengths

8

Line with alternating dashes and dots

9

Line with alternating dashes and double dots

NOTE: Some line styles may not supported or may display improperly in Windows 98.

See also

wb_get_pixel
wb_draw_rect
wb_draw_ellipse
Drawing functions