natiny.render.line
natiny.render.line(x0, y0, x1, y1 [, thickness])
Draws a line segment on the currently bound render target, using the current drawing color set by natiny.render.set_color().
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
x0 |
number |
Start X position | |
y0 |
number |
Start Y position | |
x1 |
number |
End X position | |
y1 |
number |
End Y position | |
thickness |
number |
1.0 |
Line thickness in pixels |
Example
natiny.render.line(40, 40, 220, 140, 2.0)