natiny_render_poly
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
natiny_render_poly(160.0f, 120.0f, 6, 52.0f, 0.0f);
Notes
sidesmust be at least 3; smaller values draw nothing.radiusis measured from the center to a vertex androtationis in degrees.