Skip to main content

line

line() 

Draws a line, more than two points can be given to create a line-strip.

line((-1.5, 0), (1.5, 0))
line((0, -1.5), (0, 1.5))
line((-1, -1), (-0.5, 0.5), (0.5, 0.5), (1, -1), close: true)

If the first or last coordinates are given as the name of an element, that has a "default" anchor, the intersection of that element's border and a line from the first or last two coordinates given is used as coordinate. This is useful to span a line between the borders of two elements.

circle((1,2), radius: .5, name: "a")
rect((2,1), (rel: (1,1)), name: "b")
line("a", "b")

..pts-style:

Positional two or more coordinates to draw lines between. Accepts style key-value pairs.

close:

Default: false

If true, the line-strip gets closed to form a polygon

Styling

Root: line

Supports mark styling.

Anchors

Supports path anchors.