From 934e6cba5351ad86bd314cf711e28e4d02957994 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Thu, 5 Nov 2026 08:29:20 -0800 Subject: [PATCH] perf: reuse selected paint bounds for library gradients --- crates/engine/src/cmd/library.rs | 8 +++++--- docs/target-app-parity.md | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/engine/src/cmd/library.rs b/crates/engine/src/cmd/library.rs index 1f8370d5d..e8706b1c2 100644 --- a/crates/engine/src/cmd/library.rs +++ b/crates/engine/src/cmd/library.rs @@ -989,11 +989,13 @@ fn selected_paint(s: &Session, p: &Value, stroke: bool) -> Result { None => st.selection.objects.clone(), }; let from_art = ids.iter().filter_map(|id| st.doc.node(*id)).find_map(|n| { - let (paint, to_doc, _) = n.proxy_paint(stroke, None)?; + let (paint, to_doc, bounds) = n.proxy_paint(stroke, None)?; // Type's characters paint in its own space: a gradient there takes its placement in the // document, so that it keeps the direction it shows. - match (paint, n.proxy_gradient(stroke, None)) { - (Paint::Gradient(g), Some((_, geom))) if to_doc != vectorcraft_geom::Affine::IDENTITY => { + match paint { + Paint::Gradient(g) if to_doc != vectorcraft_geom::Affine::IDENTITY => { + let mut geom = g.resolve(bounds); + geom.transform(to_doc, g.gradient.kind); Some(Paint::Gradient(Box::new(GradientPaint { geom: Some(geom), ..(**g).clone() }))) } _ => Some(paint.clone()), diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index c5d01357d..a63dc31a4 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1,6 +1,6 @@ # Parity with Adobe Illustrator -> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-05 · **Change:** minor (Pencil and Paintbrush: a new stroke with Keep selected off leaves nothing selected, #5752; scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026) +> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-11-05 · **Change:** minor (adding a selected library paint avoids duplicate geometry measurement; behavior, scores and estimates unchanged) · **Target:** Adobe Illustrator 2026 (30.x; public release notes through 30.7, August 2026) ## Feature submission evidence @@ -31,6 +31,7 @@ Artboard Options forwards the active Artboard tool's Scale Artwork with Artboard | Date | Change | Summary | |---|---|---| +| 2026-11-05 | minor | Adding a selected colour, gradient or pattern to a library measures the source object's geometry once rather than twice. Gradient placement, library contents, scores and estimates are unchanged. | | 2026-11-05 | minor | Large drawings of solid-colour or pattern-filled paths and compound paths export to SVG faster when their unused geometric bounds are skipped. Gradients and outside-aligned stroke masks retain their placement; SVG output, scores and estimates are unchanged. | | 2026-11-05 | minor | Selection Tools add-on: Select Linked, Embedded, Missing and Modified select the images and placed documents with that link status (Object › Plug-ins › Selection Tools and the Links panel menu; Shift adds), and Select by Link Status… lists them by name, status and format to pick from, optionally zooming to them; what is hidden, locked, on a template layer or outside the isolated group is left out and the status bar says how many (#5526, a VectorCraft addition); scores and estimates unchanged (estimated). | | 2026-11-05 | minor | Pencil and Paintbrush: a new stroke with Keep selected off leaves nothing selected, the earlier selection included, while Keep selected on selects only the new path and a continued or redrawn path keeps the rest of the selection (#5752); scores and estimates unchanged. |