* refactor(svg): read SVG text and path data through craft-svg
SVG import now decodes its bytes with craft-svg (SVGZ, UTF-16 and Latin-1,
within the shared size limit) and refuses entity bombs, very wide elements
and deep nesting with craft-svg's guards before anicraft_xml builds a tree.
Path data (SVG import, the path.d and motion path commands, the interface
icons) is read by craft_svg::path_data. anicraft-geom keeps only the
elliptical-arc-to-cubic geometry; its own tokenizer is removed.
craft-svg is pinned to craft-libs main 57288eda.
Refs storytold/craft-libs#778, storytold/craft-libs#789
* refactor(svg): pin craft-svg to #1848 and parse colours through it
craft-svg is now at craft-libs main b836a718 (#1848), with default features
off, so the lock no longer pulls vectorcraft or the image codecs. Colours
go through parse_color_alpha; transparent stays in the app because the
shared parser rejects it. Percentage rgb channels follow the shared
parser's 8-bit rounding (50% is 128/255).
* fix(svg): clip out-of-range rgb() and bound decoded text
parse_color_alpha rejects rgb(300,0,0); CSS clips that to red, and so
did the previous local parser. If the shared parser fails, clip rgb()
channels and try once more. Also refuse text that grows past the 64 MiB
limit after Latin-1 or UTF-16 decoding, which svgz::text does not count.
* refactor(svg): pin craft-svg to #1878
craft-svg is now at craft-libs main c7a872e2 (#1878), which bounds the
entity-declaration scan and resets smooth-control history after Z.
default-features stays false. The other craft-libs pins are unchanged.
* fix(svg): bound rgb() components and emit integer channels
clipped_rgb now stops at a fifth component instead of collecting an
unbounded comma list, and number-form channels are retried as integers
so a value such as 127.5 is accepted by the shared parser.
* fix(svg): finish parser routing and reject missing moveto
Route the newer Continue Path entry point through the shared adapter. Require an initial moveto and assert precise preflight refusal variants. Focused geom/SVG tests: 137 + 31 passed. Quadratic gradient parity remains a separate merge blocker.
---------
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
Show macOS file dialogs as sheets so resizing them no longer crashes.
Finder and Dock opens wait while a file dialog, Save As question, or
plug-in Browse sheet is up. After document tabs landed, CloseFlow also
waits while the deferred system Save As panel is pending.
Expand Fill and Soften Fill Edges ask for a distance, direction and steps and
remember them; the Modify › Shape items are enabled by what the selection has.
While a colour picker popup is open the stage is its eyedropper: a chip shows
the colour under the pointer, a click gives it to the picker, Esc closes it.
Free Transform sends the transformation origin with turns, scales and skews,
marks each object's own point, and Properties shows Transform about.
Floating paste, pictures from the system clipboard, refused merges and the
Fill/Stroke memory are recorded in ADR 0108. The command reference is
regenerated; clippy findings in the new tests are fixed.
Masked artwork hid nothing, so the stipple of a selection under it showed
through even where the artwork covers it. The idea is from the follow-up
commits of outside PR #404 (Untoldent); main's faster pass works on row spans,
so it is done there: the spans a mask does not show are set aside, the rest go
behind the artwork, with no path booleans, and a mask is outlined once a frame.
Soft masks still hide nothing. The PR's other follow-up (a symbol instance
below full opacity hides nothing) already holds on main: such an instance is a
group, and grouped artwork is never an occluder.
Measured (selection_overlay_cost, 720 selected raw pieces): 6.24 ms a frame,
as before (6.50 ms when the pass was rewritten); the same drawing under an
opaque sheet behind a 48-shape mask: 6.28 ms.
Whole percentages show without a decimal, and a mixed scale is one faint mark with the
explanation on hover, so the row no longer wraps under its label at the dock's default width.
Paste only knew AniCraft's own clipboard, so a picture copied in Paint.NET or
Aseprite, or a screenshot, gave 'the clipboard is empty', and Ctrl+V did nothing
at all: egui-winit turns that key into a paste event only when the clipboard
holds text. Paste (menu, context menu and Ctrl/Cmd+V) now places the system
clipboard's picture as a bitmap in the middle of the view, in the Library too,
when it is newer than what AniCraft copied (its own Copy leaves a text note on
the system clipboard). The swallowed key is recognised by its release. Reading
the clipboard is platform code and uses arboard, the library eframe already
uses for text, so no crate is added. Desktop only; vectors from other apps are
not read yet.
Fixes#263
Rotation was there (drag just outside a corner) but the pointer showed the
system's shortcut arrow, so nobody found it. No desktop has a rotate cursor, so
the app hides the system one there and draws a curved double arrow bent around
the box, also while turning.
Fixes#194
A double-click on a raw fill selects it with its outline (since #92), but egui
only counts two clicks up to 0.3 s apart, measured in frames: a relaxed
double-click, or a slow frame after the first click, made it two clicks. The
app now allows the half second Windows and macOS do.
Fixes#192
* The Fill checkbox refilled a shape with white. Turning a fill or a stroke off
now remembers it for the session (element.set_fill / set_stroke {on}), so on
again brings back its colour, gradient, bitmap or line; with nothing to
remember it takes the tool's.
* With only a raw outline selected (double-click on it), Fill put a fill with
no area on each side. It now refills the fill the outline surrounds, or
fills the area it closes off as the Paint Bucket does, and says what to do
when the lines close off nothing.
* The Stroke row has a checkbox like Fill, and the width stops at a hairline
(0.1) instead of removing the stroke at 0.
Fixes#291Fixes#292Fixes#393
Paste in Center and Paste in Place merged raw shapes into the drawing at once,
so a copy pasted over its original joined it before it could be dragged away.
The editor now pastes with float: the raw shapes stay whole and selected on
top, and go into the drawing when the selection lets go of them (or when they
are dropped after a move), as in Animate. The merge belongs to the step around
it, so undoing the paste restores the drawing from before it. Scripts that
paste without float still merge at once.
Fixes#391
Moving keyframes works as in Animate (click to select, then drag), but nothing
said so, and a press on the left third of a keyframe cell grabbed the span-end
handle of the span before it instead. The hand cursor now shows over selected
frames that hold keyframes (closed while they move, the copy cursor with Alt),
a drag that starts on an unselected keyframe says how to move one, and the
span-end handle lies inside the span's last frame.
Fixes#344
The pan is measured from the canvas centre, so a panel that grew or shrank moved
the artwork. A view the artist chose now takes up the centre's move; a view still
as Fit in Window left it goes on fitting. Idea from outside PR #424 (Call4han),
done for every canvas change rather than only while a dock edge is dragged.
Fixes#423
On the macOS and Windows runners a helper thread had not started its
submission when the test closed the gate 20 ms later. The tests now wait for
the state they are about (a channel, the gate's own counts) and keep only the
lower time bounds, which hold on any machine.
The stage keeps drawn frames in a cache with a 768 MiB budget. In a browser
tab, whose memory is one block that only grows, a 24-frame document filled
it: 900 MB for one moving symbol (#314). The web build's budget is 256 MiB
(30 frames of a 1920 x 1080 stage); the desktop's is unchanged.
Measured on the desktop while here (Windows 10, debug build, the sample
open, 10 s): 0 ms of CPU while idle, 226 MB working set.
A start that died inside a graphics driver made that way go last for the
next start only, so on a machine whose driver crashes the process (#335:
igvk64.dll, an access violation) AniCraft crashed on every second start.
The way now goes last for 5 starts, then gets its chance; dying again holds
it back for 25, then 100. Each way is remembered on its own, one that comes
up is forgotten, and a way that fails without killing the process (an error,
a caught panic) is held back the same way, so later starts don't flash a
window with it first. What --renderer asks for is still tried first.
The stage renderer shares the window's device and submitted its work from the
render service's threads at any time. A window reconfigures its surface when
it opens and when it is resized, and wgpu fails that when another thread
submits meanwhile: 'Surface::configure: Failed to wait for GPU to come idle
before reconfiguring the Surface'. In 0.2.1 that error was a panic, so
AniCraft closed at start-up or on a resize (#264, #309, and with them the
'won't open' reports #421#412#313#286#285#268#164); since ADR 0092 it
is survived, at the cost of a skipped frame, an autosave and a status line
blaming the graphics driver.
A SubmitGate (crates/gpu) is open while the window's thread runs the app's
frame and closed otherwise, also around windows drawn inside the frame (Test
Movie, floating panels). Work waits for it (asking for a frame), at most
250 ms; the renderer's starting self-test goes through it too.
Measured on Windows 10, RTX 5090, Vulkan, --screenshot starts: the error in
3 of 20 starts before, 0 of 20 after; 2.81 s and 2.80 s per run.