Commit Graph
1399 Commits
Author SHA1 Message Date
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 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 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
dotCooCoo d1b2fb9de5 Merge main into fix/select-widget-drags-settle 2026-11-20 14:34:25 -08:00
dotCooCoo 3023335b59 Mesh: picked points stay picked between the mesh-point tools
Gradient mesh points picked with the Mesh tool, Direct Selection, the
Lasso or the Polygonal Lasso now stay picked when another of these tools
is chosen, and when one of them lends Direct Selection for a Cmd/Ctrl
click, so a fill color chosen afterwards recolors just those points.
Before, only a switch to or from the Eyedropper kept them. Any other
tool, Group Selection included, drops them.

Session::switch_tool, lend_selection_tool and give_back_tool share one
test of which tools pick mesh points. Giving the tool back leaves the
lender's picks alone when they did not change, so the Mesh tool keeps
the point whose handles it shows.

Tests: crates/engine/src/tests/mesh_picks.rs.
Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-20 14:14:48 -08:00
dotCooCoo 90130f37ed Shape tools: the Smart Guide label of a hover goes when the pointer leaves the canvas
With Smart Guides on, hovering a shape tool over another object's anchor
or edge shows the "anchor" or "path" label where the new shape would
start. When the pointer then left the canvas, went under a panel or
menu, or a middle-button drag started panning, the label stayed on the
canvas at the last hover point. The Rectangle, Rounded Rectangle,
Ellipse, Polygon, Star and Line Segment tools now drop it when their
hover ends, and so do the Arc, Spiral, Rectangular Grid and Polar Grid
tools, as the Scissors tool already does.
2026-11-19 20:55:39 -08:00
bflatastic 0810ac5b87 Merge remote-tracking branch 'origin/main' into fix/8001
# Conflicts:
#	crates/mcp/src/ui_catalog.rs
#	crates/ui-egui/src/menus/ui_commands.rs
#	docs/roadmap.md
2026-11-20 05:47:07 +07:00
bflatastic 864ef2f200 Merge main into #8763
# Conflicts:
#	docs/target-app-parity.md
2026-11-20 05:45:14 +07:00
BFlat 4df756cc9a Merge pull request #8719 from Hassan1305/feat-8363-trim-view-guides
View: Trim View hides the guides and the grid while it is on (#8363)
2026-11-20 05:38:32 +07:00