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.
- A path made into a guide draws without its strokes or effects, so its
preview bounds give no corners.
- The members of a compound path draw with the compound path's own
appearance, so only the compound path's preview bounds give corners.
- Another path's anchor right on a preview bounds corner takes a click
on the anchor that corner stands in for, so the point links to that
path.
- A corner that its path cannot hold a point at, as on a stroked dot
whose anchors all coincide, is not snapped to, so a click by the dot
picks its anchor.
- The pointer test before measuring a path includes the right and
bottom edges, as the 8 pixel distance test does.
Docs: docs/dimensions.md and docs/target-app-parity.md name paths made
into guides and compound path members among the art without corners.
A corner of a path's preview bounds took a Linear pick from every anchor
of its own object within 8 pixels, so the top, left, right and bottom
anchors of a small stroked circle, and the anchors of a rotated stroked
shape when zoomed out, could no longer be picked.
- The corner now takes the pick only from the holding path's anchor at
the same corner of the object's geometric bounds. Any other anchor,
of that object or of other art, that is nearer the pointer takes the
point, and the nearest anchor wins a tie as the topmost.
- The path that holds a point picked on a corner is kept from the pick,
instead of being worked out again from the point's position, so a
point that only happens to lie on a corner links to what is under it.
A path deleted between the clicks holds nothing.
- A corner of a compound path whose supplying member is hidden or
locked is not snapped to.
- The hovering test checks the "anchor" label at the corner, and a new
test covers the anchor ring right on the end of a dimension's line.
Docs: docs/dimensions.md and docs/target-app-parity.md say that only the
four corners are snapped to, by VectorCraft's own rule, not the edges of
the preview bounds, a group's own strokes or effects, or type; that a
corner point starts no construction guides; and that the dimension
measures W and H when it is drawn, since a later stroke weight change or
a scale with Scale Strokes off moves the point with the anchors.
A transform no longer leaves locked guide paths in place: a guide in a
group moves with its group again, as on main. Keeping them put made
Align, Transform Each, the pixel-grid snap and Objects on Path measure or
place art the transform did not move. Scaling::keep_guides and its
engine wiring and test are removed.
The marquee rule now covers the rest of the selection side, while guides
are locked or hidden:
- the guide rule goes down the walk as an explicit Rules value instead
of a thread-local guard;
- an Enclosing Lasso loop does not take a compound path for its guide
contours;
- an enclosing marquee measures a group without its guide paths
(Node::without_guides);
- Direct Selection's marquee takes no anchor or crossed segment of a
guide path.
Docs: the Guides area row, its evidence entry and the M1 row describe
the marquee behaviour; status lines and revision rows say a guide in a
group still moves with it.
While guides were locked, a guide path inside a group was still touched by
a selection marquee, so the marquee selected the group and moving the
group moved the guide (#8538). Clicks already skip guides (#3074).
- hit: marquee_in_view and enclosure_candidates take skip_guides; the
Selection, Direct Selection, Group Selection and Enclosing Lasso tools
pass !cx.guides, and the marquee then touches no guide path at any depth.
- doc: Scaling::keep_guides leaves the guide paths among a group's,
layer's or Intertwine group's children in place, as a ruler guide in a
transformed layer already stays.
- engine: transforms (apply_transform), Transform Each and Align and
Distribute set it while Lock Guides is on; a copy takes a copy of the
guide with the copied art and leaves the original.
Fixes#8538
With Use Preview Bounds on, W and H measure a stroked path from the
outside of its stroke, while the Dimension tool's Linear points only
snapped to the path's anchors, on the stroke's centerline. A dimension
between the corners of a 12 x 6 mm rectangle with a 0.4 mm stroke then
read 11.6 x 5.6 mm.
- With Use Preview Bounds on, a Linear click within 8 pixels of a corner
of the preview bounds of a path or compound path (strokes and effects
included) lands on that corner instead of on that object's anchors,
whatever the snapping options. An anchor of other art nearer the
pointer than the corner takes the point, and a corner that is also an
anchor takes the anchor.
- The point is held against the anchors of the path whose bounds reach
that corner, also when the corner lies far from the path or on another
path's segment. It moves with the path; a later change to the stroke
weight does not move it.
- A press on such a corner picks it when the pointer moves a few pixels
before the release, as on an anchor.
- Hovering by such a corner shows the anchor ring. The ring now also
shows when the pointer is exactly on the point a pick lands on, which
it did not for the end of a dimension's line.
Docs: docs/dimensions.md, docs/target-app-parity.md.
The level a new dimension line lands on now comes from the dimension
lines in the document before the dimension's first preview, so its own
preview is never a level. A dimension drawn earlier between the same two
points now acts as a level as well; before, every dimension of those
points was skipped.
- Of two lines on one level, a line the pointer lies across wins over a
line whose end is nearer the pointer.
- A dropped press while placing removes the level guide with the
preview.
- The reach uses the Smart Guides snapping tolerance helper.
- docs/dimensions.md says the rule applies to a dimension anywhere in
the document.
- The tests are split by behavior, with new tests for the same points,
pointer moves in small steps, the guide after a dropped press and
with Alignment Guides off, and the tie-break.
The preview segment from an anchor with an outgoing handle was drawn as a
quadratic curve through that handle, while a click appends a corner
anchor, which makes the cubic curve that leaves along the handle and
arrives without one. The segment changed shape when the anchor went
down. The rubber band now draws that cubic curve.
Part of #8296.
select.anchors and select.key leave a path with all of its anchors in the
selection's anchor map. The Selection tool's check for a selected member
under the pointer read any anchor entry as a partial selection, so a press
on such a member selected the outer group instead of moving the member.
The check now counts a member as selected whole when its anchor entry
holds every anchor of the path.
Switching away from the Selection tool or a shape tool during a drag of
a corner, pie or side widget left the drag's interaction open with its
preview in the document. Both tools now cancel the drag on deactivate,
as Escape does, as the Selection tool already did for a blend widget.
After a click, the circle the tool drew is selected and on top, so the
next hover or click near the point it touches snapped to that circle
instead of the path. The pointer now passes over the circles the tool
drew until an edit, Undo or Redo is made outside the tool.
- An anchor marked smooth is a corner when its handles turn by 90° or
more; the params text and docs/mcp.md now say so instead of "turn
back the way they came".
- Tests cover a second click after a draw, in the tool and through the
session, and a marked-smooth anchor with square handles.
At a corner anchor the tool now shows "Corner" instead of "Cusp", and
`shape.curvatureCircle` returns "the path has a corner there, so it has
no single curvature".
- A closed subpath whose only segment with length loops back to its
start (a teardrop) has a corner at its tip, from both ends of the loop.
- An anchor marked smooth whose out handle points back along its in
handle is a corner.
- The guide error and the new corner error have rows in the 24 catalogs
that translate every message.
- A test covers a Smart Guides snapping tolerance larger than 5 screen
points, with Smart Guides off and on.
A linear dimension placed next to another one had its line exactly where
the pointer was. Chained dimensions only lined up when the pointer hit
the other line's level exactly, which at a normal zoom it rarely does.
- With Smart Guides on, a linear dimension placed with its line within
the Smart Guides snapping tolerance of the level of a parallel line of
a visible, unlocked linear dimension already drawn has its line on
that level. This applies to two clicked points and to a segment
dragged out.
- With Alignment Guides on, a guide runs along that level across both
lines while the dimension is placed.
- Smart Guides off, a level further off, a locked dimension or one that
is not parallel leaves the line where the pointer puts it.
Docs: docs/dimensions.md, docs/target-app-parity.md.
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.