mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-14 06:31:41 +00:00
A Smooth drag along the middle of a curved segment smoothed nothing when neither of the segment's anchors was within the reach, and paths of two anchors were never smoothed. - path.smoothRegion searches each curved segment where it can come within the reach, halving it down to pieces no longer than half the reach, and adds an anchor in the middle of each stretch in reach; the existing reach split then cuts the segment where the drag enters and leaves the reach. A drag that only grazes a curve finds the place on it nearest the drag. The search is bounded per drag and shared equally by the segments in reach. - Paths of two anchors are smoothed, open or closed. - Alt with the Paintbrush smooths a selected two-anchor curve; a two-anchor straight line still gets the closed stroke. Both sides use one segment_is_straight test. Part of #2224