Skip to main content

Module flatten

Module flatten 

Source
Expand description

Shared bounded Bezier-to-edge geometry, independent of pixel composition.

Structs§

Edge
Nonhorizontal directed edge stored from smaller to larger vertical coordinate.

Functions§

add_edge
Appends a directed, nonhorizontal edge and charges its retained storage.
edge_bounds
Device-space bounds of flattened edges; infinite and inverted when there are none.
flatten_curve
Appends bounded curve edges, charging generated storage and flattening work. Rejects coordinates that cannot resolve the requested device-space tolerance. Wang’s uniform subdivision bounds chord error by 3 * curvature / (4 * count^2). Curved counts remain even so symmetric reversals do not collapse into omitted horizontal edges.
path_edges
Transforms verbs into directed edges, implicitly closing each contour. Curve precision, generated storage and flattening work share the caller’s budget.
surface_edges
Flattens a path for geometric surface sampling and returns edges plus charged work. Uses the edge storage allowance and at most four million work units; allocates no pixels.