Commit Graph
230 Commits
Author SHA1 Message Date
bflatastic 864ef2f200 Merge main into #8763
# Conflicts:
#	docs/target-app-parity.md
2026-11-20 05:45:14 +07:00
dotCooCoo b585b75109 Live Paint: the bucket keeps its colors through the stop eyedropper and a Cmd-click
The proxies and the paint commands that name no objects stood for the Live
Paint Bucket's colors only while the bucket itself was the active tool. Two
tools that work for the bucket lost them:

- The Gradient panel's eyedropper on a stop of the bucket's gradient: the
  stop was deselected as soon as the Eyedropper became active, and the click
  then copied the clicked object's appearance onto the selection.
- A Cmd-click with the bucket, which the Selection tool takes: with New Art
  Has Basic Appearance off, the new selection's appearance replaced the
  bucket's fill and stroke.

Session::bucket_paints() now answers for the bucket, the Eyedropper armed
for a stop of its gradient (Tool::returns_to), the Selection tool lent to
either, and the actions of the Eyedropper's click that end by switching back
to the bucket. Every check that compared the tool id with the bucket's now
uses it: the proxies, the Stroke panel, the selected stop's owner, new-art
inheritance, previews and their cancel.

- The armed pick ends without sampling, and switches back to the bucket,
  when its stop is no longer selected or no longer exists.
- Clicking the panel's eyedropper again while a pick is armed keeps the tool
  the pick returns to.
- The Color panel's cached mixed state is keyed on bucket_paints().
- A Brush Options Key Color pick or an Image Trace ignored-color pick armed
  from the bucket is not a stop pick.

Tests: live_paint_bucket_keeps_its_colors_through_the_stop_eyedropper_and_a_cmd_click
(engine), the stop option test (tools), the stop eyedropper and mixed
selection tests (ui-egui). Docs: docs/mcp.md, the Live Paint Bucket
paragraph.
2026-11-19 10:05:22 -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 5d458d3142 Merge main into feat/arc-by-points 2026-11-19 05:12:59 -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
BFlat c03765a22d Merge pull request #8571 from dotCooCoo/fix/dimension-levels-linear
Dimension tool: only a linear dimension reads the dimension lines
2026-11-19 15:02:00 +07:00
BFlat 7784d2f1a5 Merge pull request #8528 from dotCooCoo/feat/curvature-circle
Shapes: the Curvature Circle tool draws the circle a path bends along
2026-11-19 15:01:28 +07:00
BFlat 6ccbf05651 Merge pull request #8361 from dotCooCoo/feat/control-bar-shape-widgets
Control bar: Hide Shape Widgets hides the selected live shapes' widgets
2026-11-19 14:57:37 +07:00
dotCooCoo d3696410d8 Dimension tool: levels come from the document the next preview applies to
While a linear dimension is placed, each preview starts again from the
document as the placement began. The tool now reads the lines of the
other dimensions from that document (the new ToolContext field
interaction_doc), not from the document a command changed in between, so
a dimension that a command moves or hides and that the next preview puts
back does not leave the placed dimension on a level the committed
document does not have.

The engine test now drags a dimension out, runs dimension.update or
object.hide on the other dimension, releases, and checks the committed
line against that dimension as the document has it. The tool test that
checks which dimensions read lines also covers radius and diameter
dimensions.
2026-11-18 18:00:26 -08:00
dotCooCoo f5b2dfa8b4 Merge main into feat/curvature-circle 2026-11-18 17:15:45 -08:00
dotCooCoo f4071dd56a Merge main into feat/image-trace-split-view 2026-11-18 15:58:59 -08:00
dotCooCoo cf4dd8b375 Merge main into feat/control-bar-shape-widgets 2026-11-18 14:13:10 -08:00
dotCooCoo 275dff5d31 Merge main into feat/arc-by-points 2026-11-18 10:30:34 -08:00
BFlat 981b2b1db3 Merge pull request #8586 from storytold/fix/type-overlay-font-race
tests: Type tool layout counts no longer race tests that add fonts
2026-11-19 01:17:56 +07:00
BFlat b8463c946f Merge pull request #8252 from dotCooCoo/feat/polygon-side-widget
Shapes: dragging a live polygon's side widget changes its number of sides
2026-11-19 00:40:12 +07:00
bflatastic ee285c67a5 tests: Type tool layout counts no longer race tests that add fonts
The tests that count the layouts the Type tool keeps read vectorcraft_text::layout_inputs()
through its cache key. Tests in the same binary that add a font or change the hyphenation
exceptions bump it, so a count running beside one saw every frame laid out again
(type_overlays_keep_at_most_frame_layouts_max: 2051 instead of 2). Counting tests now hold a
shared test-only lock for reading and tests that change those inputs hold it for writing.
2026-11-18 23:43:02 +07:00
dotCooCoo 0dd0424173 Merge main into feat/arc-by-points 2026-11-18 07:35:11 -08:00
dotCooCoo 82477564d7 Merge main into feat/control-bar-shape-widgets 2026-11-17 22:54:38 -08:00
dotCooCoo bec193c6bc Merge main into feat/polygon-side-widget 2026-11-17 22:44:14 -08:00
dotCooCoo 8f8ac96b8f Merge main into feat/artboard-edge-button-tooltips 2026-11-17 22:11:30 -08:00
BFlat 62d9937c75 Merge pull request #8448 from dotCooCoo/feat/circle-tool
Shapes: the Circle tool draws a circle through two or three points
2026-11-18 13:09:51 +07:00
BFlat d9ad978f23 Merge pull request #8471 from dotCooCoo/feat/pen-info-handle-drag
Pen: the Info panel shows W, H, D and the angle while a drag pulls out a handle
2026-11-18 13:01:06 +07:00
BFlat e8b507aaee Merge pull request #7366 from dotCooCoo/fix/tool-set-option-errors
Tools: setting a tool option with a bad value returns an error
2026-11-18 12:58:18 +07:00
dotCooCoo de29baab11 Shapes: the Curvature Circle tool draws the circle a path bends along
The Curvature Circle tool, after the Circle tool in the Ellipse tool's
flyout, draws the circle that touches a path at a point and bends as the
path bends there, with shape.curvatureCircle. The pointer snaps to the
nearest path that is not a guide within 5 screen points, or within the
Smart Guides snapping tolerance when that is larger, and the tool shows
the circle as a dashed outline (solid once it is more than 50,000 screen
points around), its center, a line from the center to the point it
touches and, with Measurement Labels on, its radius. A click draws the
circle in one undo step, on the side the path bends toward; Shift held at
the press puts it on the other side. A press dragged 2 screen points or
more, or canceled with Escape, draws nothing.

A segment that is the usual cubic of a circular arc of 90° or less gives
a circle with the arc's own radius, shown with an asterisk, so a click on
a circle drawn with the Ellipse tool draws that circle. On a straight
segment, at a cusp or a corner anchor, or where the circle would reach
past the canvas, the pointer shows "Straight segment", "Cusp" or "Circle
too large", and a click draws nothing. An anchor is a corner when the
segments meet there at more than half a degree and it is not marked
smooth; segments of no length between them are passed over. The tool's
icon is new and drawn for VectorCraft.

shape.curvatureCircle takes the path, subpath, segment, t and convex, and
returns the circle's center and radius and whether the radius is an
arc's own. A guide is refused.

draw2::candidate_paths skips the selected paths with a hash set, so it
takes time linear in the number of paths on each pointer move.

Part of #7178.
2026-11-17 20:18:05 -08:00
dotCooCoo 84a5ff6b3e Merge main into feat/artboard-edge-button-tooltips 2026-11-17 19:58:57 -08:00
dotCooCoo 7b8e9610c6 Merge main into feat/polygon-side-widget 2026-11-17 19:40:41 -08:00
dotCooCoo 83895dd3f4 Merge main into feat/control-bar-shape-widgets 2026-11-17 19:18:28 -08:00
BFlat f09d81b8b3 Merge pull request #8250 from dotCooCoo/feat/pen-chosen-again-ends-path
Pen: choosing the Pen again while a path is being drawn ends that path, as Escape does
2026-11-18 10:11:37 +07:00
dotCooCoo a5b3a216df Pen: the Info panel shows W, H, D and the angle while a drag pulls out a handle
While a Pen drag past the drag threshold shapes a handle, the Info
panel shows the change in x and y, the distance and the angle from
the anchor to the handle's end: the outgoing handle of a new, added
or last anchor, and the incoming handle of the first anchor when the
drag closes the path. Shift gives the constrained handle and Space
moves the anchor with it. The readout clears on release, a dropped
press and a tool change.
2026-11-17 14:52:13 -08:00
dotCooCoo c1139c7a2d Tools: a Three-Point Arc tool draws an arc between two ends and a third point
The Three-Point Arc tool, after the Arc tool in the Line Segment tool's
group, places two ends by a drag or two clicks, then a third point. The
arc passes through the third point, or with Third Point Sets Direction on
it leaves the first end heading toward it, or with Alt arrives at the
second end along the line from it. The setting is in the tool's Tool
Options (a double-click on the tool), and ] switches it while drawing.
The tool previews the arc, its center and radius, and shows "Arc too
large" where no arc fits.

shape.threePointArc {start, end, through | toward, at?} draws the open
arc in one undo step and refuses points with no arc, malformed points,
both or neither of through and toward, an at other than start or end,
and an at given with through.

Part of #7178.
2026-11-17 13:41:29 -08:00
dotCooCoo e6ec393062 Shapes: the Circle tool draws a circle through two or three points
The Circle tool, in the Ellipse tool's flyout, draws a circle with
shape.circleThroughPoints. A drag from one point to another, or a click
on each, draws the circle with the two points as the ends of a diameter.
A click on a first point, then a press on a second point dragged to a
third, draws the circle through the three. Shift keeps the second point
at 45° steps from the first. For a circle on two points, Alt rounds the
diameter to the nearest ruler tick at the current zoom in the General
unit. Each point snaps to Smart Guides. Until the release the tool shows
the circle as a dashed outline (solid once it is more than 50,000 screen
points around), a cross at its center, a line from the center to each
point and, with Measurement Labels on, the diameter by the pointer.
Three different points on one line, or a circle past the canvas, show
"Circle too large" by the pointer instead, and the release draws
nothing. Escape, a dropped press, and an edit, Undo or Redo made outside
the tool drop the first point. A second press within 3 screen points of
the first point, or one that snaps to it, places nothing when let go
there, and draws the circle on the diameter it drags out when dragged.
Each circle is one undo step. The tool's icon is new and drawn for
VectorCraft.

shape.circleThroughPoints also takes two points, or two selected anchor
points, as the ends of a diameter. Its two errors about the number of
points now say "two or three", in every catalog that translates them.

Part of #7178.
2026-11-17 13:29:12 -08:00
dotCooCoo 623d0b48e7 Merge main into feat/polygon-side-widget 2026-11-17 09:45:34 -08:00
dotCooCoo ac2a05f358 Merge main into feat/control-bar-shape-widgets 2026-11-17 09:06:54 -08:00
dotCooCoo a8b658a33e Merge main into fix/tool-set-option-errors 2026-11-16 20:33:41 -08:00
dotCooCoo 4c1d696935 Merge main into feat/artboard-edge-button-tooltips 2026-11-16 19:57:02 -08:00
dotCooCoo 0904472ffc Control bar: Hide Shape Widgets hides the selected live shapes' widgets
With the Rectangle, Rounded Rectangle, Ellipse, Polygon or Star tool, the
Control bar starts the tool's options with a Hide Shape Widgets button,
which reads Show Shape Widgets while the widgets are hidden
(`view.shapeWidgets {on?}`). Hidden, a selected live rectangle's or
polygon's corner widgets, a live ellipse's pie widgets and a live
polygon's side widget are not drawn, and the Selection tool and the shape
tools do not answer a press, a double-click or the cursor on them. The
bounding box and its handles, the center point and Direct Selection's
corner widgets (View › Hide Corner Widget) stay as they are.

The setting is on by default, saved with the interface state and kept
across tool switches; it adds no undo step. Its scope beyond the shape
tools, its default and what it leaves shown are VectorCraft's own rules.

The help page describes the button:
https://helpx.adobe.com/illustrator/using/live-shapes.html
2026-11-16 15:45:34 -08:00
dotCooCoo 963dd42d1a Pen: choosing the Pen again while a path is being drawn ends that path, as Escape does
P, a click on the active Pen's button and `tool.select {tool: "pen"}`
now end the path being drawn through the same cleanup as Escape: the
path stays open and selected (a path inside a compound path leaves the
compound path selected), the Pen stays chosen, no undo step is added,
and the next click starts a new path. An anchor or handle being dragged
is committed first. With no path being drawn nothing changes.

Before this change the Pen kept drawing the same open path when it was
chosen again; the Blend test that stated that rule now checks the new
behavior.
2026-11-16 14:13:32 -08:00
dotCooCoo 3addb0940f Shapes: dragging a live polygon's side widget changes its number of sides
A selected live polygon shows a small diamond beside the middle of the
right side of its bounding box, with the Selection tool and with the
Rectangle, Rounded Rectangle, Ellipse, Polygon and Star tools, while the
bounding box and edges are shown. Dragging it sets the side count from 3
to 11: down adds a side and up removes one for every 12 screen pixels
along the box's own vertical axis, and the pointer shows the count while
measurement labels are on. A polygon of more than 11 sides keeps its
count until the drag goes up, which gives it 11. The drag sends
object.setLiveShape {sides} in one undo step, none when the count ends
where it began, and Escape puts the count back. Typed counts keep their
3 to 1000 range. The widget is drawn only while the box is drawn, so it
hides during a move, a turn and its own drag.

The help page describes the widget and its 3 to 11 range:
https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/modify-live-shapes/add-or-remove-sides-from-polygons.html
The widget's look and place, the drag direction, the step and the rule
for more than 11 sides are VectorCraft's own.

Docs: docs/target-app-parity.md and docs/ui-parity.md.
2026-11-16 14:06:47 -08:00
dotCooCoo 54538090ce Trim at Crossings: the tool is in the Scissors tool's flyout and shows a knife cursor
The Trim at Crossings Tool joins the Scissors group in both shipped
toolbars, after the Knife, and stays in Object › Plug-ins › Path
Precision Tools. The All Tools drawer lists it once, in the Scissors
group, and Edit › Keyboard Shortcuts › Tools lists it once. It has no
default shortcut. A toolbar the user already edited keeps its saved
layout; Reset Toolbar adds the tool.

The Knife's cursor is now drawn as a knife, its blade's point on the
hotspot, instead of borrowing the crosshair. The Knife tool and the Trim
at Crossings Tool both show it. Use Precise Cursors still shows the
crosshair.

Suggested by erolka and leanma.
2026-11-16 09:26:29 -08:00
dotCooCoo 24f064b01e Image Trace: Split View shows the source image and the result on either side of a divider
A sixth Image Trace View, Split View, draws the source image on the part
of the image left of a divider across it, and the tracing result
everywhere else, art past the image's edges included. The divider
follows the image's own width, so it turns with the image, and it works
at any zoom and view rotation. Each side is drawn once under a plain
clip; exports, printing and Expand still draw the tracing result.

- imageTrace.setView takes view "split" and split (0 to 1, default
  0.5). A split outside 0 to 1, or one that is not a number, is an
  error. The object keeps the divider when another view is set and when
  it is traced again, and setting the same view and divider adds no
  undo step.
- With one such object selected, the Selection tool drags the divider
  as one undo step, and Escape cancels the drag. The divider is hidden
  and cannot be dragged with the bounding box hidden or in Outline mode.
- The Image Trace and Properties panels show a Divider slider that the
  arrow keys move a percent at a time, named for screen readers.
- The catalogs gain rows for Split View and Divider (all but gu, which
  has no Image Trace rows).
2026-11-16 08:32:58 -08:00
dotCooCoo 43cb6f0c0c Merge main into fix/tool-set-option-errors 2026-11-15 23:28:59 -08:00
dotCooCoo 4200156914 Repeat: a selected Radial Repeat has handles for its instances and radius
With one radial repeat selected, the Selection tool shows a handle below
it and a handle on its circle between the first two instances. Dragging
the first one down adds an instance for every 16 px and dragging it up
removes them (1 to 1,000). Dragging the second one outward or inward
makes the radius larger or smaller (0 or more); only the part of the drag
along the line from the center counts. Each drag previews and commits
object.repeat.options as one undo step, Escape cancels it, and a drag
that ends where it began leaves no undo step. The handles hide with the
edges or the bounding box and for a locked or hidden repeat, and
bounding-box handles keep priority where they meet, as with Grid Repeat.
2026-11-15 23:18:17 -08:00
BFlat 9ed7881caa Merge pull request #8027 from dotCooCoo/feat/polygonal-lasso
Add Polygonal Lasso as an optional tool
2026-11-16 12:55:07 +07:00
dotCooCoo 144aec7dfc Merge main into fix/tool-set-option-errors 2026-11-15 20:22:03 -08:00
BFlat 59771c6566 Merge pull request #8002 from dotCooCoo/fix/tool-overlays-long-drag-copies
Tool overlays: long drags keep their line in shared pieces instead of rebuilding it every frame
2026-11-16 10:35:26 +07:00
dotCooCoo 763be536f5 Add Polygonal Lasso as an optional tool
Polygonal Lasso selects anchor points inside a loop of straight
segments. Each click sets a vertex, and a segment from the last vertex
follows the pointer. A double-click, Enter or a click on the first
vertex closes the loop. Backspace or Delete removes the last vertex,
Escape drops the loop, and Shift keeps the next segment to 45-degree
steps from the Constrain Angle. Shift held at the first click adds to
the selection and Alt subtracts from it, as with the Lasso. A loop of
fewer than three vertices selects nothing and records no undo step.

The tool is listed under its own heading in All Tools and under
Object › Plug-ins › Polygonal Lasso, with no default toolbar slot or
shortcut. On close it uses the Lasso's test for which anchor and mesh
points are inside (even-odd), now shared as lasso_select; the Lasso
itself behaves as before.

Touch mode now counts Polygonal Lasso and Enclosing Lasso as selection
tools, as it counts the Lasso, so the two-finger tap switches from them
to the drawing tool chosen last.

Fixes #4736
2026-11-15 19:17:09 -08:00
BFlat 844f57a209 Merge pull request #7953 from dotCooCoo/feat/trim-hover-preview
Path Precision Tools: Trim at Crossings shows the stretch a click would remove
2026-11-16 09:32:44 +07:00
dotCooCoo 6a692299d0 Tool overlays: long drags keep their line in shared pieces instead of rebuilding it every frame
The line that a round Eraser, the Knife, the Path Eraser, the Pencil with
Live preview off or a smoothing drag shows was one path of every point,
copied, flattened and tessellated again each frame, and with the
Eraser's Size following the pen each step was a new path each frame.

- A drag of more than 64 segments now shows in pieces of 64 segments,
  each also holding the next piece's first segment so wide lines join
  as one. Pieces the drag has passed come back as the same shared path,
  and the canvas reuses their triangles while the view stays the same;
  only the last piece is built again, and only when it changed.
- With Size following the pen, each step is kept as its own shared path
  and only a new or moved step is built.
- The Knife's pieces carry where the dash pattern starts, so the dashes
  run on across pieces (Overlay::SharedPath gains `dash`).
- The smoothing band is shared until it changes.

The canvas still copies the kept triangles into each frame. Release
commands (path.eraseRegion, path.knife, path.eraseSegments,
path.freehand) are unchanged.
2026-11-15 15:36:57 -08:00
dotCooCoo 5bba196c4f Path Precision Tools: Trim at Crossings shows the stretch a click would remove
Hovering with the Trim at Crossings Tool draws in red the stretch a click
there would remove, on the same paths and by the same rules as the click,
and nothing over empty canvas or hidden and locked paths. A drag draws
every stretch its rectangle or freehand line would remove while it
reaches at most 32 paths. In isolation mode only paths inside the
isolated object are highlighted.

What a pick removes moves from the command into
vectorcraft_tools::addons::trim::plan, which the command and the tool
both use. A preview spends at most a twentieth of the crossing work a
click may (Work::share); past that it shows nothing, and the click or
release still removes what it reaches. The tool keeps the crossings it
found for the document as it is, so moving along one path does not
search again, and kept crossings still count against a pick's work
budget. Work::spent_since and Work::draw in vectorcraft-pathops measure
and charge that work.

Docs: docs/mcp.md, docs/ui-parity.md, docs/target-app-parity.md.
2026-11-15 11:24:17 -08:00
dotCooCoo fdeb3a6ab3 Merge main into fix/tool-set-option-errors
# Conflicts:
#	crates/ui-egui/src/toolbar.rs
2026-11-15 09:11:04 -08:00