Commit Graph
1091 Commits
Author SHA1 Message Date
Tanish Manku 5c4b8594b3 chore: merge main into m3/stroke-coverage 2026-11-18 00:34:53 -07:00
Tanish Manku a4e0125073 Merge pull request #442 from storytold/m1/transformation-point
feat(stage): a movable transformation point, a box that turns with the object, and layer opacity (M1)
2026-11-18 00:26:50 -07:00
Tanish Manku 7f4e33b95e fix(stage): the drawn rotate cursor on a turned box, and the command reference after the rebase (M1) 2026-11-17 23:42:31 -07:00
Tanish Manku e3210f6288 docs: ADR 0110, roadmap, changelog, performance and licence records for stroke coverage (M3) 2026-11-17 23:34:19 -07:00
Tanish Manku 28fcfd23c6 fix(render): a stroke's coverage is that of one outline, not of overlapping pieces (M3)
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.
2026-11-17 23:33:55 -07:00
Tanish Manku 0522c787f6 feat(geom): unions of flattened polygons on an integer grid (M3)
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.
2026-11-17 23:33:55 -07:00
Tanish Manku a2fa0d4f3c docs(adr): reserve ADR 0110 for stroke coverage (M3) 2026-11-17 23:33:55 -07:00
Tanish Manku 7cf49aaf2b docs: ADR 0111, the guide's transformation point and layer opacity sections, roadmap and changelog (M1) 2026-11-17 23:33:27 -07:00
Tanish Manku 9d7c925bf3 test: accessibility sweep, snapping and layer properties expectations for the transformation point and layer opacity; the command reference (M1) 2026-11-17 23:33:06 -07:00
Tanish Manku 963de39541 feat(shell): Free Transform's turned box, a draggable transformation point, and layer opacity in Layer Properties and the timeline (M1) 2026-11-17 23:33:06 -07:00
Tanish Manku 6c787dd2df feat(engine): modify.transformation_point, layer.set_opacity, and transforms about an instance's point (M1) 2026-11-17 23:33:05 -07:00
Tanish Manku c23fa96ccd feat(render): layer opacity in the HTML canvas export, with CPU pixel and GPU parity tests (M1) 2026-11-17 23:32:53 -07:00
Tanish Manku 20ac637cc6 feat(doc): an instance's transformation point in tweens, and layer opacity as a fade group (M1) 2026-11-17 23:32:53 -07:00
Tanish Manku 4c68a12069 docs(adr): reserve ADR 0111 for the transformation point, turning box and layer opacity (M1) 2026-11-17 23:32:53 -07:00
Tanish Manku 0dcbfb888e Merge pull request #433 from storytold/fix/issues-editing
fix(editing): open-issue batch for drawing, selection, transform and the timeline (M1)
2026-11-17 23:27:50 -07:00
Tanish Manku bd3fb93138 chore: merge main (shape commands, issue requests) into the editing issue fixes (M1)
Pasting keeps its float parameter beside the transform-origin parameters; the stage keeps the
resize tracking and the picker's eyedropper.
2026-11-17 22:46:56 -07:00
Tanish Manku 853bab8a0d Merge pull request #439 from storytold/m1/shape-commands
feat(drawing): Convert Lines to Fills, Expand Fill, Soften Fill Edges, the picker's eyedropper and transformation origins (M1)
2026-11-17 22:38:13 -07:00
Tanish Manku fa39a53474 test(engine): as_chunks for constant-size chunks, as the newer clippy asks (M1) 2026-11-17 21:51:32 -07:00
Tanish Manku 0566b715b9 chore: merge main into the editing issue batch (M1)
# Conflicts:
#	CHANGELOG.md
#	docs/guide/drawing.md
#	docs/roadmap.md
2026-11-17 21:50:44 -07:00
Tanish Manku 47b6685d42 docs(guide): the command reference with the new shape, sample and origin commands (M1) 2026-11-17 21:23:17 -07:00
Tanish Manku 9249fb2fee docs: ADR 0109, the guide's drawing chapter, roadmap and changelog for the shape commands, picker eyedropper and transformation origins (M1)
The ADR file now holds number 0109, so its reservation row is gone. Context
help (F1) opens the guide at the new section from the two dialogs.
2026-11-17 21:21:57 -07:00
Tanish Manku cb366ee6bb feat(shell): Modify › Shape dialogs, the picker's eyedropper and Transform about (M1)
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.
2026-11-17 21:21:34 -07:00
Tanish Manku 4563afe840 feat(engine): transformation-origin modes for several selected objects (M1)
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).
2026-11-17 21:21:29 -07:00
Tanish Manku 04f3fa1981 feat(engine): Convert Lines to Fills, Expand Fill, Soften Fill Edges and paint.sample (M1)
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).
2026-11-17 21:21:28 -07:00
Tanish Manku c56bd9b61e fix(render): round joins on gentle bends no longer sweep the long way round when zoomed far in (M1)
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 %.
2026-11-17 21:21:28 -07:00
Tanish Manku cba20e2107 feat(geom): strokes as exact outlines and fills offset by a distance (M1)
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.
2026-11-17 21:21:28 -07:00
Tanish Manku a016fa131d docs(adr): reserve ADR 0109 for shape commands and picker parity (M1) 2026-11-17 21:21:28 -07:00
Tanish Manku ab4866511e Merge pull request #431 from storytold/fix/issues-requests
feat(shell): issue requests: drag layers, all-layer buttons, layer column width, symbol type order, Size, brush settings (M8)
2026-11-17 21:21:09 -07:00
Tanish Manku 448c7aefbb test(gpu): the gate test's control run waits until its detector has seen the race (M1)
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.
2026-11-17 21:11:44 -07:00
Tanish Manku 8b213bc76b test(gpu): the submit gate's control run gets a few tries on busy runners (M8)
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.
2026-11-17 20:46:51 -07:00
Tanish Manku 6c1d1459d2 chore: merge main into the editing issue batch (M1)
# Conflicts:
#	CHANGELOG.md
2026-11-17 20:15:36 -07:00
Tanish Manku 199d7af539 docs: ADR 0108, the guide, changelog and roadmap for the editing issue batch (M1)
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.
2026-11-17 20:15:27 -07:00
Tanish Manku 7a95e17973 chore: merge the follow-up commits of outside PR #404, kept as main's span pass (M1)
Their two changes (symbol instance opacity and foreground masks in selection
occlusion) were written against the pass main has since rewritten for speed.
Main's tree is kept: the first already holds there, the second is the previous
commit.
2026-11-17 20:07:40 -07:00
Tanish Manku 10b742ef11 fix(stage): artwork on a masked layer hides selection stipple only where its mask shows it (M1)
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.
2026-11-17 20:07:40 -07:00
Tanish Manku 09c5ac371f fix(panels): the Scale row stays beside its label with the lock and a mixed selection (M8)
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.
2026-11-17 20:04:23 -07:00
Tanish Manku 02dd68c445 fix(geom): a dragged edge bends into an even arc wherever it is grabbed (M1)
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
2026-11-17 20:04:17 -07:00
Tanish Manku cec0f3dab1 feat(shell): Paste takes a picture copied in another app (M1)
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
2026-11-17 20:02:12 -07:00
Tanish Manku 01348ae851 chore: merge main (outside UI batch, start-up fixes) into issue requests (M8) 2026-11-17 20:00:14 -07:00
Tanish Manku cd56fa177f test(engine): Break Apart on an image and twice on text; a clear message when nothing is left (M1)
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 #341
Fixes #299
2026-11-17 19:58:21 -07:00
Tanish Manku c063cf67e2 fix(geom): a merge whose map is not planar is refused, so brush strokes no longer vanish (M1)
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
2026-11-17 19:56:56 -07:00
Tanish Manku 01dc983915 Merge pull request #430 from storytold/fix/issues-start-files
fix(app): open-issue batch: start-up crashes, the surface race, overstated .fla archives (M8)
2026-11-17 19:51:57 -07:00
Tanish Manku f3308cda05 fix(stage): Free Transform shows a rotate cursor outside the corners (M1)
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
2026-11-17 19:42:36 -07:00
Tanish Manku 33bdebad51 fix(stage): a relaxed double-click counts, as on the desktop around the app (M1)
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
2026-11-17 19:40:11 -07:00
Tanish Manku 490da4908b fix(properties): Fill and Stroke turn back on as they were, and Fill on a raw outline fills it (M1)
* 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 #291
Fixes #292
Fixes #393
2026-11-17 19:37:04 -07:00
Tanish Manku 895b842624 fix(engine): pasted raw artwork floats, selected, until it is deselected (M1)
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
2026-11-17 19:30:28 -07:00
Tanish Manku a95c51ec53 fix(timeline): F6 and F7 over selected frames key every frame of the range (M1)
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
2026-11-17 19:23:10 -07:00
Tanish Manku 4ccb7d789b fix(timeline): a selected keyframe shows the hand, and its own cell no longer resizes the span before it (M1)
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
2026-11-17 19:21:20 -07:00
Tanish Manku 75b4ce7ed6 fix(stage): resizing the Timeline or a dock keeps the artwork where it is on screen (M1)
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
2026-11-17 19:18:07 -07:00
Tanish Manku 008cdd1b3e chore: merge main into fix/issues-start-files 2026-11-17 19:13:25 -07:00
Tanish Manku a509454e87 Merge pull request #428 from storytold/fix/outside-batch-ui
fix(shell): outside pull requests for stage, timeline, panels, XFL and platform (M8)
2026-11-17 19:05:54 -07:00