mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
The Simplify help page says the slider starts at an auto-simplified value (https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/modify-paths/manually-simplify-paths.html). The slider opened at a fixed level 50 (1 pt), whatever the size of the selection, so the first preview was the same tolerance for a 30 pt icon as for a 1000 pt drawing. The level Auto-Simplify picks for the selection is now one engine function, vectorcraft_engine::auto_simplify_level (the existing 1/400-of-the-longer- side rule in vectorcraft_pathops), which object.path.simplify {auto: true} and the slider's opening fields both use. Object › Path › Simplify (and ui.menuDialog, the Properties and contextual task bar buttons, which go through the same menu dialog) opens the slider there, and the canvas previews that result; Auto-Simplify still moves the slider back to it. The retained Simplify dialog path is unchanged. Verification: simplify_slider_opens_at_the_auto_simplify_level_of_the_selection opens the slider on 1140, 285 and 28.5 pt waves (levels 35, 55, 89) and checks the preview is exactly object.path.simplify {auto: true}'s result; without the change it fails with level 50 != 35, and simplify_opens_a_slider_whose_drag_previews_fewer_or_more_points fails with {"level": 50} != {"level": 55}. cargo xtask ci: all 10 steps passed.