Template Keywords

Drawing - line

The /line/ keyword draws a straight line with the current pen between two points.

/line/,<left>,<top>,<right>,<bottom>

The left and top values specify the top left corner, and the right and bottom the bottom right corner of the frame.

The line is drawn from the top left corner to the bottom right corner of the frame.

The colour and thickness of the line is determined by the previous /pen/ keyword.

Examples

This example draws a thin black line from the top left corner of a page to a point 50 mm across the page and 20 mm down.

/pen/,black
/line/,0,0,500,200

This example draws a vertical green line 3 pixels thick down the middle of an A4 page.

/colour/,0,128,0
/pen/,solid,3
/line/,1050,0,1050,2970

This example draws a triangle with sides of length 30, 40, and.50 mm.

/line/,100,100,100,500
/line/,100,500,400,500
/line/,400,500,100,100

 

Contents
Search