PLAYGROUND (experimental)

polyline

Draw a series of connected lines (open polygon), can be filled
polyline(
    points, 
    [stroke=#000000], 
    [fill=#FFFFFF], 
    [weight=1.00]
)

Draw a series of connected lines (open polygon), can be filled

Syntaxe

polyline(points=[50, 62, 86, 50, 50, 38, 14, 50], stroke="#000000", fill="#FFA000", weight=4)

Arguments

NameTypeRequiredDefaultDescription
pointsyes-list of coords x/y - must be even (multiple of 2)
stroke-#000000Stroke color
fill-#FFFFFFFill color
weight-1.00Stroke weight (thickness)

Full example

canvas(600, 600, "#020410", center=true);

font_default(50);

rectangle(
    x=-width()/2, y=-height()/2, 
    w=width(), h=height(),
    stroke="#64B5F6", fill="transparent",
    weight=40
);

text("@todo", 0,-130, ax=middle, ay=middle, fill="#FFC107");
text(whoami(), 0,0, ax=middle, ay=middle, fill="#FFC107");

save(whoami() + ".png");