Triangle
Draws a triangle on the canvas.
Parameters
| Name | Type | Description |
|---|---|---|
x1 | Number | The x-coordinate of the first vertex. |
y1 | Number | The y-coordinate of the first vertex. |
x2 | Number | The x-coordinate of the second vertex. |
y2 | Number | The y-coordinate of the second vertex. |
x3 | Number | The x-coordinate of the third vertex. |
y3 | Number | The y-coordinate of the third vertex. |
color | any | The stroke color of the triangle. To change the fill color, use the Fill modifier. |
Example
Triangle(x1: 50, y1: 0, x2: 100, y2: 100, x3: 0, y3: 100, color: 'green')