mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-24 09:57:08 -06:00
Paths could be reshaped after drawing since #865, but the number of anchors could not change. Two new engine commands do that, and two tools in the Pen flyout drive them on the canvas. - photocraft_vector::edit::add_anchor splits the segment at t with de Casteljau, so a curve keeps its shape and gets a smooth anchor; a straight segment gets a corner on the line. delete_anchor joins the neighbours keeping their handles, drops an emptied subpath and refuses to remove a path's only anchor. - path.addAnchor / path.deleteAnchor take the same targets as the other point edits (work path, saved path by name, shape layer path, vector mask) and record one history step each. - Tool::AddAnchorPoint / DeleteAnchorPoint join the P group after the Pen. They act on Direct Selection's paths, highlight the segment or anchor under the pointer, show a +/- cursor badge, swap with Alt and turn into Direct Selection with Cmd/Ctrl. An edit clears a Direct Selection on the same path so it never points at a shifted anchor. - Icons derived from Lucide pen-tool (ATTRIBUTION.md), hints and tool names in all 16 catalogs, README tool list, roadmap. Co-authored-by: Fabio Lussi <198260595+itrycodinganditsbad@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Brandon Thomas <echelon@gmail.com>
594 B
594 B