natiny.render.triangle_outline
natiny.render.triangle_outline(x0, y0, x1, y1, x2, y2 [, thickness])
Draws a triangle outline on the currently bound render target, using the current drawing color set by natiny.render.set_color().
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
x0 |
number |
First vertex X position | |
y0 |
number |
First vertex Y position | |
x1 |
number |
Second vertex X position | |
y1 |
number |
Second vertex Y position | |
x2 |
number |
Third vertex X position | |
y2 |
number |
Third vertex Y position | |
thickness |
number |
1.0 |
Outline thickness |
Example
natiny.window.bind(win)
natiny.render.set_color(natiny.color.from_hex("#00FFFF"))
natiny.render.triangle_outline(160, 40, 100, 160, 220, 160, 2.0)
natiny.window.unbind()