Skip to main content

Module stroke

Module stroke 

Source
Expand description

Analytical stroke offset expansion, unit normal evaluation, and cap/join generation.

Structs§

StrokeOptions
Stroke styling parameters for analytical hardware expansion.

Enums§

LineCap
Line termination cap style.
LineJoin
Line segment junction style.

Functions§

dash_quadratics
Subdivides a sequence of quadratic Bézier curves into contiguous “on” dash sub-paths according to an SVG stroke-dasharray pattern.
expand_stroke_quadratics
Expands a sequence of connected quadratic curves into a closed outline representing the stroked envelope.
offset_quadratic
Expands a quadratic curve into parallel offset curves at distance +offset and -offset.
quadratic_subcurve
Extracts the sub-curve of q over parameter interval [t0, t1] (0.0 <= t0 <= t1 <= 1.0) via exact De Casteljau subdivision.
unit_normal
Computes the 2D unit normal vector (-dy, dx) for a given tangent vector.