@mocanvas/mocanvas · function
declare function getStrokeOutlinePoints(strokePoints: StrokePoint[], options?: StrokeOptions): Vec[]Walk the stroke points and produce the polygon that surrounds them.
At each point the outline steps out perpendicular to the direction of travel
by that point's radius, once to the left and once to the right; the right
side is walked back in reverse so the result is a single closed ring. Tapers
shrink the radius near the ends, and a cap fans extra points around the
terminal so it reads as round rather than cut off.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.