natiny_render_poly_outline

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

Draws a regular polygon outline 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
thickness float Outline thickness

Example

C
natiny_render_poly_outline(160.0f, 120.0f, 6, 60.0f, 0.0f, 2.0f);

Notes

  • sides must be at least 3; smaller values draw nothing.
  • Rotation is in degrees and thickness is in pixels.