natiny_render_rectangle

C
void natiny_render_rectangle(float x, float y, float w, float 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 float Left edge X position
y float Top edge Y position
w float Width
h float Height

Example

C
natiny_render_rectangle(40.0f, 40.0f, 120.0f, 80.0f);

Notes

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