mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-12 15:52:52 +00:00
A width profile's sides now run as a cubic Hermite curve through the points, its slope at each one the weighted harmonic mean of the secants either side (Fritsch-Carlson). That is C1 continuous and monotone between points, so it never overshoots them, a width change eases in and out instead of making a corner, and moving one point only reshapes the two segments beside it. The ends are flat; two points at one t are still a step. The outline samples the curve along the path (densify subdivides each profile segment) so the smooth width draws on straight runs too, and a flat profile keeps its old straight pieces. Hit testing now counts every segment near enough to reach the point, as the wider side of a farther one can paint past the nearest; gradient strips reach over projecting dash caps. Tests updated for the new sampled widths; new tests cover smoothing, monotonicity, locality and steps.