Skip to main content
Version: Alpha 1

Rectangle

Draws a rectangle on the canvas.

Parameters

NameTypeDescription
xNumberThe x-coordinate of the rectangle's top-left corner.
yNumberThe y-coordinate of the rectangle's top-left corner.
widthNumberThe width of the rectangle.
heightNumberThe height of the rectangle.
coloranyThe stroke color of the rectangle. To change the fill color, use the Fill modifier.

Example

Rectangle(x: 50, y: 50, width: 100, height: 100, color: 'red')