Commit Graph
32 Commits
Author SHA1 Message Date
dotCooCoo 6f94760f04 Merge main into feat/quick-pen-edit-delete
# Conflicts:
#	crates/tools/src/quickpen.rs
#	docs/ui-parity.md
2026-11-25 10:31:38 -08:00
dotCooCoo 2d0b35b36b Merge main into feat/quick-pen-edit-delete
The Quick Pen context menu test uses the menu's Node helpers (labels, has, context_entries) of the new menu framework.
2026-11-24 20:31:11 -08:00
dotCooCoo b4c214169b Merge main into feat/quick-pen-length-handles 2026-11-24 09:16:09 -08:00
dotCooCoo 6af6b2b13e Quick Pen: a length drag shows no Smart Guide from the hover before it
A press on a length handle kept the Smart Guides of the hover before
it, so a guide or label at the handle stayed on screen for the whole
drag. The press now clears them, as a press away from a handle does
when it places a point.
2026-11-23 12:16:38 -08:00
dotCooCoo 80b90c5ebb Quick Pen: a length drag out and back to the same length records no undo step
A length drag that changed the length and then came back to where it
started previewed the path again at its first length, so letting go
recorded an undo step for an unchanged path. A drag that ends at the
length the piece started with is now taken back as Escape takes it
back, on the path being drawn and on a selected path.
2026-11-22 02:07:27 -08:00
dotCooCoo 6ced69a4eb Merge main into feat/quick-pen-edit-delete
`an_arc_drag_shows_the_protractor` clears the selection before each
round, so its clicks draw instead of editing the path the last round
left selected.
2026-11-22 00:39:01 -08:00
dotCooCoo cb3946fe2f Quick Pen: an open end on a selected segment continues its path
A click on an open end of another path that lies on a segment of the
selected path now goes on drawing from that end, and the pointer shows
that it will. Before, the segment took the press and the click started a
new path. An anchor of the selected path still comes first.
2026-11-21 22:23:15 -08:00
dotCooCoo 357133cef1 Quick Pen: a selection change during a press stops it
When another command changes the selection while a press on an anchor or
a segment is down, the release no longer selects an anchor, goes on
drawing from an open end, or moves anything. Choosing another tool during
a drag that came back to where it started now records no undo step.
2026-11-21 21:51:20 -08:00
dotCooCoo 1410f7500c Quick Pen: an edit by another command during a drag stays
When another command edits the document or the selection during a drag
on an anchor or a segment, the drag now previews no more and its undo
step keeps that edit with the move as last shown, also when Escape ends
the drag. Before, the next drag event previewed from the document as it
was before the edit, so the edit was lost.
2026-11-21 21:23:36 -08:00
dotCooCoo 059628a14c Quick Pen: a drag back to its start records no undo step
A drag on an anchor or a segment that is let go where it started now
moves nothing and adds no undo step. Before, it recorded a Move step
that changed nothing.
2026-11-21 20:47:12 -08:00
dotCooCoo ec18884308 Quick Pen: a click on a path edited during the press does nothing
When another command edits the path while a click on one of its anchors
is down, the release no longer selects an anchor or goes on drawing from
the open end the press found. Before, the click used the anchor index and
the end it had stored before the edit.
2026-11-21 20:24:16 -08:00
dotCooCoo e10c3f1157 Merge main into feat/quick-pen-length-handles 2026-11-21 20:17:47 -08:00
dotCooCoo 17a1a5543f Quick Pen: a first Shift-click selects one anchor; a segment drag moves its ends
A first Shift-click on an anchor of a path selected whole now selects
that anchor alone. Before, it selected every other anchor of the path.

A drag on a segment now moves only that segment's two ends. Before, when
both ends were selected together with other anchors, the drag moved the
other anchors too.
2026-11-21 20:01:41 -08:00
dotCooCoo 78d2a634dd Quick Pen: a press let go past the drag distance moves the anchor
A press on an anchor or a segment of a selected path that is let go past
the drag distance now moves what it holds, even when every drag event
before the release stayed short. Before, such a release selected the
anchor, or on an open end went on drawing from it. A press whose path
another command edited while it was down does not move anything.

The docs now say that a line stays a line and an arc stays circular
beside a moved corner anchor, and that at a moved smooth anchor the
handles stay in line and the segments bend to meet.
2026-11-21 19:22:33 -08:00
dotCooCoo a543361727 Pen: Alt tapped during a Quick Pen press moves the end on or off the tick at once
A press keeps the pointer and the snapped point for the end of the piece it adds. When Alt
changes the action during the press, the end goes through the protractor's tick again for the
new action, so a continuous arc that snapped to a tick and becomes a sharp-corner arc ends at the
pointer, and a piece that becomes a continuous arc goes onto the tick, without waiting for the
next drag. This also covers a press that has not dragged.
2026-11-21 14:44:18 -08:00
dotCooCoo ac28d0b6ba Pen: Alt tapped during a Quick Pen press moves the end on or off the tick at once
A press keeps the pointer and the snapped point for the end of the piece it adds. When Alt
changes the action during the press, the end goes through the protractor's tick again for the
new action, so a continuous arc that snapped to a tick and becomes a sharp-corner arc ends at the
pointer, and a piece that becomes a continuous arc goes onto the tick, without waiting for the
next drag. This also covers a press that has not dragged.
2026-11-21 14:41:30 -08:00
dotCooCoo 20425b6914 Pen: Quick Pen snaps no first continuous arc to a tick and hides a stale hover
A continuous arc that starts a path has no direction to follow and
sweeps the arc size, as a sharp-corner arc does. Moving its end onto a
protractor tick put the end on a circle the drawn arc does not follow,
so `tick_end` now gives no tick for it.

The hover keeps the snap settings it was made with (`SnapSettings` in
guides/snap.rs: the window, zoom, snapping options, tolerances,
Alignment Guides and construction angles). After one of them changes
under a still pointer, the hover's rubber band, protractor, distance
label and Smart Guides are hidden until the pointer moves, also through
a press, so the preview shows no point that a click would not place.
A press also drops the hover, so after a click puts an arc's end on a
tick no preview runs from that end back to the pointer. While the
pointer hovers, the tool asks the canvas to hover it again when the
view, the document or the selection changes (`wants_rehover`).
2026-11-21 13:55:48 -08:00
dotCooCoo a99702361a Pen: Quick Pen snaps no first continuous arc to a tick and hides a stale hover
A continuous arc that starts a path has no direction to follow and
sweeps the arc size, as a sharp-corner arc does. Moving its end onto a
protractor tick put the end on a circle the drawn arc does not follow,
so `tick_end` now gives no tick for it.

The hover keeps the snap settings it was made with (`SnapSettings` in
guides/snap.rs: the window, zoom, snapping options, tolerances,
Alignment Guides and construction angles). After one of them changes
under a still pointer, the hover's rubber band, protractor, distance
label and Smart Guides are hidden until the pointer moves, also through
a press, so the preview shows no point that a click would not place.
A press also drops the hover, so after a click puts an arc's end on a
tick no preview runs from that end back to the pointer. While the
pointer hovers, the tool asks the canvas to hover it again when the
view, the document or the selection changes (`wants_rehover`).
2026-11-21 13:27:49 -08:00
dotCooCoo d2fdc9728a Pen: Quick Pen marks an arc's center with a cross while the arc is drawn
Wherever the Quick Pen tool shows an arc's protractor (while the arc is
dragged, or as the piece the next click adds), it also draws a small cross at
the arc's center, as the circle and three-point arc tools draw theirs. The
cross is VectorCraft's own behavior.

Adds a test for the cross while hovering and dragging.
2026-11-21 11:19:09 -08:00
dotCooCoo 81c7578cf0 Pen: Quick Pen shows a protractor around an arc's center and snaps to its ticks
While an arc is drawn, by a drag or as the piece the next click adds, the
Quick Pen tool shows a protractor around the arc's center: a tick every 15°
from where the arc starts, a longer one every 90°, and one where it ends. The
piece the next click adds shows its protractor only while Enable Rubber Band
for the Pen tool shows that piece.

With Smart Guides on, the end of a continuous arc snaps onto the nearest tick
of its protractor, on the same circle, when the tick lies within the snapping
tolerance of the pointer, no other Smart Guide snaps the point, and neither
Snap to Grid nor Snap to Pixel snaps drawn points. A sharp-corner arc sweeps
its arc size, so its end does not snap. Shift does not constrain Quick Pen
points, so it does not change the snapping. The protractor, its 15° step and
the snapping are VectorCraft's own behavior.

The Smart Guides targets now also report whether a point landed on one of
them (`Targets::snap_hit`), so a target whose label or line is hidden still
takes precedence over a tick.

Adds tests for the arc's circle, the tick snapping by drag and by click and
its precedence, and the protractor during a drag and while hovering. Also adds
tests of existing Quick Pen behavior: a point snapping to a Smart Guide, and
the distance label shown while hovering.
2026-11-21 11:18:45 -08:00
dotCooCoo 05c8c7df95 Quick Pen: a length drag that keeps the length records no undo step
A drag across a line's length handle leaves the line's length as it
was. It started an interaction and previewed the path anyway, so letting
go recorded an undo step for an unchanged path. The drag now previews
nothing until the length changes.
2026-11-20 07:55:55 -08:00
dotCooCoo 01f1ffa4cb Quick Pen: choosing the tool again during a length drag keeps the drawing
Choosing Quick Pen while a length drag was under way cleared the drawing, so the next preview of the drag carried no path. The drawing is now cleared only when neither a press nor a length drag is active.
2026-11-19 18:11:43 -08:00
dotCooCoo 88e3575a1e Quick Pen: a length drag ends where the pointer is let go and ignores outside edits and piece keys
The end handle's drag now applies the release position before it ends, so a press let go
away from the handle without a drag event still changes the length. An edit made outside
the tool during the press ends the drag, so a later preview does not overwrite it. C and
[ ] do nothing until the drag ends. A selected compound path shows the length handles of
the paths it holds, and path.quickPenLength checks its result against the same canvas rule
as the drag.
2026-11-19 17:22:09 -08:00
dotCooCoo 2d3be0f514 Pen: Quick Pen drags move a selected path's anchors and segments, and its context menu deletes
With no path being drawn, the Quick Pen tool edits the selected paths, as the
help page describes ("Drag the anchor points or the path to edit the object",
and right-click Delete to remove a path):

- A drag on an anchor moves it, and a drag that starts on one of several
  selected anchors moves them all; a drag on a segment moves its two ends.
  The tool selects what it moves (select.anchors or select.segments) and
  sends path.moveAnchors with interpolate, one undo step per drag, so a
  segment with one moved end is turned and scaled to its new ends: a line
  stays a line and an arc an arc of the same angle. A dragged anchor snaps
  to Smart Guides. Escape during the drag takes it back.
- A click on an anchor selects it alone, and Shift-click adds it to the
  selected anchors or takes it out. A click on an open end still goes on
  drawing from it (with the path selected whole again), a drag there moves
  the end, and a click on a segment starts a new path.
- With the Quick Pen chosen, the canvas context menu has Delete
  (edit.clear), which removes the selected anchors or objects.

The cursor shows what a press does over an anchor, a selected anchor, an
open end or a segment. While a path is being drawn, a press adds a piece as
before. Which presses select and which move, and the drag snapping only an
anchor, are VectorCraft's own rules.

Docs: docs/mcp.md, ROADMAP, docs/target-app-parity.md, docs/ui-parity.md,
crates/tools/src/cursors.toml.

https://helpx.adobe.com/illustrator/web/add-and-edit-artwork/draw-and-edit-paths/draw-with-quick-pen-tool.html
2026-11-19 17:19:01 -08:00
dotCooCoo bcc8bcf6cc Quick Pen: a length drag measures the curve against the canvas, not its handles
A cubic earlier in the path whose handle lies past the canvas while the curve stays on it no
longer blocks every length drag at the end of the path.
2026-11-19 15:37:10 -08:00
dotCooCoo 853c85ae4f Merge main into feat/quick-pen-length-handles 2026-11-19 15:15:26 -08:00
bflatastic 864ef2f200 Merge main into #8763
# Conflicts:
#	docs/target-app-parity.md
2026-11-20 05:45:14 +07:00
dotCooCoo f9367c4c10 Pen: Quick Pen handles at a path's ends make its line or arc longer or shorter
The Quick Pen tool shows a handle beyond the start and the end of the
path being drawn, or, while none is, of the selected path, where that
end is a straight line or a circular arc. Dragging the handle changes
the length of the line or arc there, as the Quick Pen help page
describes:
https://helpx.adobe.com/illustrator/web/add-and-edit-artwork/draw-and-edit-paths/draw-with-quick-pen-tool.html

- A line keeps its other point and its direction. An arc keeps its
  other point, its circle and the way it turns; its sweep follows the
  pointer around the circle, up to 359 degrees. A drag stops where the
  path would reach past the canvas.
- Each drag is one undo step, and Escape during the drag takes it back.
  The path being drawn goes on from the new end. The pieces the drag
  does not change stay pieces, so C and [ ] still change the last one,
  and a dragged last arc keeps at least 1 degree.
- A click on a handle that does not drag adds a point, closes the path
  or starts one, as a click anywhere else does.
- path.quickPenLength {id, subpath?, end?, length} sets the same length
  for agents and scripts (params text and docs/mcp.md).

The handle's place 20 screen points beyond the end, the 359 degree
limit, the 1 degree minimum, Escape during a drag, the handles on a
selected path and the dragged end not snapping to Smart Guides are
VectorCraft's own rules.

Part of #2660 (reported by earlvanze).
2026-11-19 13:59:39 -08:00
dotCooCoo beb2fab945 Pen: state which Quick Pen edits end the path, and redraw tests
docs/mcp.md now says that an edit made by another command during a
drag ends the path whether it changes the path or other art, and that
with the realTimeDrawing preference off such a press adds no piece
while the edit stays. A flip or size change made during a drag is part
of that piece's undo step; one made between presses is its own step.
The paragraph is wrapped at the file's width again.

The progress line lists a dragged piece ending at the release point and
C, [ and ] changing the arc being dragged with VectorCraft's own rules.

The bracket test checks that the arc being dragged is drawn again, the
drag test checks that the next click starts a new path, and new tests
cover an edit to other art during a click and an edit during a drag
with realTimeDrawing off. The tool no longer keeps the path as it was
before a press once the press ends.
2026-11-19 12:40:04 -08:00
dotCooCoo 28685c64d0 Pen: Quick Pen drags end where let go and keep outside edits
A dragged piece now ends where the press is let go, also when the
pointer moved after the last drag event, and a press let go a drag's
distance away with no drag in between places the piece there.

An edit made to the path by another command during a press (a point
moved, its stroke changed) ends the path: the next drag no longer
previews the stored path over the edit, and the press keeps the
document as it is. An edit made to other art during a drag stays too,
and the piece stays as last shown.

C and the bracket keys change the sharp-corner arc being dragged, inside
the press's one undo step. Typed brackets now reach the Quick Pen while
a press is under way.

With Align New Objects to Pixel Grid on, the tool goes on drawing the
same path: it compares the path with what the document held after its
own last edit, and each piece is drawn on the points the path already
has, so earlier points keep their place on the grid.

Follows #8690.
2026-11-19 11:00:57 -08:00
dotCooCoo b423ce5855 Quick Pen: on-canvas toolbar with its actions, Flip Arc and More menu
Selecting the Quick Pen tool shows a toolbar on the canvas. Straight
Line, Continuous Arc and Sharp Corner Arc set the tool's action, Flip
Arc flips the last sharp-corner arc as C does, and More Options has
Hide Toolbar, Pin Toolbar Position and Reset Toolbar Position. The
handle at its left end drags it.

While a path is being drawn, the toolbar sits beside the path's last
point, 24 screen points off it on the side the path heads toward, or on
the other side where that side runs off the canvas. With no path being
drawn, it sits at the bottom center of the canvas. A drag's offset
applies in the kind of place it was made in (beside the drawing or
resting), and not where it would cover the path's last point. Pinned,
it stays at its place in the canvas window. It hides while a press
drags on the canvas, and its controls wrap in a canvas pane narrower
than the toolbar. Hide Toolbar hides it until the tool is selected
again; Window › Quick Pen Toolbar also shows or hides it.

- Tool::drawing_end and Session::tool_drawing_end give the point the
  path goes on from and the direction it arrives in.
- New desktop commands: window.quickPenToolbar, window.quickPenToolbar.pin,
  window.quickPenToolbar.reset and tool.quickPen.flipArc; ui.inspect
  reports quickPenToolbar.
- Labels in every catalog.

Docs: docs/mcp.md, docs/control-protocol.md, ROADMAP, docs/ui-parity.md,
docs/target-app-parity.md. Part of #2660.
2026-11-19 10:04:07 -08:00
dotCooCoo df614fb80c Pen: Quick Pen tool draws lines, continuous arcs and sharp-corner arcs
A new tool in the Pen tool's group, chosen with Alt+P (Option+P on
macOS), draws paths of straight lines and circular arcs, as the Quick
Pen help pages describe:
https://helpx.adobe.com/illustrator/web/add-and-edit-artwork/draw-and-edit-paths/draw-with-quick-pen-tool.html
https://helpx.adobe.com/illustrator/web/add-and-edit-artwork/draw-and-edit-paths/quick-pen-tool-keyboard-shortcuts.html

- A click sets the start point; each click, or a press dragged to where
  it is let go, adds a line, a continuous arc (it leaves the last point
  in the path's direction) or a sharp-corner arc, as the tool's action
  says. Each piece is one undo step.
- Alt (Option) pressed and let go on its own switches to the next
  action. C flips the last sharp-corner arc to the other side of its
  chord, and [ and ] make the arc size 15 degrees smaller or larger.
- A click on the first point closes the path, a click on an end of an
  open path continues it, and Escape or Enter ends it. An edit made to
  the path from outside the tool also ends it.
- path.quickPen {start | id, subpath?, keep?, pieces, closed?} draws
  the same path for agents and scripts. The action and arc size are
  kept with the preferences.

The 180 degree default arc size, its 15 degree steps, the side an arc
bulges to and Enter ending the path are VectorCraft's own rules.

Part of #2660 (reported by earlvanze). Not yet: the on-canvas toolbar,
dragging a path's ends to change its length, Ctrl+scroll for the arc
size, and editing and deleting with the tool.
2026-11-19 01:29:06 -08:00