mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-02 06:46:50 -06:00
stroke_center handed any dash pattern to kurbo::stroke, which makes one outline per dash: a 0.01/0.01 pattern on a 10,000-unit line made 2.5M path elements, and a long line with a tiny pattern ran out of memory. The variable width stroke already drew solid past MAX_DASHES (20,000); that estimate is now width::dashes_fit and stroke_center uses it too, so both strokes follow one rule. The path length is only measured for dashed strokes. Test: a_dash_pattern_too_fine_for_its_path_strokes_solid (2.5M elements on the old code).