Skip to content

LINE ​

Draws a straight line between two points.

Syntax ​

leo-grammar
LINE [ x1:measureValue ] [ y1:measureValue ] [ x2:measureValue ] [ y2:measureValue ] .

Parameters ​

  • x1 (measureValue, optional) - The x-coordinate of the first point. The default is 0cm.
  • y1 (measureValue, optional) - The y-coordinate of the first point. The default is 0cm.
  • x2 (measureValue, optional) - The x-coordinate of the second point. The default is 0cm.
  • y2 (measureValue, optional) - The y-coordinate of the second point. The default is 0cm.

Details ​

The style of this command is defined by the PEN command.

If both the first and second point have the same coordinates, then this basically draws a point.

See Also ​

Examples ​

Draw a simple diagonal line with a thickness of 3pt.
Diagonal black line

leo
GRAPHREP
SHADOW off

PEN w:3pt
LINE x1:0cm y1:0cm x2:1.0cm y2:1.0cm

Versions and Changes ​

Available since ADOxx 1.3