With Use Preview Bounds on, a Linear point landed only on the four corners
of the preview bounds of a path or compound path. A group's own stroke or
effects and stroked type widen the bounds that W and H show, but gave no
corner to pick, and a click beside a stroked edge snapped to the stroke's
centerline.
- Stroked type, and a group or layer with fills, strokes or effects of
its own, now give the corners of their preview bounds. A group's corner
is held against the member path whose own box reaches nearest to it. A
point on type has no link and stays where it was picked. A group or
layer holding dimension artwork gives no corner, since its bounds take
in the dimensions.
- A click that no anchor, corner, line end, guide, grid or pixel snapping
places lands on the nearest point of an edge of the preview bounds
within 8 pixels when no segment or dimension line is nearer. The point
is held against the path holding the edge's nearer corner.
- Group members count against the same per-move member work as compound
paths; a group holding more than one move may read is not read again
for that revision.
Docs: docs/dimensions.md, docs/target-app-parity.md.
With the Selection tool, the first Cmd-click (Ctrl on Windows and Linux)
now always goes to Direct Selection or Group Selection, also over a
selected object: it picks the object under the pointer, a member of a
group included, and arms Select Behind. While Cmd stays held, each
further Cmd-click over the selection selects the next object under the
pointer, counting the members of groups one by one, and comes back to
the topmost after the last. Letting go of Cmd (a pointer, hover or key
event without it), choosing another tool or switching documents ends it.
Before, the first Cmd-click over a selected object selected the object
behind it at once, and Select Behind stepped through whole groups, so a
member lying under another member of the same group could not be
reached that way.
- doc::hit::leaves_at lists the objects a Direct Selection click picks
under a point, topmost first, in one traversal of the document; a
clipping mask or a group drawn with its own geometry effects falls back
to repeated hit tests. The list stops at 256 objects.
- The session keeps the arming (Session::behind_armed) and passes it to
the tools as ToolContext::behind_armed.
- Docs: docs/control-protocol.md (ui.pointer), docs/mcp.md,
docs/target-app-parity.md and docs/ui-parity.md.
Eight tests in effects, brush, tools and trace bounded their run time
with Instant::elapsed. Each now counts the work the bounded code does
and asserts that count instead:
- effects: the subpaths Offset Path offsets after Transform copies
move behind it (1 for the rectangle, 5 for five leaves)
- brush: the calls a misbehaving bend map gets, at most what the
fitting depth and the chord count allow
- tools: the points Liquify's simplify measures (five per anchor) and
the anchors it moves (one each), and the objects the eyedropper's
hit tests may visit (within the work limit)
- trace: the named logo colors compared with those kept (ten per
color), the lookups that drop repeated swatches (one each) and the
swatch colors compared with the picture's colors (each distinct
swatch once per color)
Each count fails when the bounded step is removed or made to repeat.
When a clipped subpath had more segments or crossings than the crossing
search takes, Fill Area dropped it before the search, so a square that
its visible part crossed was still filled whole. Such a subpath now
stays out of the maps but is kept aside with the masks around it, and
an area it crosses or comes within the gap of is not filled when every
one of those masks reaches the area. An area it stays clear of, or
crosses only where a mask hides it, is filled as before. The hover
counts these subpaths and their masks when it decides whether to
search on another thread. docs/mcp.md describes the rule.
Follows #9336.
With Smart Guides on, a path selected whole that Direct Selection or
Group Selection moved held by a point of its edge (a press on its fill
within 6 screen points of the edge, and with Group Selection also a
press on its stroke or, in Outline view, its outline) snapped that point
only to other anchors and centers, or lined its bounds up. It now snaps
as the Selection tool's edge hold does since #8617: the point also lands
on the other objects' paths ("path") and where paths and ruler guides
cross ("intersect"), and on a straight path the selection slides along
it until its bounds line up.
The shape tools move the selection only from its center point, which
snaps as the Selection tool's center press does, so they are unchanged.
Part of #8296.
DrawSnap::press gathered the snap targets from all the art in the window on
every press, while a hover reuses them until the document's revision, what is
left out, the window or a snapping option changes. Every drawing tool hovers
over the point it then presses, so each Pen click (and each press of the
shape, Type, Artboard and Scissors tools) walked the whole document again for
targets equal to the ones it already held.
A press now gathers only when that key differs from the one the targets were
gathered for, the same check hover makes. The drag a press starts still keeps
the press's targets.
The Scissors test that pressed over a different document under the hover's
revision now gives that document a new revision, since the engine moves the
revision with every change to the document.
A radius written with tool.setOption during a press changed the circle
only when Shift was released and pressed again before the drag started.
The press now keeps the radius from its button press for every Shift
change until the release.
clip_to kept a piece of an unfilled outline only when its middle tested
inside the mask, and a point on the mask's own outline tests inside on
some sides and outside on others. A square clipped by the same square
kept two sides, so Fill Area found no area inside it.
A piece whose middle lies on the mask's outline now counts as shown when
the mask's filled area lies on one side of it. A piece just outside the
mask, and a piece on an outline of the mask that bounds no filled area,
stay hidden.
The Ellipse tool previewed the circle through two Shift-clicked points
and the pointer as a dashed outline at any size. The canvas dashes an
outline along its whole length, so points nearly on one line (a radius
of about 1,250,000 pt) gave about a million dashes every frame.
The preview now uses the Circle tool's limit: a circle more than 50,000
screen points around is drawn solid. Both tools call one helper,
`circle::preview_dashed`.
The Paintbrush with a brush whose Size or Width is on Stylus Wheel with
a range the wheel can change, or the Eraser with a value on Stylus Wheel
and a variation above 0, uses the wheel. The app asks the active tool
(Tool::reads_wheel) once a frame and tells the host when the answer
changes (Services::stylus_wheel). Until a tool uses the wheel, a pen
message loads no Wintab32.dll, installs no hook, subclasses no window
and opens no context; when it stops, the context closes.
When the paths together are over the segment limit, the search maps the
paths near the point and leaves out the ones with the most segments. A
path left out made the search give up on an area when it came within the
gap plus 1 pt of the area's outline, so with Gap Detection off a long line
0.75 pt outside a square stopped a click inside the square from filling
it. A gap bridge reaches at most the gap, so the check now uses the gap
plus the map's 0.05 pt contact tolerance. The 1 pt padding still decides
which paths the search picks.
Most of this pull request reached main with #4221 (the smooth join and the
redraw preview). What is left:
- A redraw stroke's end bends onto the path over Edit selected paths' distance.
When the stroke's points are far apart (a fast stroke), the bend used to run
on to the next point; a point is now added where the bend stops, and only one
where both ends' bends stop at the same place.
- The preview of a redraw stroke is drawn on top, as with Draw Normal, in Draw
Behind and Draw Inside too; before, it went behind the path or into its clip
group. path.freehand's `leaveSelection` becomes `preview`, which does both.
Fill Area used the full outline of art inside a clipping group, so a
click in the part a mask hides still found an area, and the new path
above the clipping group showed art the mask hid. Now each clipped
path is cut to every mask around it before it bounds areas, nested
clipping groups and clipped layers included: a filled path keeps its
overlap with the mask, and the outline of an unfilled path and open
paths keep only their pieces inside it. A mask that clips to nothing
hides what it clips. The new path still goes above the clipping group.
Follows #8001.
A selected ruler guide was left out of every transform but a move: the
Rotate tool did nothing with only guides selected, and Object › Transform
› Rotate… refused with "nothing selected".
Each selected ruler guide now transforms as the line Release Guides makes
of it (across its artboard, or across the artboards' bounds for a canvas
guide), about the center of the selected objects' box and those lines
together. A guide that ends up vertical or horizontal stays a ruler guide:
a half turn keeps it and a quarter turn makes a horizontal guide vertical.
At any other angle it becomes a guide path along its line, on the guide's
layer, so it snaps, releases, locks and saves as other guide paths do.
- Object › Transform › Rotate… (Copy included), Transform Again and the
Rotate tool's drag and Alt-click work with only guides selected, in one
undo step. A turn that leaves the guides where they were records none.
- Scale, Reflect, Shear and the bounding box now transform selected guides
along with the selected objects and direct-selected anchors, where
before the guides stayed put.
- Locked and hidden guides, guides with ids given and guides with
Transform Objects off do not transform. `absolute` with only guides
selected is an error.
Part of #2418.