Skip to main content

Module path

Module path 

Source
Expand description

Turning a loaded outline into path commands.

Structsยง

ContourPoint ๐Ÿ”’
A point and its flag, which is all path conversion reads.

Enumsยง

PathContourStart
Where a contour starts when its first point is off-curve.
PendingState ๐Ÿ”’
Off-curve points seen but not yet emitted, since a curve cannot be drawn until the point that ends it arrives.

Functionsยง

contour_to_path
Converts one contour into path commands, taking its points from a slice of anything to_point can read them out of.
outline_to_path
Converts an outline given as points, flags and contour end points into path commands, and calls sink for each.
walk_contour ๐Ÿ”’
Emits one contour, reading its points by index.