mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-14 05:24:44 +00:00
While the Smooth tool drags with a path selected that it can smooth, a dashed outline shows the band its release smooths: every point within the tool's radius (12 screen pixels) of the drag, round at both ends. Alt smoothing with the Pencil, Paintbrush and Blob Brush shows the same band. A selection with no path the tool can change shows none. - The band is kept in squares eight radii wide, and each step of the drag adds its area only to the squares it reaches. A piece of a square's outline along a side is left out only where the square across holds band area. - A drag segment too long for the squares (a jump drawn zoomed out and viewed zoomed in) keeps its band near each end in the squares and shows the rest as the two sides of its band. A step that cannot be added whole is added one segment at a time. - A coarser grid of cells lists the squares and long segments, so a new one is checked only against those near it, and an outline is made again only where the band near it changed. - After a zoom change mid-drag the band is outlined again a few hundred points per frame, and the work on long segments stops for the frame after a fixed budget. Tools report unfinished overlays with Tool::overlays_pending, and the canvas then draws again on the next frame, so the band covers the whole drag even while the pointer holds still.