Skip to content

cf_draw_polygon_fill

Category: draw
GitHub: cute_draw.h


Draws a filled polygon.

void cf_draw_polygon_fill(const CF_V2* points, int count, float rounding);
Parameters Description
points An array of points to define the polygon surface.
count The number of points in the polygon.
rounding Corner radius in world units. The shape keeps its extent, clamped to what it can hold.

Remarks

This function has a hard-limit of up to 8 points. On a convex polygon rounding is clamped to the inscribed circle's radius; at that limit the polygon becomes a circle or, for an elongated shape, a capsule. On a concave polygon only the outward-pointing corners round -- inward-pointing ones stay sharp -- and rounding is clamped where the shortest edge would vanish, so large values are approximate.

cf_draw_line
cf_draw_polyline
cf_draw_bezier_line
cf_draw_bezier_line2
cf_draw_arrow
cf_draw_polygon_fill_simple