stroke.weightUp and stroke.weightDown now go through bucket_color_params and
item_target, as stroke.set and stroke.setAdvanced do, instead of skipping
item_target while the Live Paint Bucket is active. Each command still
refuses `target` and `aligned` with any tool, since neither is one of its
parameters.
- live_paint_bucket_refuses_a_bad_target_or_aligned (renamed from
live_paint_bucket_refuses_a_bad_target) runs with the Selection tool and
with the bucket, and adds stroke.set, stroke.weightUp, stroke.weightDown,
paint.swap and paint.default.
- live_paint_bucket_paint_and_stroke_commands_leave_the_selection_unpainted
adds stroke.set with `ids: null` and stroke.weightUp with `id: null`.
- The params text of the bucket-routed commands says a null ids or id
counts as none.
- docs/mcp.md names gradient.presets.apply next to paint.editGradient for a
picked symbol part, lists when a stop selected on the bucket's gradient is
deselected, and rewraps the two long lines.
- While the Live Paint Bucket is active, a paint or stroke command with
a null ids or id goes to the bucket's colors, as one without them does.
Before, it painted the selection, since other commands read a null ids
or id as no target.
- A bad target or aligned value is refused while the bucket is active,
as it is with any other tool, instead of changing the bucket's colors.
- stroke.weightUp and stroke.weightDown no longer read the selection's
active Appearance row while the bucket takes the weight, as stroke.set
and stroke.setAdvanced already do. The row was not used in that case.
- The params text of gradient.selectStop says that, while the bucket is
active, it selects a stop of the default paint's gradient, also with an
object of a symbol instance picked. docs/mcp.md says the same, and that
paint.editGradient without ids, id or item then changes the bucket's
gradient.
- docs/mcp.md again says that another tool chosen after the bucket keeps
its colors until a command or a new selection changes them.
* 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
Once a shape has used its 1,048,576 splits at any depth, Add Bounding Circle
still splits each further curve into up to 8 pieces, from a second budget of
7,340,032 splits shared among the shapes as the first one is. Only after
both are used up does a curve count whole by its control points' hull cut
down to its bounding box. Before, every curve past the first budget counted
whole, which can make the circle around a circle about 14% larger; with the
8 pieces the fit stays less than 0.3% larger.
- The comment on the shared budget no longer claims that the shape around
one object is independent of the other objects selected.
- shapes::enclosing_circle and convex_hull move below the star helpers.
- The "Each" label mapping in the dialog form sits after "Flip Cols".
- docs/mcp.md and docs/target-app-parity.md describe both budgets and the
size of the fit before the 0.01 pt is added.
While the Live Paint Bucket is the active tool:
- each preview in one interaction starts from the colors the
interaction began with, so previewing paint.swap twice and committing
swaps once;
- a gradient stop selected on the selection's gradient is not selected,
and one selected on the bucket's gradient is not selected after
another tool is chosen;
- gradient.selectStop selects a stop of the bucket's gradient even
with an object of a symbol instance picked;
- gradient.presets.apply picks the fill or stroke by the active proxy,
not by the selection's active Appearance row;
- stroke.set and stroke.setAdvanced no longer read the selection's
Appearance row;
- the Stroke panel's Align Stroke buttons are on, as with nothing
selected, matching stroke.set, which takes every alignment.
The params text of paint.sampleColor, gradient.presets.apply,
stroke.set, stroke.weightUp and stroke.setAdvanced, the set_paint note
and the Live Paint paragraph of docs/mcp.md now describe this, and say
that the bucket takes only the color and weight of the stroke for new
art.
When the active tab was one of the last documents, the strip showed the
tabs from it to the end and left the room before them empty. The tab
before them now fills that room with its title shortened, as the tab
after the whole ones does. The tab strip takes each tab's window and
title from one list, so a docked window without a document no longer
shifts which tab is drawn as the active one. The tests check that 3
tabs fit whole and a fourth is shortened in a window 1000 pt wide.
- Export Selection to HP-GL checks the selection and starts Pen Table
from its pens, as the export writes it, and `exportSelection` is no
longer remembered for the next whole-document export.
- Pen Table with options or an artboard choice the export refuses keeps
One Pen per Color and shows the error, instead of starting from one
black pen that corrected options would keep. `automatic_pens` returns
that error.
- `automatic_pens` refuses `rect`, as `check` and the export do.
- A save panel shown in line that is canceled keeps the dialog open,
and a canceled save panel keeps the options remembered before.
Rows dragged to the trash before isolation mode started went to
layer.delete at once when none needed a question. ui.layerDelete now
returns an error for any row outside the isolated art, given or dropped,
and deletes nothing. OK in its question with no rows given deletes the
highlighted rows the panel lists, not every highlighted row.
Add Bounding Circle splits the curves of one command 1,048,576 times at
most in all, shared equally among the shapes with `each`. A piece that
still bends after the last split counts by the hull of its control points
cut down to its bounding box, so a large circle near the canvas edge keeps
a close radius.
- A path of a compound path selected on its own counts as an object, as
`object.transform` moves it, for both commands.
- A small loop whose ends meet gets a circle instead of being taken for a
single point.
- The smallest enclosing circle measures its radius from the center it
returns, after the move back from the first point, and does not copy
the hull to do so.
- The params text, docs/mcp.md and docs/target-app-parity.md describe the
limit and the compound path rule.
- OK and Delete on one or several existing points are refused when those
points changed in any way since the dialog opened (place, widths,
stroke weight, or pairing as a discontinuous point), or when another
document is active.
- OK with no width changed checks the selection before it closes.
- An untouched Total Width above 100000 pt no longer blocks OK; a value
set above 100000 pt is still refused.
- A width set into a field that OK refuses stays there when another
field is set afterward, and a negative width typed for several points
is refused at OK instead of becoming 0.
- `ui.widthPointEdit` refuses `index` together with `t`.
- Double-clicking a selected width point passes every selected entry,
so points at nearly one place are all edited.
- Colors in the older color fields read gray (model 9) and CMY (model 4)
as the .cdr reader numbers them, instead of opening as black.
- A dash pattern whose lengths are all 0 draws a solid line, as for a
.cdr outline.
- A curve whose point field is too short for its count and is not whole
points with their type bytes is left out as damaged, instead of reading
coordinates as point types.
- A layer without a name comes in unnamed, and the importer names it by
its place, as for a .cdr drawing.
- After stray bytes, a chunk id starts with a letter and may hold digits
and spaces, and the id found must name a chunk the reader uses or have
a length that fits its list. Padding is no longer taken for a chunk.
- A canvas or a container in an object's attributes gives the
unsupported-objects warning.
- A page with no size and no bounds is 612 x 792 pt, VectorCraft's own
size, as for a .cdr page; PROVENANCE R61 says so. PROVENANCE also names
the other program's .cmx reader, read for field order.
A query word that some result matched only through a word with the same
meaning was not compared with the words it may be a typo of. "spin" means
rotate, so "spin anchors" found neither Zz Rotate Canvas nor Zz Span
Anchors. Such a word is now compared like a word that matches only
descriptions. A word that is itself a word, base word or word start of a
name, menu path or id still gets no typo matches, and a result matched
through the word with the same meaning still ranks above a typo match.
Docs: the typo line in docs/target-app-parity.md.
An isolated ruler guide left the Layers panel with no rows, since the
panel lists no object row for a ruler guide. object.isolate now returns
"ruler guides can't be isolated" and isolation mode stays as it was.
The Sizer's and the Sprayer's Average compare each instance's size on the page, so a set that
holds instances of different symbols meets at their mean drawn size. A symbol without a recorded
size is measured by its art, once per command. With Size: Average and no instance under the brush,
a sprayed instance has its symbol's own size whatever `scale` is, and new instances are spaced by
the size they are placed at. With Use Pressure Pen, a drag sample at the same position is kept when
the pressure changes by 0.05 or more.
shape.curvatureCircle's description and docs/mcp.md now say a smooth mark only overrides the corner test when both handles are pulled out and no segment of no length lies before the anchor. The tool and docs/mcp.md say the pointer reaches the drawn circles again once another tool is chosen.
When the open documents' tabs don't all fit, the strip stopped at the
last tab that fit whole and left the room before the » button empty,
even where it could hold most of the next tab. That tab now fills the
room with its title shortened and ending in "…", as long as at least
40 pt of the title fits, and its tooltip shows the whole title, wrapped
to fit inside the window. An active tab wider than the whole strip is
shortened the same way, so its × no longer runs under the » button.
- With Show Layers Only on, an isolated group or object is listed as the
top row instead of leaving the panel empty.
- Duplicate Selection in the panel menu sends the rows the panel lists,
so a highlighted row outside the isolated art is not copied.
- In isolation mode the Hide, Outline and Lock Others pairs in the panel
menu and the row menu are off, and Alt-clicks on an eye or a lock
change nothing. Locate Layer is off while a group or object is
isolated.
- OK in Delete Selection's question deletes nothing when isolation mode
started while it asked and a row it asked about is outside the
isolated art.
- The isolated row shows no drop place for an Alt-drag onto itself, and
a guide is not dropped on a layer outside the isolated art.
- Each document's isolation mode is followed on its own, so a document
first shown in isolation mode opens its isolated row.
- The isolation test steps out of a sublayer one level at a time, as
Exit Isolation Mode now does.
OK closes the dialog and renames nothing when another document has
become the active one, or when the color group at the group's place in
the list no longer has the name and swatches the dialog opened with.
swatch.renameGroup makes a drag still in progress an undo step of its
own first, so canceling or undoing the drag leaves the rename.
ui.colorGroupOptions without group opens on the color group selected
alone in the Swatches panel, as long as the panel's selection still
belongs to the active document and art.
The panel's selection follows renames in a command.batch only up to the
first step that may switch documents or replace a group. Ungroup Color
Group and Delete Swatch take the names they removed out of the
selection.
The es catalog had the missing `group` and no colour group `{group}`
rows twice after the last merge of main; the duplicates are removed.
- When any solid's mapped art passes the shared limits, every solid in
the effect draws without its mapped art, so Invisible Geometry hides
all of them or none.
- A revolved group lists its surfaces with the members' shared curve
sampling, and an extruded group lists none past the faces of one
object.
- Commands refuse art on walls, bevels and Revolve's side whose curves,
cut into straight pieces at the map's scale and placed about the
surface's center, pass 400,000 points. Caps are not counted.
- Each contour's bounds test counts as a cut, in Map Art and in the side
graphics.
- On a facet whose curved edge bows out of its cell, the art reaches the
whole facet.
- A bevel as deep as the solid leaves no walls, and its bevels take the
numbers after the caps.
- Surfaces past the face limit are refused as the side is.
- threeD.mapArt keeps a deleted symbol only while the request leaves
`symbol` out.
Enter between the press and the release of a click now ends that press,
so the release sets no reference point and starts no Reflect axis behind
the dialog. A press the engine drops ends whether or not it became a
drag, and drops a waiting axis, so the release sent after it starts no
axis. A press whose document or selection changes before it becomes a
drag is dropped, so the reference point or axis set for one selection
is never applied to another.
The engine test checks that the Alt copy is reflected across y = 300.
The docs state that the first click is a plain click, that the 3 px
check compares the snapped points, and what a double-click does while
an axis waits.
With a Live Paint group selected and the Live Paint Bucket active,
choosing a fill color (a swatch, the Color Picker, the Fill box) painted
the whole selection, so every face and edge of the group took one color
before the bucket painted anything.
While the bucket is the active tool and no ids, id or item are given:
- paint.setFill, paint.setStroke, paint.none, paint.lastColor,
paint.lastGradient, paint.editGradient, paint.invert,
paint.complement, paint.swap and paint.default change only the
defaults, the colors the bucket paints with, and record no undo step;
- stroke.set, stroke.weightUp, stroke.weightDown and stroke.setAdvanced
(without a brush) change only the stroke for new art;
- the Fill and Stroke proxies, the Stroke panel and its Profile list
follow those defaults, as they do with nothing selected;
- New Art Has Basic Appearance off no longer copies the selection's
appearance into them after a command;
- canceling a Color Picker preview puts the bucket's color back.
.cmx exchange files with 32-bit coordinates open and place as editable
art. vectorcraft-cdr reads the RIFF form CMX1, its header, the color,
pen, line type, dash, outline and arrowhead tables, and each page's
instructions in drawing order, into the drawing model the .cdr reader
uses, so the importer maps pages, layers, groups and curves with uniform
fills and outlines the same way. A layer that holds nothing is left out.
A page that gives no size of its own takes the size of the drawing's
bounds, which the page header stores, and is centered on them.
Text, images, rectangles, ellipses, clipping paths, fills other than
uniform ones and arrowheads are left out, and lenses are not applied;
the warnings name each kind, with rows in every complete catalog.
Big-endian files and files with 16-bit coordinates are refused with a
message. Layouts and their sources are rows R53 to R63 of
crates/cdr/PROVENANCE.md; tests use synthetic files only.