The geometry of a stroke of ink (Hakushi.Kits.Ink): its outline, as
the d of an SVG path, whose width follows the pen's pressure.
The browser draws a stroke in progress with the same outline (the
bundle's ink.ts): the stroke a person sees as they draw it, and the
node it becomes when the pen lifts, are the same shape.
A point is [x, y, pressure], the pressure from 0 to 1 (0.5 for a
pointer with none, a mouse); [x, y] is a point of no pressure.
Summary
Functions
The line through a stroke's points, as the d of an SVG path: to aim at it.
A number as a path writes it: to a tenth, halves away from zero, without
a .0 (as the browser writes it).
The outline of a stroke: the points on each side of its line, as far
from it as the pressure says (thinner with less), joined by curves
through their middles, with a round cap at each end. flat (a
highlighter) keeps one width.
How far a stroke's outline reaches from its points: the most it is wide, halved.
Types
@type point() :: [number()]
A point of a stroke: [x, y, pressure] or [x, y].
Functions
The line through a stroke's points, as the d of an SVG path: to aim at it.
A number as a path writes it: to a tenth, halves away from zero, without
a .0 (as the browser writes it).
The outline of a stroke: the points on each side of its line, as far
from it as the pressure says (thinner with less), joined by curves
through their middles, with a round cap at each end. flat (a
highlighter) keeps one width.
How far a stroke's outline reaches from its points: the most it is wide, halved.