mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-26 10:47:11 -06:00
Every pointer move of a frame went to whatever tool was active, so with a fast mouse (or a pen) a tool whose drag preview is costly (the Selection tool moving a large selection, Free Distort, the Width tool) redid it for each, up to 64 times a frame. Tool::wants_samples (default false) says a tool builds a stroke from the drag's samples: the Pencil, Paintbrush, Blob Brush, Eraser, Knife, Smooth and Path Eraser answer true (the Paintbrush through its wrapper), the Join tool doesn't. The canvas still reads the frame's moves every frame, so the macOS feed's pressures stay paired, but replays them only to such a tool; every other tool gets one drag a frame at the latest position. A frame whose moves end where the last frame's did still reaches the tool. Tests: only_the_freehand_tools_get_every_move_of_a_frame (Pencil, Paintbrush and Blob Brush get the 19 moves before the last, Selection, Direct Selection and Width none), a_mouse_stroke_keeps_a_frame_that_ends_where_it_started, the_freehand_tools_want_every_sample, and a_mouse_stroke_keeps_every_move_of_a_frame now checks every position in order, not only the count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>