drawTriangle
Draws a triangle defined by three sets of coordinates on the canvas.
Syntax
Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
| x1 | int/str |
X coordinate of the first vertex. | Required |
| y1 | int/str |
Y coordinate of the first vertex. | Required |
| x2 | int/str |
X coordinate of the second vertex. | Required |
| y2 | int/str |
Y coordinate of the second vertex. | Required |
| x3 | int/str |
X coordinate of the third vertex. | Required |
| y3 | int/str |
Y coordinate of the third vertex. | Required |
| color | string |
Primary fill color (if fill is not specified). |
Current state color |
| outline | string |
Outline stroke color. | none |
| fill | string |
Fill color style (e.g. none or a color name/hex). |
solid |
| outline_width | int |
Stroke width/thickness of the outline. | Current state stroke width |