natiny.render.rectangle_outline
natiny.render.rectangle_outline(x, y, w, h [, thickness])
Draws a rectangle outline on the currently bound render target, using the current drawing color set by natiny.render.set_color().
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
x |
number |
Left edge X position | |
y |
number |
Top edge Y position | |
w |
number |
Width | |
h |
number |
Height | |
thickness |
number |
1.0 |
Outline thickness |
Example
natiny.render.rectangle_outline(40, 40, 120, 80, 2.0)
Notes
- Each edge is centered on the rectangle boundary, so half the thickness lies
inside and half outside. Lua defaults to
1pixel.