vectorcraft/crates/doc/src
dotCooCoo d9bd9b134d Symbols: instances of imported symbols are measured by their art
Every symbol instance was measured as its transform applied to the
20 × 20 square around the origin, which symbols made in the app keep
their art in. The SVG and DXF importers keep symbol art as drawn, so
the box of an instance of an imported symbol did not match its art.
The SVG Star instance at x 20, y 30 draws from (20, 30) to (40, 50)
and was measured from (10, 20) to (30, 40). Align moved such an
instance by the wrong amount, clicks and marquees beside its art
selected it, and the canvas, exports and prints left it out when its
art reached the view or the page and the square did not.

An instance is now measured by its symbol's art, which
Document::symbol_boxes looks up in the document each time
(Node::geometric_bounds_with, visual_bounds_with and
reach_bounds_with). With Use Preview Bounds on, the strokes in the art
count at their own weight, as the canvas draws them, and
object.setBounds counts them at that weight when it sizes an instance
or an object that holds one. When strokes do not scale and a width or
height of 0 or more is smaller than what a path's stroke adds,
object.setBounds now gives the path no width or height, as it does
for an instance whose art has strokes; before, it mirrored the path.
With Use Preview Bounds on, object.setBounds now measures the margins
that strokes add object by object, the members of groups and the
objects in symbol instances' art included, and solves for the width,
height and reference point asked for when the width and height are 0
or more. Before, it measured the margins of the whole selection and
could miss the size or the reference point asked for when strokes did
not scale and the objects' strokes added different margins, and when
strokes scaled and the width and height were out of proportion, even
for one path. A clip group, a Shaper Group, a compound path, type, and
a group or instance with effects or an opacity mask of its own are each
measured as one object, and so is an instance in perspective or one
turned or slanted relative to the bounding box, other than by quarter
turns. When the selection holds more than 4,096 objects to measure this
way, each selected object is measured as one. Instances inside symbol
art are measured by their own symbol's art. An instance is measured as
the square when its symbol is missing, when its symbol or a symbol
nested in its art holds an instance of itself, and when symbols nest 32
deep in its art.

Align and Distribute, the Transform panel, the bounding box and the
selection outline, clicks, the marquee, document.inspect and
document.node, Fit to Artwork Bounds and Fit to Selected Art, canvas
culling, thumbnails, the SVG filter region of an instance with a
raster effect, raster effect images, Export Selection, the SVG of an
artboard, printing, and the PDF, EPS, EMF/WMF and DXF writers use the
new box. The renderer also culls an instance by the effects and
brushed strokes in its art, and it culls a blend, envelope or repeat
by the brush art of what it holds and the effects in the art of the
instances in it. It culls an instance with geometry effects of its own
by the effects in its art after those geometry effects reshape the art.
It measures the effects in a symbol's art once for each symbol and
linear part of the transform that places it. For symbols whose art
holds instances, it measures at most 4,096 placements a frame, and at
most 4,096 more for each pattern tile it rasterizes and each placed
document it draws. Past that, it estimates the reach from the symbol's
reach with no transform, which it measures once. When the drawn
document's symbols change, the renderer drops the cached bounds of the
instances and of the objects that hold them.

The PDF and EPS writers, the SVG of an artboard and Skip Blank
Artboards grow the box of an instance whose art holds brushed strokes
by 16 times the widest stroke (at least 1 pt) of the objects in that
art that have a brushed stroke, plus 8 pt, as the renderer grows the
cull bounds of a brushed path. They keep an instance whose brush art
reaches the page. The SVG of an artboard also keeps an object that
holds an instance when what the canvas paints for it, the effects in
the symbol's art and the instance's own included, reaches the artboard.

Not yet: other commands that measure objects, such as Select › All on
Active Artboard, Transform Each and Convert to Artboards, still measure
an instance by the square.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-10-14 04:56:30 +07:00
..
selection deselect hidden and locked objects in linear time 2026-10-12 14:50:00 +07:00
appearance.rs #1172: share an object's appearance with its undo history until it changes 2026-10-11 23:27:21 +07:00
assets.rs #1172: edit a large selection in time linear in the document, not quadratic 2026-10-11 23:26:53 +07:00
blend.rs #1244: smaller objects: Node 352 -> 152 bytes, NodeKind 200 -> 80, and a cheaper undo estimate 2026-10-12 11:02:32 +07:00
clipnest.rs Part of #637: the editing data's structure read whole, colours, gradients, transparency, names, images and artboards included 2026-10-09 16:02:36 +07:00
cmyk.rs Part of #1466: grayscale TIFFs with an alpha channel or extra channels can be placed 2026-10-13 02:48:39 +07:00
corners.rs #1244: smaller objects: Node 352 -> 152 bytes, NodeKind 200 -> 80, and a cheaper undo estimate 2026-10-12 11:02:32 +07:00
graph.rs #1244: smaller objects: Node 352 -> 152 bytes, NodeKind 200 -> 80, and a cheaper undo estimate 2026-10-12 11:02:32 +07:00
hit.rs Symbols: instances of imported symbols are measured by their art 2026-10-14 04:56:30 +07:00
id_index.rs #1244: undo history bounded by bytes, without lookup tables or repeated selections in its steps 2026-10-12 11:02:17 +07:00
inks.rs M4.75: File → Print writes the job as a print-ready PDF: paper, scale, tiles, marks and bleed, separations 2026-10-05 15:13:10 +07:00
inline.rs M7: inline symbols in text 2026-10-08 15:45:34 -07:00
lib.rs Symbols: instances of imported symbols are measured by their art 2026-10-14 04:56:30 +07:00
links.rs #1244: smaller objects: Node 352 -> 152 bytes, NodeKind 200 -> 80, and a cheaper undo estimate 2026-10-12 11:02:32 +07:00
live.rs Symbols: instances of imported symbols are measured by their art 2026-10-14 04:56:30 +07:00
marks.rs M4.72: PDF export draws printer's marks in Registration around each page 2026-10-05 13:05:20 +07:00
mem.rs #1244: smaller objects: Node 352 -> 152 bytes, NodeKind 200 -> 80, and a cheaper undo estimate 2026-10-12 11:02:32 +07:00
metadata.rs M4.55: File Info with author, description, keyword chips, rating and copyright, written to SVG, PDF and PNG 2026-10-05 09:55:47 +07:00
node.rs Symbols: instances of imported symbols are measured by their art 2026-10-14 04:56:30 +07:00
orient.rs Symbols: instances of imported symbols are measured by their art 2026-10-14 04:56:30 +07:00
overprint.rs M4.83: overprinting fills and strokes overprint in PDF 2026-10-05 17:39:28 +07:00
pattern.rs Symbols: instances of imported symbols are measured by their art 2026-10-14 04:56:30 +07:00
perspective.rs #1244: smaller objects: Node 352 -> 152 bytes, NodeKind 200 -> 80, and a cheaper undo estimate 2026-10-12 11:02:32 +07:00
pixels.rs M4.53: Linked images remember their file and keep a preview; missing links ask Replace or Ignore, modified ones follow Update Links 2026-10-05 10:07:10 +07:00
placed_document.rs #1244: smaller objects: Node 352 -> 152 bytes, NodeKind 200 -> 80, and a cheaper undo estimate 2026-10-12 11:02:32 +07:00
profiles.rs M4.35: native files compress, save atomically, drop unused images, keep newer keys and save down to v1 2026-10-05 12:27:02 +07:00
puppet.rs M8.6: Puppet Warp pins appear at once, warp from the rest shape and follow Undo 2026-10-06 11:16:10 +07:00
range.rs M4.75: File → Print writes the job as a print-ready PDF: paper, scale, tiles, marks and bleed, separations 2026-10-05 15:13:10 +07:00
rastersettings.rs M4.56: Document Raster Effects Settings with colour model, background, anti-alias, clipping mask and room around 2026-10-05 09:55:48 +07:00
reach.rs M3.63: visual bounds and clicks take in the whole stroke 2026-10-05 02:55:23 +07:00
recolor.rs Fix #122: colour adjustment live effects (Effect > Color Adjustments) 2026-10-06 00:42:26 +07:00
selection.rs Fix #1408: the Transform tools and commands act on the anchors selected with Direct Selection 2026-10-12 21:01:15 +07:00
setup.rs M4.71: PDF pages carry the bleed and trim boxes; non-printing layers are left out 2026-10-05 13:05:19 +07:00
shaper.rs M2.9: add editable Shaper groups and shape orientation steps 2026-10-08 22:52:23 +01:00
shared.rs #1244: undo history bounded by bytes, without lookup tables or repeated selections in its steps 2026-10-12 11:02:17 +07:00
slices.rs #1244: smaller objects: Node 352 -> 152 bytes, NodeKind 200 -> 80, and a cheaper undo estimate 2026-10-12 11:02:32 +07:00
style_libs.rs M3.98: radial annotator extent ellipse, aspect handle and off-centre focal point 2026-10-05 04:43:43 +07:00
swatches.rs Graph designs and marker designs: Object › Graph › Design… and Marker… 2026-10-12 06:42:49 +07:00
symbols.rs Symbols: instances of imported symbols are measured by their art 2026-10-14 04:56:30 +07:00
tests_lookups.rs Part of #1429: Edit and Object commands on many objects take time linear in the document 2026-10-12 23:42:43 +07:00
tests_slices.rs #1244: smaller objects: Node 352 -> 152 bytes, NodeKind 200 -> 80, and a cheaper undo estimate 2026-10-12 11:02:32 +07:00
tests_units.rs Stroke: keep the pt ladder, fix the fallback units and per-unit decimals (review of #426) 2026-10-08 12:27:06 +07:00
text.rs Type: Digits — Default, Arabic, Hindi and Farsi numeral systems 2026-10-11 22:18:01 +07:00
trace.rs #1244: smaller objects: Node 352 -> 152 bytes, NodeKind 200 -> 80, and a cheaper undo estimate 2026-10-12 11:02:32 +07:00
variables.rs variables: review fixes for hidden objects, namespaces and agent params 2026-10-10 23:34:21 +07:00