Rectangle
Draws a rectangle on the canvas.
Parameters
| Name | Type | Description |
|---|---|---|
x | Number | The x-coordinate of the rectangle's top-left corner. |
y | Number | The y-coordinate of the rectangle's top-left corner. |
width | Number | The width of the rectangle. |
height | Number | The height of the rectangle. |
color | any | The 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')