Skip to content

cf_draw_custom_shape_fill

Category: draw
GitHub: cute_draw.h


Draws a filled registered custom SDF shape.

void cf_draw_custom_shape_fill(CF_CustomShape shape, CF_Aabb bounds, const float* params, int param_count);
Parameters Description
shape The shape from cf_make_custom_shape.
bounds World-space bounds containing the whole shape (the renderer pads for
antialias). Nothing outside them is drawn.
params Up to 16 floats delivered to the sdf as ShapeParams (a.x, a.y, b.x, ...).
param_count Number of floats in params.

Remarks

The shape is the region where the sdf is negative; its edge is antialiased from the field's local slope, so the field need not be a true distance.

CF_CustomShape
cf_make_custom_shape
cf_draw_custom_shape