Commit Graph
8 Commits
Author SHA1 Message Date
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 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 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
bflatastic 864ef2f200 Merge main into #8763
# Conflicts:
#	docs/target-app-parity.md
2026-11-20 05:45:14 +07: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