natiny_render_poly

C
void natiny_render_poly(float cx, float cy, uint32_t sides, float radius, float rotation);

Draws a filled regular polygon on the currently bound render target, using the current drawing color set by natiny_render_set_color().

Parameters

Name Type Description
cx float Center X position
cy float Center Y position
sides uint32_t Number of polygon sides
radius float Distance from the center to a vertex
rotation float Rotation angle in degrees

Example

C
natiny_render_poly(160.0f, 120.0f, 6, 52.0f, 0.0f);

Notes

  • sides must be at least 3; smaller values draw nothing.
  • radius is measured from the center to a vertex and rotation is in degrees.