Typing 10 into X in a millimeters document stored 28.35 pt instead of
28.3464567 pt, because the X and Y setters rounded to two point
decimals. They now only clamp. The flat view also wrote the map back
through the box on every frame, rounding the offsets again; it now
writes the map only when the box was edited.
Extrude & Bevel's Depth and bevel Width and Height, Revolve's Offset,
the classic Extrude & Bevel and Revolve rows, and the Map Art X and Y
rows showed points in a document set to millimeters, inches or another
unit. Each row now goes through Param::length, so its field shows and
reads the document's unit while the effect keeps points. The rows set
no decimals, so a typed 10 mm is kept unrounded and Up steps by the
shown unit's own step.
craft-libs 186a229c8d holds storytold/craft-libs#4261, so a properties
dialog keeps its bound tab when a measuring frame ends before its body
runs. The style_dialog! wrapper no longer saves and restores the tab
around that frame for Character Style Options, Paragraph Style Options
and New Character Style or New Paragraph Style.
New tests open Character Style Options on Advanced Character Formats,
New Character Style on Character Color, and Document Setup on
Transparency, Type and Color, and check that each tab is still shown
after the first frames. With craft-libs before that change they fail
with the dialog back on General.
The name, note, hidden, locked, opacity, blendingMode, position, left,
top, width and height setters checked the assigned value before the
item, so a bad value on a removed item reported the value error instead
of "Stale page item". Each setter now looks up its item first.
Follow-up to #9288.
- Removing the last anchor of a closed path with its closing segment
selected also deselects the first anchor, the segment's other end.
- Removing a point puts back new art's paint, so a default stroke width
a script set still applies to the next path it draws.
- A removal that leaves the direct selection as it was waits with the
other point changes, unless every remaining anchor is now selected,
the selection refers to points that are gone, or the path is in an
Objects on Path group.
- Reading the points of a path first writes the waiting point changes
of another path in the same Objects on Path group.
- Writing a path in an Objects on Path group checks the other tracked
paths in the outermost such group, so their PathPoint handles go stale
when the group moves them, even after an undo.
Docs: docs/mcp.md, docs/target-app-parity.md.
Hit walks measure every path's culling box with PathData::control_bounds,
which read every anchor of the path on every call. Since anchors are kept
in shared chunks, that read follows two more pointers per path and goes
through the chunked iterator, so each node of a hover or cursor walk cost
about twice what it did before the chunks.
Each subpath's anchor list now keeps the box round its points and handles
once it is measured (Anchors::control_bounds), and every change to the
list clears it. A copy of the list keeps the box too. control_bounds
unions the subpaths' boxes, with the same result as before.
- anchors.rs: control_bounds reads the anchors once until they change,
counted by measured_control_anchors; each change to the list clears it.
- Tests count the anchors read: a list reads them once across calls and
copies, again after each kind of change, and a hover past 100 squares
reads none after the first.
The Stroke panel showed the stroke editor's rows with a label column of
their own, so the Alignment, Caps and Corners buttons and the Miter
Limit and Dash offset fields started left of the Weight, Arrowheads and
Profile controls. The panel now turns on StrokeEditor::host_labels
(craft-libs#4227, in the pinned craft-libs), and the editor's rows read
the label column of the panel's Stroke Options group.
the_panel_rows_start_their_controls_at_one_x now also checks the
Alignment, Caps, Corners, Miter limit and Dash offset controls.
The app's root look now sets PresetCardLook::PageTile in place of Page,
so each preset card in New Document draws on a light veil of the scrim
with its paper on it. A card that is not selected now stands apart from
the dialog's surface. The craft-libs pin at 186a229c8d already has the
look (storytold/craft-libs#4180).
The new test resting_preset_cards_stand_on_a_tile checks that a resting
card is covered by a veil of the scrim and holds its white paper; it
fails with the old Page look.
The craft-libs pin now includes storytold/craft-libs#4147 and #4195. A
wrapping SpaceBetween row keeps its children at both edges when they fit
on one line, and a check box in a row inside a field shows its own label.
- Document Info: a row wraps through the shared row layout instead of
measuring its label and value first. A row that fits keeps its value at
the end; otherwise the value moves under the label.
- Image Trace: the Fills and Strokes check boxes in the Create field show
their own labels, without a nested field for each.
A new test checks that a Document Info value that does not fit beside
its label moves under it.
The tool rail's footer region draws its own rule and gap since
craft-libs#4140, so the divider at the top of bottom_controls drew a
second rule. Remove it, and have the rule test count exactly one.
A hit test for the selection tools first walks the document without
looking inside unfilled closed paths, and when that finds nothing it
walked the whole document again to look inside them. With the pointer
resting over empty pasteboard that doubled the hit walks on every
frame.
The first walk now notes whether an unfilled closed path holds the
point, and the second walk runs only when one does. Select Behind
(objects_at) and Direct Selection in a dynamic symbol's art
(symbol_part_at) skip their second pass the same way. Hit tests that
do not look inside unfilled paths measure no interiors.
The craft-libs pin (186a229c8d) includes storytold/craft-libs#4138: a
group or tab dragged out of a dock column collapsed to icons now floats
or docks expanded in craft-libs itself, while a whole icon column that
floats stays collapsed. The floated_from_icons pass added by #9964
expanded those windows a second time after each dock pass, so it is
removed and the dock pass stores the area's workspace as it did before.
The test from #9964,
a_group_dragged_out_of_the_icon_column_floats_expanded_and_its_tabs_switch,
is kept and passes on craft-libs alone.
- apps/vectorcraft-web: egui_extras moves to the wasm32 dependencies.
Its only use is src/web.rs, which builds only for wasm32, so cargo
reported it unused on native builds.
- apps/vectorcraft: drop the socket2 dev-dependency. Its loopback
tests left control_server in #8800 and nothing uses it now.
- xtask: the doc-test steps (`cargo xtask ci shard` and the workspace
doctests) leave out packages whose only library target is a cdylib,
dylib or staticlib. Cargo printed "doc tests are not supported for
crate type(s) `cdylib`" for vectorcraft-thumbnail-handler. Packages
without a library stay selected, so the shard keeps its features.
Warnings on the build host, before and after (cache warm shard
`cargo test -p vectorcraft-mcp -p vectorcraft -p vectorcraft-cli
-p vectorcraft-web -p xtask --lib --bins --no-run` on a fresh build, and
`cargo test -p vectorcraft-thumbnail-handler --doc`): 4 before, 1 after.
The one left is `vectorcraft-testkit` in apps/vectorcraft-cli: only the
integration tests use it, and the warm step builds only library and
binary tests.
end_folder uses its Session and StoreTurn only in the native arm that
finishes loaded modules and saves the disabled list. The wasm32 build has
no such arm, so rustc reported both parameters as unused there. The
function now marks them used under cfg(target_arch = "wasm32"), as
install_folder above it already does.
cargo check -p vectorcraft-engine --target wasm32-unknown-unknown:
2 warnings in vectorcraft-engine before, 0 after. The manifest and patch
warnings it also prints are unchanged.