The box an envelope maps from measures a group or layer that holds type
member by member, so that type is measured by its glyph outlines. In that
walk the container's own strokes still grew every member's box by
Appearance::outset(), the farthest a miter-joined stroke can reach. A
10 pt stroke of the group's own round a square next to type reached 50 pt
past the square instead of the 5 pt it paints.
The walk now measures the container's strokes, scaled into the envelope's
frame, along each member as the group's visual box does: paths and
compound paths along their shapes (Node::painted_by_container), groups
holding type member by member, and nothing round hidden members and
guides. Type, clip groups and compound shapes keep their box grown by the
strokes' reach, with their own strokes scaled into the frame.
expand_to took in the target without checking that it is editable, so a
locked or hidden object inside a selected group replaced the group with
its contents. It now leaves the selection unchanged for such a target.
select.anchors with mode toggle decided whether a path was selected whole
from the rest of the selection, so after a Shift-click had opened a group,
a Shift-click on an anchor of another path in it selected only that
anchor. A toggle on a group member now decides it from the member's own
selection; paths directly on a layer keep the existing rule.
A group's or layer's visual box grew by Appearance::outset(), the farthest
any of its strokes can reach from any path. For a miter-joined stroke that
is the miter limit times half the weight, so a 10 pt stroke of the group's
own round a square measured 50 pt past it instead of the 5 pt it paints.
The container's own strokes are now measured along each member path and
compound path, at any depth in its groups, as a path measures its own
strokes (Appearance::stroked_bounds). They add nothing round hidden members,
guides, images and symbol instances, which they do not paint, and grow the
box of other members (type, clip groups, live objects) by their reach as
before. visual_of_members keeps the old growth for callers that have only
boxes at hand.
The box of a group measured in a turned frame (Node::bounds_in) and
object.setBounds with Use Preview Bounds, which measures plain groups member
by member and symbol art object by object, measure a group's own strokes the
same way, so the size setBounds gives matches the visual box. There, too,
the strokes stop at hidden members and guides, and setBounds measures a
compound shape as one object, as its visual box takes it. A group's
own beveled or mitered stroke along a path with slanted segments now counts
as a slanted stroke corner (Node::has_slanted_stroke_corners), so setBounds
measures such a group as drawn when it sizes it out of proportion.
art_changed compared only the strokes a path paints, so a dimension placed before the path was made into a guide kept measuring its stroke, and one placed on the guide kept the bare size after Release Guides. A change in guide state now counts as a change to the art for a Use Preview Bounds dimension of a whole path.
A path made into a guide paints no strokes, but painted_box still measured its
stroke, so a Use Preview Bounds dimension of a whole guide reached past its
outermost points. painted_box now returns None for a guide, which covers both
preview_extents and reach. The parity note says W and H match only when the
path has no geometry effect, in line with docs/dimensions.md.
With a group selected, a Direct Selection Shift-click on the fill of one of its paths ran
select.toggle on the path, which added the path beside the group. The path stayed selected
through the group, and so did everything else in it.
The new select.remove command takes each target out of the selection. For a target inside a
selected group or compound path, Selection::expand_to first selects the objects inside the
outermost selected one on the way down to the target, in its place, so the rest of the group
stays selected. Hidden and locked objects and a Shaper Group's original shapes are left out. Direct Selection's Shift-click on such a path runs select.remove, and a
Shift-drag from there moves nothing. A Shift-click on one of the path's anchors runs
select.anchors with mode toggle, which now opens the group the same way and deselects only that
anchor. A path selected beside the group around it, as Group Selection leaves it, is taken out
with the group.
No public documentation describes this case, so this is VectorCraft's own rule.
With Use Preview Bounds on, the box Alt shows over a path and the linear
dimension of the whole path it places now reach the outside of the
path's strokes, the width or height W and H show, instead of the
outermost anchors.
- The extent source records `preview: true` (omitted when false), so the
dimension measures to the outside of the strokes again after later
edits, a new stroke weight included. Files without it measure as
before.
- A member of a compound path is measured with the compound path's
strokes and only the arrowheads the compound path draws on that member.
Releasing the compound path or changing which member holds the first
or last subpath measures it again.
- The dimension line stays outside the stroke.
- `dimension.create` takes `preview` on the extent source; a value other
than true or false is an error.
Geometry effects are not included.
A .ai file's editing data can include a placed EPS file's bytes between
%%BeginDocument: and %%EndDocument. The reader did not read those bytes:
in the %AI5_BeginPlace form the placed file showed only the preview the
data keeps of it, or an unread placeholder box without one, and in the
version 7 form the art the file draws came in as editable paths with a
note that placed files weren't read.
- The reader keeps those bytes (up to 256 MB) and makes the placed file a
placed document of them, in the file's bounding box where the
matrix puts it. It draws its art whether or not its file is found, and
a native save keeps the bytes. The version 7 form's placed EPS art is
no longer editable on open.
- A placed file stays as before when its bytes are a DCS file (File >
Place makes those linked images), have no bounding box of their own,
carry a VectorCraft document (as VectorCraft's EPS export writes),
don't read as an EPS file, or belong to a file named .ai or .ait.
What reading the bytes warns of is in the open result.
- One with a preview that an image variable binds stays the linked image
showing its preview, as a placed PDF page does.
- The link takes the size and hash of the bytes, so a file found unchanged
is neither missing nor modified.
- Drawing and the open check each read at most 8 placed EPS files inside
one another, so a file whose included files include others opens.
The open check draws the placed documents inside the bytes from their
previews, and it reads each included file once at each depth. A file
nested 12 levels deep opens with at most 8 drawing reads and 72
checks.
- File > Package with Copy Fonts reads the type of a placed EPS file, as
it reads a placed PDF page's, and of the EPS files it includes in turn,
pattern art included.
- On %_ lines the %_ that starts each line is taken off. Then one line
end is taken off the end of the bytes when another line end comes
before it: the one the %%BeginDocument: line ends with when the bytes
end with it, otherwise the last one. An LF after a CR is kept with it
when the file's first line ends with CRLF.
Docs: docs/target-app-parity.md.
A round or projecting cap draws a dot for a subpath that never leaves
its first point: a closed lone anchor, or a line or curve back to the
same point. StrokeLayer::hits ruled the click out by the box of the
segments, which leaves out a closed lone anchor, and then measured
only segments with length, so a click on the dot missed. The fast
path for a plain centered stroke in hit_leaf also returned no hit for
a path whose only subpath is a closed lone anchor.
hits now measures each such subpath as the dot the stroke draws: a
disc for a round cap and an axis-aligned square for a projecting cap,
as wide as the stroke's body, on undashed strokes without a width
profile, which are the strokes that draw a dot. Inside and outside
strokes keep to their side of a closed path. Butt caps draw no dot
and still miss. The fast path hands a click near a closed lone anchor
to the full check.
Hover, Select Behind, Direct Selection and the Eyedropper go through
the same hit test, and a marquee over the anchor already selects it.
A side of an envelope's content shorter than 1e-6 pt, not only one of
zero length, has its margins measured as shares of the other side
(envelope_margin_lengths). docs/mcp.md, the object.envelope.info params
text and the bounds_margin doc comment now state that threshold.
A round or projecting cap draws a dot for a closed subpath of one anchor.
The bounds the effects are measured by left that dot out: the visual and
cull bounds, the box Rasterize makes its image over, and the reach of an
effected path's raster effects. A path of only lone anchors was measured
at the origin.
- `vectorcraft_geom::path::drawn_curve_bounds` measures a kurbo path as
`PathData::drawn_bounds` measures the anchors it stands for.
- `crates/render/src/fx` measures effected paths with it, and a path that
draws nothing by its anchors, as `Node::visual_bounds` does.
- A stroke measured along its segments (miter and bevel joins, projecting
caps) gives the dot of a closed lone anchor its reach.
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.
The previous commit made PathData::bounds hold the point of a subpath of
one anchor. Node::visual_bounds measures a path from that box, so a lone
anchor that draws nothing (an open one, or a closed one under a butt cap
or with no stroke) widened the visual box by the stroke's reach. The
renderer draws a lone anchor only as the dot of a round or projecting
cap on a closed subpath (point_dots in crates/effects/src/stroke.rs).
- PathData::drawn_bounds measures the segments, and the lone anchors of
closed subpaths when a cap draws dots. Node::visual_bounds measures
paths and compound paths from it, falling back to the geometric box
when nothing is drawn. Geometric bounds still hold every lone anchor.
- The .ai envelope import's box of what type's outlines paint relied on
PathData::bounds leaving lone anchors out. It now removes contours of
zero length from the baked pieces before measuring them, so
a_contour_of_zero_length_paints_nothing passes unchanged.
With Object Selection by Path Only off (the default), the Selection,
Direct Selection and Group Selection tools, Object Highlighting and a
right-click's selection now pick a closed path or compound path that
has no fill by a click inside its closed subpaths. Before, such a shape
could only be picked on its path, and a click inside started a marquee.
The inside counts only where no other object is hit: a click first
looks for what paints at the point, the same as before, and only then
for the topmost unfilled closed shape around it, so art drawn inside a
frame is still picked before the frame. Select Behind lists those
shapes after the objects that paint there, and Direct Selection in a
dynamic symbol's art picks parts in the same order. Open paths, guides
and clipping paths are still picked by their path only, and Outline
view is unchanged. With Object Selection by Path Only on, the inside of
an unfilled shape takes no click, as before.
Three tests clicked inside an unfilled square and expected nothing to
be selected: the Selection and Direct Selection center point tests and
the outside-stroke reach test. They now run with Object Selection by
Path Only on, and the Direct Selection and stroke reach tests also
check that the click selects the square with it off.
Fixes#9175
An envelope whose file saves the size of its contents with their
strokes maps from that box, with margins stored as shares of the
contents' height and width. A straight line along an axis has no
height (or no width), so it got no margins and mapped from its
zero-height geometric box instead.
Margins along a side with no length are now shares of the other
side's length (envelope_margin_lengths). The reader, the envelope's
map, leaving Edit Contents and the .ai writer all measure through it,
so a stroked line opens mapping from its stroked box and saves that
box's size again.
Docs: object.envelope.info params text, docs/mcp.md,
docs/target-app-parity.md.
In Outline mode without Show Images in Outline Mode, a placed document
with an effect that changes geometry (Transform, Roughen, plug-in
effects), its own or its group's, drew its file's art reshaped and
without the X. The effects now reshape the crossed box instead, so a
Transform effect moves the crossed box.
- While a frame draws placed documents crossed, a placed document's art
is its box with both diagonals (PlacedDocument::crossed_art), so every
effect and evaluation that reads that art uses the crossed box.
- Layers are drawn and measured in the mode their Layer Options give
them: a template layer in Outline view still shows the file's art,
and a layer or sublayer whose Preview is off shows the crossed box.
A layer with effects of its own now follows its Layer Options too;
before, it drew in the view's mode.
- Kept effect art, cull bounds and the areas redrawn after an edit are
measured in that mode and kept apart per mode.
Docs: docs/ui-parity.md row done, docs/mcp.md outlineImages.
Docs conflicts: main's "Last updated" banner; both sides' evidence and
history rows, newest first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A selected group or layer outlined and marked a member made into a guide
while the guides were hidden, and the art of a template sublayer while
View > Hide Template was on, although the canvas does not draw them.
- Node::hidden_by_view (crates/doc/src/node/ops.rs) holds the rule; the
renderer's left_out now uses it too.
- walk_drawn and the overlay's point limit in canvas/outline.rs leave out
the members the view hides, so the selection's outlines, key outline,
anchors, hover outline and point count skip them.
- The selection's bounds are unchanged.
The selection outline and the hover highlight drew a symbol instance as
the box square to the page around it, so a turned, skewed or
perspective instance showed a box larger than its frame. Type in
perspective had the same box.
Node::drawn_corners gives the four corners of an instance's art box
placed by its transform, and of type's flat bounds, both through the
projection of an object in perspective. node_outline joins them, as it
already does for a placed document's corners.
A selected ruler guide that a transform turns to an angle becomes a
selected guide path, but the reply's ids left it out: object.rotate
with copy on a lone guide returned {"ids": []}. transform_ruler_guides
now returns the ids of the paths it adds, and the transform commands
add them after the transformed objects, on the direct-selected anchor
route too.