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`).
With the Selection tool chosen, holding Cmd (Ctrl on Windows and Linux)
now lends Direct Selection, or Group Selection when that was chosen
last, for each press; the Selection tool is back on the release. With
Group Selection chosen, Cmd lends the Selection tool, as it already did
with Direct Selection. Selection & Anchor Display > Command Click to
Select Objects Behind keeps a Cmd press on a selected object, away from
its anchors, handles, mesh points and spine, for selecting the object
behind it. A wide stroke's painted area counts as on the object there.
- The double-click or triple-click after Cmd-clicks goes to the tool
the clicks went to.
- Cmd pressed once a drag is under way lends nothing, and the pointer
stays the active tool's.
- While Cmd is held, the status bar's Current Tool and the help bar
name the lent tool, and the canvas shows the lent tool's marks and
widgets (blend, Shaper, mirror, trace divider and repeat handles) for
the pointer's position in the same frame.
- The help bar has hints for Group Selection.
The helper that finds a selected object's editable parts under the
pointer follows the one in pull request 6597 by SofiaAFigueredo.
Docs: docs/ui-parity.md, docs/control-protocol.md (ui.pointer).
Co-authored-by: SofiaAFigueredo <223278896+SofiaAFigueredo@users.noreply.github.com>
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.
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.
The nine graph tools showed the same column chart, the eight symbolism tools
the same spray can, and Perspective Selection, Slice Selection, Enclosing
Lasso, Polygonal Lasso, the Corner Tool, Slide Anchor Along Path and Shared
Edge Merge each reused the icon of another tool. The 3D Box Tool asked for an
icon that does not exist and showed the dashed placeholder.
Each of these tools now has an original icon drawn in the dc-* style (24x24,
1.5 stroke, round caps) that shows what the tool does:
- Each graph tool draws its own chart type.
- The symbolism tools show symbols being moved, pulled together, resized,
turned, tinted, faded or styled.
- The Lasso and Slice tools get dc-* icons too, so the three lasso tools and
the two slice tools each read as one family. The Enclosing Lasso adds a filled square inside the Lasso's loop,
and the Polygonal Lasso draws the loop with straight sides and keeps the
same knot and tail. The Slice and Slice Selection tools both show a dashed
slice outline with a corner tag, the Slice Tool with a knife beside it and
Slice Selection with a pointer.
- Perspective Selection shows a smaller perspective grid with a pointer.
- The 3D Box Tool uses the cube icon that the 3D and Materials panel uses.
Each new file has an ASSETS.md row.
every_tool_has_an_icon_no_other_tool_uses checks that every cataloged tool,
the add-ons' included, maps to an existing icon that is not the placeholder
and that no other tool uses.
A dimension of a whole path whose line lay across the path, made vertical
or horizontal with dimension.update, now goes as far past the path as it
lay from its first point. Before, its line landed on the path's edge. A
line on the edge to within rounding still counts as outside the path.
When the new place would be more than 1,000,000 pt from the first point,
the update is an error unless it also gives offset, and the dimension is
left as it was. A dimension whose measured node is missing or is not a
path, as in a file that names a node it does not hold, is unlinked at the
next edit.
Tests: a dimension of a whole path saved in a native file and opened
again still follows the path, and one that names a missing node is
unlinked at the next edit; past a corner of the path the side the
pointer is farther out on decides; after the first point Alt picks a
point; a hovered segment's length stays by the pointer at a high zoom.
The line in docs/target-app-parity.md now attributes only the Alt hover
over a path to the linear dimensions help page. Docs: docs/dimensions.md
and dimension.update's params text.
The tool gets an `addPoints` option (Add Points to Existing Paths in its
options, off to start). When it is on, drawing a circle also adds an
anchor point where the circle touches the first segment and the second
segment, splitting them without changing their shape. The anchors and
the circle are one undo step. A touch at an existing anchor adds none.
Alt held at the release turns the option the other way for that
circle, and a dot beside the pointer shows while it is in effect. When
a touched path was not selected, the selection is put back before the
circle is drawn, so Draw Behind places the circle behind the selected
objects.
The option label has a row in every complete catalog.
Part of #7178.
A Pressure or Stylus Wheel stroke whose samples all lie at one point
gave path.blob a spine with no length, and the command failed with
"empty brush stroke". It now paints one dab sized from the first
sample's reading, as a single point does.
When Size changes from Fixed to Pressure or Stylus Wheel during a drag,
the release sends no pressure or wheel for the stroke, so it paints at
the Size. The tip outline now reads the pressure and the pen pose only
when the release reads them, for the Blob Brush and the Eraser.
The Tangent Circle Tool's options dialog and tool.setOption take five more
options, kept with the preferences: center and radii show or hide the
preview's center cross and the lines to the two touch points, color sets
the color of the circle, the cross, the lines and the no-circle note (red,
blue, magenta, green, black or gray), snapTolerance sets how near (screen
pixels, 0 to 25) the pointer picks a segment, and snapWithoutGuides keeps
that reach with Smart Guides off. With Smart Guides on, their Snapping
Tolerance counts when it is larger; with snapping off a segment is picked
within the Selection Tolerance. The help page lists these options:
https://docs.astutegraphics.com/subscribe/tangent-circle-tool
The defaults (both shown, red, 3 px, snapping on) are VectorCraft's own.
With Smart Guides on, the default reach is now their Snapping Tolerance
(4 px) instead of the 3 px Selection Tolerance.
Of the segments within reach the tool now picks the nearest one, not the
first one found, so a larger tolerance does not pick a farther path over
a nearer one. tool.setOption gives an error for an unknown color, a
tolerance outside its range or a value of the wrong type, and sets none
of the values.
Docs: docs/mcp.md, docs/target-app-parity.md, docs/ui-parity.md.
docs/mcp.md and the tool's module comment say that unchecking Snap
with Smart Guides Off does not change the reach when Selection &
Anchor Display's Tolerance is as large as it.
Two test comments now say the cubic's own curvature at the end of a
quarter circle is smaller than the circle's, as their assertions
check.
Smooth Tool Options gets a Smoothness setting under Fidelity, from 0% to
100%, where a higher value leaves a smoother path, as the help page
describes the setting:
https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf#page=164
- path.smoothRegion takes an optional `smoothness` (0 to 100, 50 when
left out). It scales the spread of the averaging done before the
refit in proportion: none at 0, today's spread at 50, twice it at
100. A value outside 0 to 100 is an error and changes nothing.
- The Smooth tool keeps the option with its preferences and sends it
with each drag; Alt smoothing with the Pencil, Paintbrush and Blob
Brush uses it, as it already uses the Smooth tool's Fidelity.
tool.setOption refuses a value outside 0 to 100.
- The default and the way the percentage scales the smoothing are
VectorCraft's own; the default keeps today's strength.
Docs: docs/mcp.md, docs/target-app-parity.md.
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.
Each step of a blend whose keys are blends is a copy of one of them,
which makes its own steps when drawn. The work check before a blend is
evaluated now counts those steps too, with the same count the blend
uses to fit its steps (`vectorcraft_doc::blend::blend_steps_made`), so
a nested blend with more steps than the work left is not evaluated.
Tests check that the blend is not evaluated when the work left is too
little, for a plain blend and for an outer blend of nested blends.
Blob Brush Tool Options' Size menu offers Stylus Wheel beside Fixed and
Pressure. With it the brush is Size - Variation wide at one end of an
airbrush pen's finger wheel travel and Size + Variation at the other, in
a drag, a click and with a tip that is not round. A point without a wheel
counts as half way, and a mouse stroke keeps the Size.
- path.blob takes sizeMode "stylusWheel" with the wheel seventh in each
point, and its error for an unknown sizeMode lists the three modes.
- The tool keeps the mode, records the wheel, and sends it on release.
While the Blob Brush paints, its tip outline takes the size the pen
gives (on Pressure too), and keeps the set angle and roundness. A wheel
turned with the pen held in place updates the last sample.
- The Eraser's Size already offered Stylus Wheel and is unchanged.
Docs: docs/mcp.md, docs/target-app-parity.md.
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.
Before the Eyedropper evaluates a blend to sample its color, it now
counts the steps of every blend the art holds against the work left.
When the steps alone exceed it, the blend is not evaluated and the
sample gives no color. Hover runs this lookup on every pointer move
with Shift held.
The Selection tool's hover outline, and the one it shows when lent to
the Eyedropper with Cmd, now outlines nothing over a selected group
member, where a press keeps the selection. It uses the same rule as
the press (select::selected_under_in).
Tests: blend_steps_count_before_the_blend_is_evaluated and
selection_hover_outline_skips_a_selected_group_member.
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.
With the Linear Dimension tool and Alt (Option on macOS) held, hovering a
path shows a box through its outermost points (a Smart Guide when Smart
Guides are on), with its width and height beside the pointer when
Measurement Labels are on. A click on the path, then a placing click, or a
drag out from it, places a dimension of the whole path. With the pointer
above or below the path it measures the width, between the leftmost and
rightmost points; beside the path it measures the height, between the
topmost and bottommost points. The linear dimensions help page describes
the Alt hover; which side gives which measure is VectorCraft's own rule.
dimension.create takes a new source, {kind: extent, node}, for linear
dimensions. Its points are the outermost points of the segments the path
draws, curves included, and are read again whenever the path changes, so a
turned path shows its new overall width or height. The line keeps its
distance from the whole path when the path changes or is reflected, and
when dimension.update changes the orientation, which now reads the other
pair of points. When the box through the path's outermost points stays
where it was, as after Reverse Path Direction, the line stays on its side.
A version without the extent source does not open a file that holds one.
The measurement label beside the pointer while two points are picked now
keeps its distance in screen pixels at any zoom.
The Help Bar hint names Alt+Click. Docs: docs/dimensions.md and
docs/target-app-parity.md.
Double-clicking the Curvature Circle tool opens Curvature Circle Tool
Options (`tool.options {tool: "curvatureCircle"}`, dialog
`curvatureCircleOptions`). OK sets the options with `tool.setOption`,
and the preferences keep them:
- Snap Tolerance (`snapTolerance`, 1 to 40 screen points, 5) is how
near a path pulls the pointer; Smart Guides' Snapping Tolerance
applies when it is larger.
- Snap with Smart Guides Off (`snapWithoutGuides`) unchecked keeps the
reach within Selection & Anchor Display's Tolerance while Smart
Guides are off.
- Annotate Radius (`annotateRadius`) unchecked hides the radius label.
- Anchors at Standard Positions (`standardAnchors`) unchecked draws a
path with an anchor where the circle touches the path and one every
90 degrees from there (`shape.curvatureCircle {anchors: "touch"}`).
- Use the Radius of Circular Arcs (`constantRadius`) unchecked gives
the cubic's own curvature on the cubic of a circular arc too
(`shape.curvatureCircle {constantRadius: false}`).
The range, the default and the Snap with Smart Guides Off rule are
VectorCraft's own. Every switch is on by default, so the tool draws as
before until an option is changed. The canvas check measures the path
drawn, whose cubics reach a little past the circle when its anchors
are where it touches.
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.
With Cmd held, a click with the Eyedropper selects with the selection
tool lent to it. The hover outline is now that tool's outline: the
object under the pointer, or none when that object is already
selected. Before, Cmd hid the outline.
While the pointer rests, the canvas compares the state its cached
outline was found for with the current state field by field. It
copies the selection, the paint defaults and the tool's options into
a new key only when some part of that state changed.
The progress-doc line states the Alt case as the front editable object
(the one below when locked art covers it) and names the tests. New
tests cover a selected object, Cmd, hidden art, an armed Ignore Color
pick, Shift over a blend on the canvas, and Shift over an envelope.
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.
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.
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.
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.
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.
An answer that names another question, Cancel or OK, now has to leave the
open question answerable: the right token's OK still starts the edit at the
clicked character. The canvas double-click lands a quarter of the way into
the text, and after OK the caret has to be the one a click at that point
puts in the type being edited.
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.
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.
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.
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.
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.
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.
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.