natiny.render.rectangle

Lua
natiny.render.rectangle(x, y, w, h)

Draws a filled rectangle on the currently bound render target, using the current drawing color set by natiny.render.set_color().

Parameters

Name Type Description
x number Left edge X position
y number Top edge Y position
w number Width
h number Height

Example

Lua
natiny.render.rectangle(40, 40, 120, 80)

Notes

  • (x, y) is the top-left corner; positive w and h extend right and down.