mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-27 16:59:43 +01:00
A Pencil or Paintbrush stroke that starts on a selected path and is lifted away from it drew a new path, and a stroke back onto the path joined it with a straight piece at each end. - A stroke that starts on the path and is lifted farther than Edit selected paths within from it takes the path with it: a closed path opens where the stroke starts and ends where the stroke does; an open path is cut there and drops the part the stroke heads along (one the stroke leaves nearly square to it, more than 70 degrees from its direction, drops its shorter part). From one of its ends it drops nothing. - A stroke that ends back on the path (within Edit selected paths within) replaces the section between. On a closed path that is the way round that lies nearer the stroke, so carving across a shape cuts off the part the stroke crosses and drawing round outside it replaces the part it follows. On an open path, a stroke over its open ends closes it along the stroke. - A stroke that returns to where it started adds a loop there. - The stroke's ends bend smoothly onto the path over Edit selected paths within, instead of meeting it with a straight piece. - A shape's holes keep their winding, so they stay holes. Tests: tests_draw2 covers each case (opening a closed shape, cutting an open path, the loop, the side a closed redraw takes, carving, closing over open ends, the smooth join, a shape with a hole); bend_tests checks the end bending. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>