Drawing a line

draw hline

Draw a horizontal line

draw vline

Draw a vertical line


SYNTAX

draw hline length = length [pen = pen_no] [in window_id]

draw vline length = length [pen = pen_no] [in window_id]

Draws a horizontal or vertical line in the window specified, starting at the window’s current logical cursor position. The cursor may be positioned by means of the move cursor to | at command. The clauses may appear in any order.

length = length

This clause is compulsory. It specifies the length of the line in characters or pixels, according to the positioning type being used.

[pen = pen_no]

If this clause is present, the specified pen from the window palette is used to draw the line. Otherwise the default pen PEN_LINE_GRAPHIC (34) is used.

[in window_id]

If the in window_id clause is present the line is drawn in the window specified. The window need not be open.

If the in window_id clause is absent, the window that was the subject of the last move cursor to | at command is selected. If no move cursor to | at command has yet been executed in the program, then the task window is used.

It is recommended that the window_id always be specified.


NOTES

  • The +|- graphic window clause defines an initial graphic in a window.

  • The lines created by these commands are cleared by the clearall command but not by the clear command.


EXAMPLE

draw vline length = 240 pen = 15 in TestWindow
draw hline length = 35 in Window2

RELATED TOPICS

move cursor to | at

Graphics

draw rectangle

Draw operations

Pixel and character positioning