line

MJS / AC Piece API / graphics / done
line(x0, y0, x1, y1) or line({x0, y0, x1, y1}) or line(p1, p2)

Draw a 1-pixel wide line. Can take 4 coordinates, an object with coordinates, or two points.

Parameters

Name Type Required Description
x0, y0, x1, y1 number no Line start and end coordinates.
p1, p2 point no Alternative point-object form.

Returns

void

Runtime Notes

No additional runtime notes yet.

Details

No additional details yet.

Live Preview

Embedded AC preview