1405 Commits
Author SHA1 Message Date
BFlat 37610608f1 Merge pull request #8976 from dotCooCoo/fix/smooth-region-rejects-bad-params
Smooth: path.smoothRegion and path.joinScrub refuse a radius, fidelity or tolerance out of range
2026-11-22 11:37:54 +07:00
BFlat 55064f7f59 Merge pull request #8949 from dotCooCoo/feat/dimension-drag-reposition
Dimension tool: a drag from a dimension already drawn moves it
2026-11-22 11:36:34 +07:00
BFlat 1cf0a2806a Merge pull request #9045 from dotCooCoo/feat/quick-pen-arc-protractor-i9314
Pen: Quick Pen shows a protractor around an arc's center and snaps to its ticks
2026-11-22 10:54:06 +07:00
BFlat 3cc55c480e Merge pull request #8994 from dotCooCoo/fix/family-tool-prefs-keep-valid-counts
Tools: restored Spiral, Rectangular Grid and Polar Grid counts keep the current value
2026-11-22 10:52:41 +07:00
BFlat 6ba9e7ab0a Merge pull request #8956 from dotCooCoo/fix/curvature-circle-skip-on-selection
Shapes: the Curvature Circle tool reaches its circles again after Deselect
2026-11-22 10:48:35 +07:00
BFlat 27e413fda5 Merge pull request #8936 from dotCooCoo/fix/dimension-level-snap-checks
Dimension tool: a line at a slight angle or past the distance limit is not a level
2026-11-22 10:46:51 +07:00
BFlat 6e732cbe50 Merge pull request #8922 from dotCooCoo/fix/width-alt-double-click-keeps-selection
Width tool: an Alt-double-click on one of several selected points edits them all
2026-11-22 10:45:10 +07:00
BFlat a6fb037085 Merge pull request #8920 from dotCooCoo/feat/draw-behind-alt-drag-copy
Selection: an Alt-drag copy in Draw Behind goes directly below its original
2026-11-22 10:44:50 +07:00
BFlat 87b37f8bfc Merge pull request #8914 from dotCooCoo/chore/group-member-snap-origin-test
Tests: a selected group member's anchor is the point its move snaps by
2026-11-22 10:44:29 +07: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 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
dotCooCoo c5a98e19f0 Tools: restored Spiral, Rectangular Grid and Polar Grid counts keep the current value
A saved preferences file is restored onto the drawing tools without the
option check that tool.setOption applies. A Spiral segment count or a
grid divider count that was not a whole number (a string, a fraction, a
negative, null) reset the tool to 10 or 5 instead of keeping its
current count. The Arc tool's base axis took any string other than y as
x. Each now keeps its current value for such a value, and a whole
number keeps its existing range.

While a shape is dragged out, an ignored count or axis no longer
replaces the drag's starting value, so Escape puts back the values the
drag started with.
2026-11-21 00:52:40 -08:00
dotCooCoo 239a7d61d0 Smooth: the dashed band shows the radius its release sends at the lowest zooms
The band a smoothing drag shows took the Smooth radius in points without
the 1,000 pt bound the release applies, so below 1.2% zoom it drew wider
than the region path.smoothRegion smooths. It now uses the same bound.
2026-11-21 00:15:55 -08:00
dotCooCoo 49fd8652b1 Dimension tool: a geometry effect on any part keeps a dimension in place
A press on one part of a dimension now also checks its other parts for
a geometry effect, so an effect on an extension line keeps the drag
from moving the dimension (and from drawing the parts again without
the effect). In isolation mode, only art inside the isolated object is
compared with the dimension when the press decides between them.
2026-11-20 23:49:54 -08:00
dotCooCoo 342341a55f Smooth: path.smoothRegion and path.joinScrub refuse a radius, fidelity or tolerance outside its range
path.smoothRegion read a radius below 0 as 0 and moved a fidelity into its
range, and path.joinScrub read a tolerance below 0 as 0. Each now refuses
a value outside its range with an error naming the key, and the document,
the selection and the undo history do not change: radius and tolerance
0.001 to 1000 pt (the Path Eraser's width range), fidelity 0.000078125 to
about 3195 pt (the Smooth tool's 0.05 to 100 px at the highest and the
lowest zoom). A key left out or null keeps its default.

The Smooth, Join and Path Eraser tools, and an Alt smoothing drag with the
Pencil, Paintbrush or Blob Brush, keep what they send within these ranges
at any zoom, also when the interface zoom puts the tool's zoom past the
view's range.

Docs: params text, docs/mcp.md, docs/target-app-parity.md.
2026-11-20 23:42:48 -08:00
dotCooCoo 133a5a4759 Shapes: the Curvature Circle tool reaches its circles again after Deselect
The tool passed over the circles it drew until the undo history moved, the
tool changed or another document became active. Deselect and a pick in the
Layers panel change only the selection, so the drawn circles stayed out of
reach. The tool now forgets them once the selection holds none of them,
after a command run from outside the tool and at the next pointer event.

docs/mcp.md and the tool's module comment name every case that makes the
circles reachable again. The engine's Undo test checks which path the click
hit, and a comment on the set in candidate_paths says the loop skips ids
that are already listed.
2026-11-20 21:54:15 -08:00
dotCooCoo 17517e93a5 Dimension tool: a level is checked across the whole span of both lines
The span a parallel line is checked across now runs from the lowest to
the highest point of both lines along the dimension. It no longer
depends on which end of the other line comes first, and it has no
one-point floor, so a short line that stays within 0.000001 pt of its
level is a level.
2026-11-20 21:27:59 -08:00
dotCooCoo 1be942d7fc Dimension tool: a drag from a dimension already drawn moves it
With no points or lines picked, a press within 8 pixels of what a
visible, unlocked dimension draws (its lines, arrowheads and label),
where it is the topmost object that can be edited, followed by a drag
moves that dimension as one undo step. A segment of the art as near
the press as the dimension's lines and label, or nearer, takes the
press instead, and a click there without a drag still picks a point.
The part grabbed follows the pointer: a linear dimension's line moves
as far across as the pointer moves, an angular arc moves as far as the
pointer moves away from or toward the vertex, and a radius or diameter
line turns about the center as the pointer turns, or toward the
pointer when grabbed at the center. The dimension keeps what it
measures and its link to the art. With Smart Guides on, a linear
dimension's line lands on the level of a parallel dimension line, as
when it is placed, and of two lines on one level the one nearer the
pointer along it wins. Isolation mode, clipping masks and locked artboards
apply as they do to a click; with a part of a dimension isolated, the
dimension is not dragged. A dimension that a geometry effect on it, on
one of its parts or on a group around it draws elsewhere is not
dragged, except in Outline view and on a layer whose Preview is off.

dimension.update takes `at: [x,y]`, which puts a linear dimension's
line through the point, gives an angular arc a radius of the point's
distance from the vertex (at least 12 pt), or turns a radius or
diameter line toward it. With Real-time Drawing off, a dimension.update
preview that names its dimensions outlines only those dimensions.

A dimension pasted into a document that had none now marks the
document as holding dimensions (Document::insert), so the Dimension
tool drags it like one drawn there and edits refresh it. Opening a
native file sets the flag from the objects it holds, which covers files
saved after such a paste.

Docs: docs/dimensions.md, docs/target-app-parity.md.
2026-11-20 20:44:44 -08:00
dotCooCoo 479dd27535 Dimension tool: a line at a slight angle or past the distance limit is not a level
A linear dimension line placed near another dimension's line lands on its
level only when that line is parallel. Before, the check compared the two
directions only, so a long line at a slight angle passed it: with its first
end within the snapping tolerance, the new line landed on a level the other
line had already left, and the guide ran at an angle between the lines. A
line is now parallel when it moves off its level by no more than 0.000001 pt
across the span of both lines.

A level that would put the line more than 1,000,000 pt from its points is
passed over. Before, the tool took it, the preview failed validation and
was not sent, and a click committed the earlier preview position. The next
level within reach is taken instead, or the line goes where the pointer is.

The level guide also needs Smart Guides on when it is drawn, so turning
Smart Guides off before the next pointer move hides it.

The nonparallel case in the placement test now puts the pointer within
reach of the first line's end, so it fails without the parallel check, and
the guide test expects exactly one guide.
2026-11-20 20:42:08 -08:00
dotCooCoo 9eb8cd6146 Merge main into feat/draw-behind-alt-drag-copy 2026-11-20 20:07:57 -08:00
BFlat ddcefb86c9 Merge pull request #8918 from storytold/train/carry8875
Path Precision Tools: the Tangent Circle Tool leaves out a circle that would reach past the canvas (#8875)
2026-11-21 11:00:19 +07:00
BFlat 5b52369187 Merge pull request #8919 from storytold/train/carry8873
Dimension: pointer moves read a compound path's members once per revision (#8873)
2026-11-21 10:58:44 +07:00
dotCooCoo 94f4d54b04 Width tool: an Alt-double-click on one of several selected points edits them all
An Alt-press on a width point's center narrows the selection to that point,
ready to drag a copy. A release without a drag kept it narrowed and did not
remember the earlier selection, so an Alt-double-click on one of several
selected points opened Width Point Edit for that point alone, where a plain
double-click opens it for all of them. A release without a drag now
remembers the earlier selection as a plain click does, and an Alt-drag
still copies only the point under the pointer.
2026-11-20 19:57:05 -08:00
BFlat 9078e13d78 Merge pull request #8867 from dotCooCoo/perf/selection-widgets-kind-first
Selection: on-canvas widgets check an object's kind before its editability
2026-11-21 10:56:16 +07:00
bflatastic 3bda231dd6 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	docs/target-app-parity.md
2026-11-21 10:46:25 +07:00
bflatastic 8daaa2995b Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/tools/src/dimension.rs
2026-11-21 10:43:59 +07:00
BFlat d77b6d9309 Merge pull request #8870 from dotCooCoo/fix/dimension-guide-member-holder
Dimension: a guide member of a compound path does not hold a preview-bounds corner
2026-11-21 10:39:09 +07:00
BFlat 54f256f666 Merge pull request #8634 from dotCooCoo/fix/select-widget-drags-settle
Selection: widget drags read the release point and a tool switch cancels them
2026-11-21 10:38:43 +07:00
BFlat 43e0407cd0 Merge pull request #8891 from dotCooCoo/fix/eraser-drag-midpoint-tip
Eraser: a drag's outline takes the tip halfway along each step in two more cases
2026-11-21 10:36:19 +07:00
BFlat e8b23c5ba9 Merge pull request #8852 from dotCooCoo/fix/mesh-picks-survive-tool-switch
Mesh: picked points stay picked between the mesh-point tools
2026-11-21 10:33:52 +07:00
BFlat a5f9966ca5 Merge pull request #8861 from dotCooCoo/feat/freeform-lines-leave-ends-line
Gradient: moving out of a freeform object ends the Lines mode line
2026-11-21 10:33:27 +07:00
dotCooCoo 2e6976e884 Tests: a selected group member's anchor is the point its move snaps by
A press near an anchor of a member selected inside a group grabs the
member by that anchor, with Smart Guides or Snap to Point on, and a
drag lands that anchor on another object's anchor. The new test covers
the snapping origin that #8091 gave such a press; it fails when
hover_point stops reading selected art under the pointer.
2026-11-20 19:31:34 -08:00
BFlat 9704f52fc8 Merge pull request #8812 from dotCooCoo/fix/shape-tools-smart-guide-labels
Shape tools: the Smart Guide label of a hover goes when the pointer leaves the canvas
2026-11-21 10:31:04 +07:00
dotCooCoo 318d1ed6e2 Selection: an Alt-drag copy in Draw Behind goes directly below its original
In Draw Behind, an Alt-drag of whole objects with the Selection or Direct
Selection tool now puts each copy directly below its own original, in the
original's group or layer, and selects the copies, as the drawing modes help
page lists duplicating by Alt-drag among the actions Draw Behind applies to
(https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/learn-drawing-basics/drawing-modes-overview.html).
The copy of a clip group's or clipping layer's clipping path goes directly
above it, so the clipping path stays the bottom object.

- object.transform takes drawBehind (with copy); the tools send it while Alt
  is held. A value that is not true or false is refused.
- Draw Normal, Draw Inside, object.move, the transform dialogs' Copy,
  Duplicate and Transform Again keep putting copies above.
- Document::insert_below puts nodes directly below their anchors in one pass.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-20 19:19:13 -08:00
BFlat 3f5531a7d3 Merge pull request #8881 from dotCooCoo/fix/dimension-first-pick-link
Dimension: a first Linear point keeps its link when the art moves before the second click
2026-11-21 10:18:42 +07:00
BFlat b724e022cd Merge pull request #8882 from dotCooCoo/fix/type-overlay-layout-count-tests
Tests: font changes on other threads wait while a Type layout count runs
2026-11-21 10:18:32 +07:00
dotCooCoo ce2fd22267 Path Precision Tools: the Tangent Circle Tool works out its circle again after a canceled live edit
A live edit changes the document without an undo step, so the tool was
not told about it. Circles found while a preview moved the second
segment stayed cached under the same segment key, and a click after the
preview was canceled drew the cached circle instead of one touching the
segment where it is again. A first segment picked during a preview kept
its old shape the same way.

The cache key now holds the shapes of the first segment and of the
segments a circle may touch, so moving along an unchanged segment still
reuses the search. The first segment is forgotten when its shape no
longer matches the document, and a press on the second segment follows
the segments as they are at the release; a pressed segment that is gone
leaves nothing to touch.
2026-11-20 19:15:06 -08:00
dotCooCoo 0d1009fab0 Dimension: a first Linear point goes back to its pick when its art is deleted
The first point followed its moved art by overwriting the stored point, so
when that art was then deleted the point stayed at the moved position
instead of where it was picked. The tool now keeps the pick separately and
falls back to it for the marker, the rubber band, Shift and the dimension.
A first anchor whose path is deleted is dropped from the point, so the
second click still places the dimension.
2026-11-20 17:25:58 -08:00
dotCooCoo 873a5562a7 Gradient: a freeform line stays open over its object's stroke on a layer with Preview off
The check for whether the pointer is still on the object hit the object's
painted art with outline off, but the hit test turned outline back on for
a layer with Preview off, so a move onto the stroke past the fill ended
the line. A new HitOptions field, ignore_layer_preview, keeps the point
hit tests from switching to outline for such layers, and the freeform
check sets it. the_stroke_counts_as_the_object now runs with the layer's
Preview on and off.
2026-11-20 17:07:31 -08:00
dotCooCoo 9455a3f10e Dimension: a first Linear point keeps its link when the art moves before the second click
A first point picked on a corner of a path's preview bounds was linked to
the path only at the second click, by fitting the coordinate from the first
click to the path's anchors as they were then. When the path moved in
between, the dimension measured from where the corner had been: picking the
upper-left corner of a stroked rectangle, moving the rectangle 20 points
right and picking its upper-right corner measured 121 points instead of 101.

The tool now records the first point's link at its click (held against the
corner's path, or on the segment under it) and keeps that link for the
dimension while it still resolves. The first point, the rubber band, Shift
and the dimension start from where the art puts the point now, and a first
point on an anchor follows its anchor the same way. A link that no longer
resolves falls back to the point as picked.
2026-11-20 15:56:57 -08:00
dotCooCoo 34c961a5ce Tests: the widget order benchmark checks editability once in its baseline
The baseline of widget_order_perf kept the selection's editable objects and
then asked each widget about the whole selection in the same document, so a
widget that checks editability itself (corners of any path on 128 rectangles
on a locked artboard) measured each object twice. The baseline now asks the
widget about the kept objects in a copy of the document with everything
editable, as the_widgets_are_the_same_as_when_editability_came_first does.
2026-11-20 15:49:07 -08:00
dotCooCoo f88a6b5877 Eraser: a drag's outline takes the tip halfway along each step in two more cases
The outline of an Eraser drag takes, at each step, the tip the pen gives
halfway along it, as path.eraseRegion erases. Two cases still used the
tips at the step's ends:

- A round tip whose Size follows the pen drew each step as wide as the
  mean of the tips at its ends. Where an end is held at the 0.1 pt least
  size, that mean differs from the tip halfway along: with Size 10 pt on
  Pressure by 20 pt, a step from no pressure to full pressure showed
  15.05 pt wide where the release erases 10 pt.
- A pen turned or tilted in place at the last point updated the last
  step only when the tip at that point changed. With Size 10 pt on Tilt
  by 20 pt, tilting from 80 to 85 degrees after an upright point keeps
  the end tip at 0.1 pt while the tip halfway along goes from 12.22 pt to
  11.11 pt, and the outline kept the old one. The area outline now keeps
  and compares the tip halfway along the last step.
2026-11-20 15:47:54 -08:00
dotCooCoo adda7c1c6e Tests: font changes on other threads wait while a Type layout count runs
The Type overlay layout-count tests in vectorcraft-tools held a read lock
that only tests which add fonts or change hyphenation exceptions take for
writing. Other tests still load system fonts on demand (a fallback for a
character no loaded font covers, a cataloged family on first use), which
changes FontDb::global()'s generation, the key of every kept frame layout.
type_overlays_keep_at_most_frame_layouts_max then laid out 2051 frames
instead of 2 in 18 of 21 full `cargo test -p vectorcraft-tools --lib`
runs on Linux.

vectorcraft_text::test_fonts::steady_fonts (test and test-fonts builds
only) now holds back font changes on other threads: adding faces, a
rescan and setting or removing a composite font wait before they publish
anything. A first scan does not wait, and steady_fonts catalogs the
database before it returns. steady_layout_inputs() takes it for the
global database. With it, 0 of 20 full runs failed.
2026-11-20 15:40:31 -08:00
dotCooCoo e60afb9ea3 Path Precision Tools: the Tangent Circle Tool leaves out a circle that would reach past the canvas
A circle tangent to two segments near the canvas edge could show in the
preview and then fail on release, because `shape.circleThroughPoints`
refuses a circle that reaches more than 4,000,000 pt from the origin.
The tool's check of the three points now goes through
`circle::circle_of`, which applies the same bounds, so such a circle
counts as no circle: the note shows, a click draws nothing and the first
segment stays picked.
2026-11-20 15:28:58 -08:00
dotCooCoo 14e22a1dff Mesh: a Lasso click that deselects also unpicks the mesh points
A plain Lasso click away from the art deselects everything but kept the
mesh points the tool held, so the Mesh tool chosen next showed the
deselected points as picked, nudged them with the arrow keys and
recolored them with a fill color. The click now unpicks them. Shift and
Alt clicks still change nothing.

docs/target-app-parity.md also lists the Eyedropper among the tools that
keep the picks, and docs/mcp.md describes the Lasso click.

Test: a_lasso_click_that_deselects_unpicks_the_mesh_points in
crates/engine/src/tests/mesh_picks.rs.
2026-11-20 15:28:27 -08:00
dotCooCoo 662acb72ff Dimension: pointer moves read a compound path's members once per revision
With Use Preview Bounds on, every pointer move near a corner of a
compound path's preview bounds scanned all of its members to find the
one holding that corner. A compound with tens of thousands of members
cost one visit from the walk budget and then a full member scan on
each move.

- The holder of each of the four corners is found in one pass over the
  members when the compound is measured, and cached with the bounds
  for the document's revision. Later moves read it from the cache.
- Measuring an object not yet measured (its geometric bounds, its
  preview bounds and its holders) counts its members against a
  separate limit of 20,000 per move. An object with more members than
  are left gives no corner on that move, and nothing is cached for it.
2026-11-20 15:23:41 -08:00
dotCooCoo 5ca427ff2d Dimension: a guide member of a compound path does not hold a preview-bounds corner
With Use Preview Bounds on, the member of a stroked compound path whose own
box reaches nearest a corner holds the Linear point placed there. A
visible, unlocked member made into a guide could hold it, so the dimension
was linked to the guide, although paths made into guides give no corners.
A guide member now gives no corner, as a hidden or locked member does.
2026-11-20 15:15:06 -08:00
dotCooCoo 125ab66348 Selection: on-canvas widgets check an object's kind before its editability
The type, pie, side count and corner widgets, the Objects on Path, Mirror,
Grid and Radial Repeat controls, the Image Trace Split divider and the
center point now check that a selected object is of a kind that has the
widget before asking whether it is editable. With an artboard locked, the
editability check measures the art of the layer object holding the object,
so a large selected group of another kind was measured on every repaint and
pointer move. The widgets shown are the same.

A test-only counter (vectorcraft-doc feature locked-artboard-count) counts
those measurements; widget_order_tests checks that objects of other kinds
are not measured, compares every widget with the editability-first result
on a mixed document, and holds an ignored timing test, widget_order_perf.
2026-11-20 15:03:29 -08:00
dotCooCoo 2d0389c8fd Gradient: moving out of a freeform object ends the Lines mode line
In freeform Lines mode, moving the pointer out of the object and back
now ends the line being drawn, so the next click on the object starts a
new line. The help page describes this way of starting another line in
the same object:
https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf#page=262

The line ends on the first pointer move, with no button held, that
leaves the object. The object counts as its path's area inside any
clipping masks above it, plus its own painted art (stroke, glyphs);
other art lying over it does not end the line, and outline view, a
layer with Preview off and the path-only selection preferences do not
shrink the area. Escape and a click off the art still end the line.
2026-11-20 14:44:44 -08:00