With two or more direction handles picked, a press without Shift on one
of them started a drag of all the picked handles (path.moveHandles),
which never mirrors. A Cmd/Ctrl press that Direct Selection now keeps on
a shown handle therefore translated every picked handle instead of
mirroring the opposite one.
press_handle now drags the pressed handle alone when the press mirrors
(Cmd/Ctrl without Alt, and not the press that lent the tool from another
tool), so the drag mirrors its opposite handle and the other picked
handles stay where they are. A drag without Cmd/Ctrl still moves every
picked handle.
With Direct Selection chosen, Cmd/Ctrl lends the Selection tool for the
press. That loan also took presses on the end of a shown direction handle,
so a Ctrl-drag on a handle moved the whole object (and anything selected
with it), or drew a marquee where no object was under the handle. Only Ctrl
added after the drag began mirrored the opposite handle.
A new Tool::keeps_cmd_press lets the active tool keep a Cmd/Ctrl press.
Direct Selection keeps one without Alt on the end of a shown handle of a
path, of type on a path, or of a selected blend spine anchor, so the drag
mirrors the opposite handle, with Shift constraining it. The session's
lent_tool_at asks it, so the press, the cursor and the status bar agree. A
press elsewhere, on a handle of the bounding box the lent Selection tool
shows, or with Cmd+Alt (Group Selection) is still lent as before.
docs/gaps.md and docs/ui-parity.md describe the press.
FontDb::new copied every bundled and craft-fonts font into the font
catalog with add_bytes, which keeps its own copy of the bytes. A CLI run
that exports a small SVG peaked at about 130 MiB, against about 26 MiB
in 0.24.1.
The database now adds the bundled fonts the first time
FontDb::catalog is called, and its own catalog lookups go through that
call. A run that never looks a font up in the catalog does not copy
them: exporting a 10 x 10 SVG with vectorcraft-cli on Linux peaks at
42 MiB instead of 130 MiB, with the same PNG. The workaround can go once
the catalog takes static bytes without copying them (craft-libs#4888).
Part of #10666
measuring_data_too_large_to_hold_in_a_loop_runs_out_of_the_budget deflated
and measured 300 MiB of zeros against the 50,000,000-operation budget, and
took about 3.9 s. It now runs with the reader limited to 1 MiB
(with_data_limit), zeros that decompress to 4 MiB, and a budget of 524,288
operations for a file whatever its length (with_ops_limit, a test-only seam
for MAX_OPS like with_data_limit). It still checks that the data is
measured in full more than once and at most five times, and runs in about
0.09 s.
read_counting now reads on its thread with the calling thread's data and
operation limits, so tests that use it can lower them.
A floating panel's OS window counted as covering the canvas even while it
was minimized, or hidden because a dialog or popup was open. Art dragged
onto the canvas and released over the spot where such a window sat was
refused, and the tools treated the pointer there as covered.
os_window_at now skips windows the OS reports minimized, and reports no
cover while a dialog or popup is open. This works around
storytold/craft-libs#4739; the checks are removed when the craft-libs pin
includes that change.
A square and an unfilled zigzag with one segment more than the planar
map's cap: Divide returns the "select fewer paths" error and leaves the
document and the undo history unchanged. With the check replaced by the
unchecked Divide, the test fails because Divide returns the square uncut.
the_data_of_an_image_too_large_to_hold_is_skipped built 300 MiB of zeros
and Flate- and LZW-encoded each of them to get past the reader's 256 MiB
data limit, and took about 8.7 s.
Tests can now lower the limit on their own thread with
`with_data_limit`; shipped builds keep the 256 MiB constant. The test
runs under a 1 MiB limit with 2 MiB of data per filter, and checks that
the Flate and LZW data is measured in full, so it fails when the lower
limit does not take effect. It now takes about 0.14 s.
The desktop app sends every link it opens (Help menu community links, the
app bar's Discord button, Home's Community links, About and credits, help
links in dialogs, the updater's Open URL, an object's URL attribute) as
egui's OpenUrl output. The app built eframe without its `links` feature, so
egui-winit only logged "Cannot open url - feature \"links\" not enabled." and
nothing opened.
Turn on eframe's `links` feature in apps/vectorcraft. Cargo.lock adds
webbrowser 1.2.8. The web build does not use egui-winit and is unchanged.
The feature can be removed once the craft-libs pin includes
storytold/craft-libs#5083, which opens links in the shared app setup.
Steps between live rectangles interpolate each key's radius after it is
fitted to its sides, not the stored radius. Their positions lie between
the keys' only on a straight spine; on an edited or replaced spine each
step sits on the spine.
When a long subpath has more segments than the tooth budget, only every
k-th segment gets teeth. comb_closes compared only the first and last
tooth positions, so a last sampled segment that ended on the first anchor
joined its tip to the first tooth across the skipped closing segment.
Each tooth now records its segment, and the comb closes only when the
segments between the last tooth and the first across the seam have no
length.
#10682 made paths::see_all_points return a Result; d22384d6 had added a call in the mask-release path of removeAll that ignored it, so clippy -D warnings fails on main. The call now passes the error on with ?, as the other three callers do.