Skip to content

cf_draw_quad

Category: draw
GitHub: cute_draw.h


Draws a quad wireframe.

void cf_draw_quad(CF_Aabb bb, float thickness, float rounding);
Parameters Description
bb The AABB (Axis-Aligned Bounding Box) to draw a quad over.
thickness The thickness of each line to draw.
rounding Corner radius in world units. The shape keeps its extent, clamped to what it can hold.

Remarks

Shapes keep the extent you ask for: a 100x40 box with rounding 8 stays 100x40 with rounded corners, and rounding is clamped to half the shortest side (where a square becomes a circle). The line runs inward from the edge, so the whole stroke lies within bb.

cf_draw_quad_fill2
cf_draw_quad2
cf_draw_quad_fill