pdf_service._buildFreehandPdfPath hardcoded its OWN StrokeOptions (thinning:0.7, streamline:0.5) instead of the shared geometry — the R7 hairline-export divergence. The prior pen-feel commit (streamline 0.5→0.32 on screen) widened the gap: export still rendered at 0.5. Extract the ONE perfect_freehand recipe into stroke_geometry.freehandOutlinePoints (owns thinning/smoothing/streamline/simulatePressure). buildStrokeOutline (screen) and pdf_service (export, via InkStroke→pfPoints) now both call it, so the StrokeOptions live in exactly one place and screen↔export can't drift again. Export now matches screen: thinning 0.85 (kDefaultPenThinning), streamline 0.32. test/export_geometry_test.dart pins it: buildStrokeOutline traces exactly the shared outline; default thinning == kDefaultPenThinning; thinning is wired; empty input is safe. flutter analyze lib/editor clean; 78/78 tests pass (+4). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3.4 KiB
3.4 KiB