Function tiny_skia::scan::hairline::extend_pts

source ·
fn extend_pts(
    line_cap: LineCap,
    prev_verb: PathVerb,
    next_verb: Option<PathVerb>,
    points: &mut [Point],
)
Expand description

Extend the points in the direction of the starting or ending tangent by 1/2 unit to account for a round or square cap.

If there’s no distance between the end point and the control point, use the next control point to create a tangent. If the curve is degenerate, move the cap out 1/2 unit horizontally.