Commit Graph
24 Commits
Author SHA1 Message Date
dotCooCoo fc728b909e Merge main into fix/shape-builder-merge-off-ui-thread 2026-11-08 20:23:21 -08:00
dotCooCoo fd3482c272 Merge main into fix/shape-builder-merge-off-ui-thread 2026-11-08 11:28:00 -08:00
dotCooCoo 0f926b571f Merge main into feat/trace-keep-colors 2026-11-08 10:58:31 -08:00
dotCooCoo f118cf6aa6 Image Trace: Expand can group the traced paths by color
Squashed from #4058 onto main.
2026-11-08 23:50:26 +07:00
dotCooCoo f4ee10b2ec Merge main into feat/trace-keep-colors 2026-11-02 01:25:05 -08:00
dotCooCoo 05ac9ce040 Merge main into fix/shape-builder-merge-off-ui-thread 2026-11-01 22:20:23 -08:00
dotCooCoo 462b7cca15 Image Trace: Document Library fills are not linked to swatches
With Document Swatches as the library, traced fills and strokes take the
library color without a swatch link. Global, spot and tint swatches no
longer link the trace, so editing a swatch later leaves the trace
unchanged, and swatch order no longer decides whether a fill is linked.
Each region still takes the nearest library color, and a tint traces at
the color the tint swatch shows.
2026-10-31 07:17:08 +07:00
dotCooCoo a2d3841579 Image Trace: look up library swatches once per trace
Each traced path filtered the whole library for its color, twice when
no swatch of that color was linked. The color-to-paint lookup is now
built once before the paths are filled. The first linked swatch of a
color still gives the fill, and the first swatch of that color
otherwise.
2026-10-30 23:57:40 +07:00
dotCooCoo 65f7d3a699 Image Trace: Document Library links to a global swatch that shares a process swatch's color
When a process swatch listed before a global or spot swatch showed the
same color, a traced fill of that color took the process swatch and
stayed unlinked. Of the swatches that trace as one color, the first
linked one now gives the fill, and the first one otherwise.
2026-10-30 23:57:40 +07:00
VoiceLessQ 2e54e882d6 Image Trace: a library colour changed meanwhile makes a background trace stale, and running traces keep frames coming
From the review of #4605. TraceParams::swatches isn't in the settings' JSON (serde skip), so a Document Library trace whose swatches were edited while it ran still applied, with the old colours; the trace's inputs now hold them. The 100 ms repaint that keeps background work moving left traces out, so without input a finished trace could wait for the next event.
2026-10-30 00:15:59 +07:00
VoiceLessQ 1411a821c1 Fix #3098: Image Trace traces off the UI thread, with progress and Cancel
Tracing a photo or a large image ran inside imageTrace.make on the UI
thread, so the window froze for as long as the trace took, with nothing
to say it was working.

A trace the user asks for (Object > Image Trace > Make and Make and
Expand, the task bar's Image Trace, the Image Trace panel's Trace and
presets) now runs on a thread of its own, as heavy plug-in filters do.
The status bar says so, and after 0.4 s a progress window shows how
many of the image's colors are traced, with Cancel and Continue in
Background (imageTrace.cancelRuns, imageTrace.hideRuns).

The result goes back to the command it was prepared for
(cmd::TraceRun, Traced::hand_in), which takes it only for the same
object, image and settings, so the edit is one undo step as before. A
newer trace of the same object replaces one still running, and a trace
whose image or settings changed meanwhile changes nothing. The control
channel, MCP, scripts and the web trace at once, as before.

The tracer reports its stages and color layers to a callback and stops
when it says so (trace_watched).
2026-10-29 22:39:34 +07:00
dotCooCoo 4e59c3f0be Merge main into fix/shape-builder-merge-off-ui-thread 2026-10-29 07:58:05 -07:00
dotCooCoo c9853094d4 Image Trace: Manage Presets saves, renames and deletes custom tracing presets
Squashed from #4071 onto main.
2026-10-29 19:21:32 +07:00
dotCooCoo e764d770db Image Trace: Document Library fills link to the document's global swatches
Squashed from #4396 onto main.
2026-10-29 18:50:56 +07:00
dotCooCoo cf5ed86729 Merge main into fix/shape-builder-merge-off-ui-thread 2026-10-29 03:59:34 -07:00
bflatastic 828d784c8c Shape Builder: import replace_leaves in buildcmds/shape_builder.rs (#4299 made the imports explicit) 2026-10-29 13:00:46 +07:00
dotCooCoo f30819b7eb Shape Builder: a merge replaces only the paths it uses, where they are
Squashed from #4094 onto main.
2026-10-29 13:00:46 +07:00
dotCooCoo 963346984e Shape Builder: import find_command and drop the unused SubPath import after merging main 2026-10-28 17:42:35 -07:00
dotCooCoo 83748190f6 Shape Builder: import waits_for_tool_edit and Arc after merging main
main moved session/execute.rs and cmd/buildcmds/shape_builder.rs off glob
imports, so the branch's new waits_for_tool_edit guard and Arc::ptr_eq call
needed those names added to the explicit import lists.
2026-10-28 17:15:07 -07:00
dotCooCoo 72569ee6a4 Merge main into fix/shape-builder-merge-off-ui-thread 2026-10-28 16:48:55 -07:00
Dylan M. Taylor 7043ef6f3d Extract geometry command helpers 2026-10-28 16:44:11 +00:00
dotCooCoo 3c0c010522 Merge main into feat/trace-keep-colors 2026-10-28 02:58:05 -07:00
dotCooCoo 93677c26ec Shape Builder: a large selection merges on another thread
A Shape Builder click or drag over a selection of more than 128
segments merged on the UI thread, so the app stopped drawing and
answering until the merge was done. The tool now computes such a
merge on another thread from the map it built for the hover.
Meanwhile the canvas keeps drawing, the touched regions stay
highlighted and the pointer is the busy pointer. When the merge is
done, the tool runs shapeBuilder.merge with the gesture's params as
one undo step, and the command takes the computed shapes when it
would compute the same ones. The web build merges in the command, as
before.

A press while the map is still being built no longer waits for it on
the UI thread: the tool records the gesture and makes it once the map
is there.

Clicks, drags and the Shape Builder's arrow keys made during the
merge, and commands, menu items, the app's own dialogs, saves and tool
or document switches, run after it on the merged art; engine queries
that only read run at once. A change to the selected paths made
outside a command drops the merge. The headless host and ui.pointer
reply once the merge is applied.

The Shape Builder and the Live Paint Bucket keep their map of the
selection over a new revision of the document when the selected paths
and their outlines are unchanged, instead of building it again.
2026-10-27 17:26:38 -07:00
aiongg c2ead918b1 refactor(engine): move cmd/buildcmds.rs items to cmd/buildcmds/{live_paint,shape_builder,trace}.rs 2026-10-26 22:01:25 +00:00