Skip to content

Function: planStroke()

planStroke(raw, params): StrokePlan

Defined in: dabs.ts:185

The whole pipeline, every stage kept: filter → find corners → spline (breaking at them) → resample onto the dab grid → stamp.

Dab spacing is a fraction of the dab radius, and the radius varies along the stroke — so the grid is, strictly, non-uniform. We resample against the nominal radius rather than solving that circularity: the error is small (the radius changes slowly compared to the spacing), and the alternative is an iteration that buys nothing the eye can see. If a pathological case ever shows up — a stroke that goes from feather-light to full pressure in a few px — this is the assumption that broke.

Parameters

raw

readonly PenSample[]

params

PencilParams

Returns

StrokePlan