Commit Graph
4 Commits
Author SHA1 Message Date
dotCooCoo a9aa1f405b Render: curve lines keep both turns of a curve that turns back twice
A curve drawn as lines took its line ends from the curve's bending alone.
Where a curve runs out and back twice along almost one line, its two turns
hold almost no bending, so a thin stroke drew it with one step in two
halves: each half held a whole turn, the two halves' gaps canceled, and
the band ran straight from start to end without either turn. A cubic from
(0, 0) out to x = 28.87 and back to x = -28.87 drew only around x = 0.

Each step is now checked against its curve: where the curve lies more
than twice the chord allowance from the step's line, to either side or
past its ends, the step count doubles, up to the curve's equal steps.
Wide strokes draw their long curves the same way and get the same check.
2026-11-28 14:36:09 -08:00
dotCooCoo d91b815690 Render: thin curve lines stop where the curve turns back
Each line end of a curve drawn as lines moved out by the curve's whole gap
from the chords beside it, including the part along the chord. Where a
curve runs out and back along almost one line, that part points along the
curve, so the end moved past the turn: a cubic from (0, 0) out to x = 75
and back drew its band out to x = 112.5. The ends now move only across
their chords.
2026-11-28 13:49:09 -08:00
dotCooCoo 36c5f65b24 Fix #7257: thin curved strokes draw with half as many outline lines
Strokes narrower than four raster tolerances had their outline fitted and
flattened at a tolerance as fine as 1/16 of the raster tolerance, so each
side of a thin curve took about four times the lines a wider stroke takes,
and every frame drew them all. A plain thin stroke (no dashes, no width
profile) along a path with curves is now drawn as lines first, within a
sixth of its width of the curve, and each side of each line is offset by
exactly half the width. The band keeps its width, the outline takes one
line per side for each line of the path. Where two lines meet at a small
angle both sides go to where their offsets cross; sharper corners get the
stroke's join, open ends its caps, and a closed path keeps its hole. Dashed
and profiled thin strokes, and thin strokes along straight paths, are
unchanged.

On 200 cubic curves about 100 device pixels across, a 0.5 px stroke's
outline goes from 15,559 lines to 7,514 (4,288 before #3273).
2026-11-28 11:28:42 -08:00
FractalEncrypt e0ad7ccf16 Preserve raster coverage of thin curved strokes
Squashed from #3273 onto main.
2026-11-05 20:00:21 +07:00