Skip to main content

Module path

Module path 

Source
Expand description

2D paths with Bezier flattening, fill (via scanline), and stroke. 2D path representation with Bézier flattening, fill, and stroke.

Path stores a sequence of PathCmd commands; PathBuilder offers a fluent API for constructing paths. Flattening uses De Casteljau adaptive subdivision. Fill delegates to crate::scanline; stroke constructs a parallel-offset polygon and fills it.

Structs§

Path
A 2-D path storing a sequence of draw commands.
PathBuilder
Fluent builder for Path.
StrokeStyle
Stroke configuration.

Enums§

Cap
Stroke cap style for open sub-paths.
Join
Stroke join style.

Functions§

flatten_cubic
Adaptive De Casteljau flattening for a cubic Bézier.
flatten_cubic_bezier
Flatten a cubic Bézier into a sequence of points (including endpoints).
flatten_quad
Adaptive De Casteljau flattening for a quadratic Bézier.
flatten_quad_bezier
Flatten a quadratic Bézier into a sequence of points (including endpoints).

Type Aliases§

Point
A single 2-D point.