The stroker builds each run of segments as its own outline (inner edges cut where they
cross, through the bend's point where they can't) and unites the loops, so the
renderers' sum of signed areas is the stroke's true coverage: no pixel is darker where
pieces overlapped (it was up to about half a pixel at round joins, caps and the joints
of wide curves). The GPU stage draws the oracle's polygons, so it follows.
Fourteen corpus goldens change, all at stroke edges (lighter; the dark knots at
corners go). Measured, median of 80 renders, before -> after: 2,000 stroked shapes at
1080p 9.3 -> 9.0 ms; the demo 2.5 -> 2.6 ms; 300 self-crossing scribbles at 720p
5.9 -> 6.4 ms; edges handed to the rasterizers down 3 to 4 times.
anicraft_geom::polygons::union turns loops that overlap or fold over themselves into
the loops of the area they cover, each point inside exactly one, with i_overlay
(MIT OR Apache-2.0). On clean outlines it costs about 60 ns an edge.
modify.transform_origin sets or cycles the mode (tool state); modify.transform
takes origin: selection | registration | center, and Rotate 90 and Flip follow
the mode. An object is one element or the selected pieces of one raw drawing;
its centre is the centre of its own box carried by its transform, so a drag
sent as thirty small changes ends where one transform would (tested).
modify.lines_to_fills, modify.expand_fill, modify.soften_fill_edges on the
selection of every layer, in keyframe space and stored back in the shape's own;
raw results merge with the drawing again (ADR 0031), objects stay objects.
paint.sample is the colour the CPU renderer draws at a point.
Measured against the union of the stroker's polygons at 2400 %: the fills'
area is within a pixel of the lines' for caps, joins, dashes, dots, width
profiles, tight curves and mirrored, skewed shapes (0.00 to 0.98 px on 200 to
10,000 px of line).
Zoomed in on a wide dashed or profiled curve (from about 2000 %), the direction
of a join's gap, the difference of two nearly equal unit vectors, was noisier
than the join's sweep, and the join became a whole disc. The gap's middle is now
only consulted where the path nearly turns back; elsewhere the short way between
the two normals is the outside of the bend. Found while checking Convert Lines
to Fills against the stroker's polygons at 2400 %.
anicraft_geom::outline: ribbons between cross-sections with Hermite offset
curves (0.01 units), the renderer's joins, caps, dashes and width functions,
united by the planar map at a scale where its snap distance is far below a
pixel; offset() and soften() are the boundary's band added or taken away.
planar: a vertex lookup at the edge of i64 no longer overflows.
The run without the gate only proves the detector works, but it had 300 ms to
see an overlap, and on CI's Linux runner (busy with the software GPU tests) its
threads sometimes had not run by then: it failed twice in a row on this branch.
It now goes on until it has seen one, for at most 30 s.
Without the gate the detector must see the race, but on a two-core runner the workers and the
detector may not overlap in one 300 ms run (it failed once on the Linux gate). The gated run
still has to hold in every run.
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.
The Selection tool gave each handle of the dragged segment its own least move,
so an edge grabbed off-centre bulged beside the grab. Both handles now move
alike (d / 3t(1-t)), which still carries the grabbed point: one even arc
between the ends, as in Animate. Near an end the move is bounded.
Fixes#186
Both reports came from 0.2.1 and were fixed by b5fbdac (drawing objects break
apart into raw shapes): an imported image becomes a raw shape with its bitmap
fill, and a second Break Apart on text turns the outlines into raw shapes.
These tests keep it so. A further Break Apart on raw shapes now says they are
raw shapes already.
Fixes#341Fixes#299
Where a new brush stroke leaves a crossing almost along an older outline,
snapping could make the two cross again with no vertex there. The planar map
then had faces that were not the drawing's regions: a fill's inside read as
outside, and the merge dropped it, sometimes the whole drawing. The merge now
checks Euler's formula on each connected part of its map and declines when it
fails; the engine keeps the new stroke whole on top, as it does when a merge is
too large, and nothing drawn is lost.
Measured on 400 seeded scenarios of seven crossing strokes: 4 lost most or all
of the drawing before (one lost every stroke), none after.
Fixes#308
* 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
With frames 3..5 selected only frame 3 became a keyframe: the commands never
read the count the editor sends. Each frame of the range now becomes a keyframe
(F6) or a blank keyframe (F7) on every selected layer, in one undo step.
Keyframes already inside an F7 range keep their drawings.
Fixes#272
Closing a socket with unread input resets the connection, and on macOS the reset can discard
the refusal before the client reads it (the oversized-line test failed on the macOS gate). The
port now stops writing, drains what the client is still sending (bounded: 8 MiB, 2 s), then
closes.
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.
layer.move {layer?, before | after | into} puts a layer anywhere in the stack in one undo step; a folder, mask or guide moves with everything in it; nesting past the limit, a folder into itself and the camera are refused. all: true (and on) on layer.toggle_visible/lock/outline act on every layer but the camera.