mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-07 14:33:34 +00:00
The renderer outlined the whole stroke of an edited path on every frame, so dragging one anchor of a path with many anchors re-outlined every segment. A stroke line of more than 1,024 elements without dashes or a width profile is now outlined only for the segments within the stroke's reach of the view, inflated by the view's own size on each side. The cached outline keeps that region, and a frame outside it outlines the stroke again. Closed subpaths that a wide stroke crosses over stay whole, and a cut closed subpath is walked from a removed segment so no cut lands where it starts and ends. The pixels are the same. At 1600 x 1200, the frame after one anchor moves takes 28 to 30 ms instead of 103 ms on an open path of 200,000 anchors, and 10 ms instead of 30 ms on a closed path of 50,000 anchors (the new anchor_bench example: cargo run --release -p vectorcraft-engine --example anchor_bench).