* SVG export: preserve document unit in viewBox and width/height (#864)
When exporting SVG documents with physical units (mm, cm, in, pc), emit
the physical unit suffix on the root <svg width=... height=...>
attributes while keeping viewBox numbers and inner coordinates in 1:1 points
per SVG 1.1 coords §7.10. This avoids the 75% scaling mismatch when opening
drawings in external tools such as Inkscape or LightBurn, and preserves
the document unit setting across save/open round trips. Unitless documents
(points, pixels) continue to emit unitless dimensions.
Tested via export_physical_units_writes_unit_suffixes in vectorcraft-svg
and full round-trip svg_round_trip_preserves_document_units in vectorcraft-engine.
Ran cargo xtask ci (fmt, clippy, tests, xtask gates).
* SVG export: preserve nonzero width and viewBox on extreme small dimensions
- object.setLiveShape checks every shape named in `ids` against the
coordinate limit (±4,000,000 pt) after the edit, so a rectangle,
ellipse or polygon that is not selected can no longer be turned
out of range; the call is an error and changes nothing.
- LiveShape::set_shape_angle brings the angle into [0, 360) before it
works out the turn, so a very large angle reaches the same final
angle from any starting angle.
- The params text and docs/mcp.md say that `null` counts as an
omitted key, that a pixel-aligned shape goes back on the pixel grid
after the turn, and that a turn out of range is an error.
- The panel test reads the Rotate and Angle fields by name, and checks
that the Angle field is empty for mixed angles.
- A file's corners are kept only when there are exactly four that the
image can take; a longer list is skipped without decoding it. Corners
the affine map misses stay a distortion, and a scale past the
perspective limit leaves the image at its nearest affine placement.
- Distort checks the corners in a frame local to the quad, so a missed
corner far from the origin is still refused.
- Relink and Unembed refuse a named or selected distorted image before
searching a folder or writing a file. Create Gradient Mesh lists the
distorted images it leaves in `skipped`. Place with Replace refuses
only when the measured image is distorted and the file is not text.
- SVG cuts a distorted image in a scaled symbol instance at the placed
size. EMF pieces store only the pixels inside their clip. PDF mesh
pieces of a CMYK image keep a same-corner mask as its soft mask, color
mask included. Both `.ai` writers write an image at the nesting limit
at its nearest placement with a warning. DXF warns only when it writes
the image.
- The canvas cuts the mesh by the view's largest stretch. Warped images
with a singular placement keep finite corners.
- docs/mcp.md and docs/plugins.md describe the tolerances, the DXF and
WMF fallback, the partial result of Create Gradient Mesh, and when a
plug-in sees `corners`.
Saved and recorded dimension options carried "arrowHead": null even
without a stroke head, so a recorded dimension.create failed in versions
that do not know the option. The field is now left out when it is null.
dimension.create, dimension.update and Dimension Tool Options still take
it. The name is read without a copy of its own, and a name longer than
any built-in one is refused before it is parsed. Through ui.dialog.set,
an arrowStyle set in Dimension Tool Options clears arrowHead, and a
built-in arrowHead sets the arrowStyle of its Arrow Style entry, as that
menu does. The Arrow Style field reads only a built-in head's name from
a draft.
The Stroke panel and Arrow Style look up a built-in arrowhead's name in
the catalog's arrowhead rows first, then its plain row. Every complete
catalog gets an arrowhead row for Feather, so the Feather arrowhead is
named as an arrowhead in each, and the de, gu, it, ja, ko, uk, vi,
zh-hans and zh-hant catalogs no longer show it in English.
Versions that have the stroke arrowhead but do not read arrowHead keep a
dimension's saved arrows until they draw the dimension again, and then
draw arrowStyle; versions without the stroke arrowhead do not open the
file. The params text, the doc comments, docs/dimensions.md, docs/mcp.md
and docs/target-app-parity.md say so.
The French Line Arrow row moves next to the other rows of its block.
The de, gu, it, ja, ko, uk, vi, zh-hans and zh-hant catalogs had no rows
for the built-in arrowhead names, so the Stroke panel and the Dimension
tool's Arrow Style showed them in English, and no catalog had Line Arrow.
Those nine catalogs get the names, every catalog gets Line Arrow, and
built_in_arrowhead_names_are_in_complete_catalogs checks them. Feather is
left out of the nine: a plain Feather row would also rename the History
steps of the Feather effect.
Dimension art is saved as child paths whose strokes carry the arrowhead,
so the docs, params text and comments no longer say that older versions
draw arrowStyle in place of arrowHead.
Arrow Style in Dimension Tool Options and in the Properties panel lists
Filled, Open, Tick and None, then the other 38 built-in Stroke panel
arrowheads, each with its drawn preview. The dimension line draws the
chosen head at both ends.
A dimension's options take a new arrowHead value: null, or a built-in
stroke arrowhead name as stroke.set takes it. The menu writes arrowStyle
filled with it, so versions that do not read arrowHead open such a
dimension with Filled arrows. Documents and tool settings saved before
open unchanged. Custom arrowheads and unknown names are refused.
Fixes#8049Fixes#3222
With the Pen chosen, Cmd/Ctrl lends Direct Selection for one gesture (the
Pen's default loan, or the last selection tool chosen). The session takes
Cmd off the press only, so the drags after it still carried Cmd and
mirrored the opposite handle of every lent handle drag. The session now
marks the lent tool, and that press does not mirror while it is held.
Letting Cmd go and pressing it again during the drag mirrors, as in Direct
Selection itself.
path.setHandle, text.setPathHandle and object.blend.spine.moveAnchor refuse
`symmetric` together with `independent`, and spine moves refuse
`symmetric` without `handle`. At an open end, where no segment leaves the
anchor on the other side, `symmetric` does not mirror. docs/mcp.md
describes `symmetric` on the three commands.
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