diff --git a/crates/render/src/proof.rs b/crates/render/src/proof.rs index dd7d28eb23..3d5da3ac3c 100644 --- a/crates/render/src/proof.rs +++ b/crates/render/src/proof.rs @@ -619,6 +619,5 @@ pub fn active_proof() -> Option { /// Whether [`RenderOptions::overprint_preview`] should be on (Separations Preview implies it). pub fn overprint_preview_on() -> bool { - let v = view(); - v.overprint || v.separations.is_some() + VIEW.read().unwrap_or_else(|e| e.into_inner()).as_ref().is_some_and(|v| v.overprint || v.separations.is_some()) } diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rs index 8b366665d4..095401a866 100644 --- a/crates/ui-egui/src/canvas.rs +++ b/crates/ui-egui/src/canvas.rs @@ -431,7 +431,8 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { } original_path_overlay(app, &painter, &xf); - let overlays = selection_visuals(app, &painter, &xf, (hidden_chars, selection_marks, hover_still), revolve_edit, view_info); + let mut overlays = selection_visuals(app, &painter, &xf, (hidden_chars, selection_marks, hover_still), revolve_edit, view_info); + names_on_a_white_canvas(app, &mut overlays); draw_overlays(&painter, &xf, &overlays, &t, HandleLook::of(&app.session.prefs), &mut shared_paths); app.canvas.shared_paths = shared_paths; crate::panels::tabs::paint_stop_guide(app, &painter, &xf); @@ -865,7 +866,7 @@ fn ruler_bands(app: &VectorcraftApp, ui: &Ui, xf: &Xf, (full, rect): (egui::Rect let painter = ui.painter_at(rect); if let Some(origin) = origin_preview { let at = xf.to_screen(origin); - let color = dim_on_canvas(t, app.outline_view()); + let color = dim_on_canvas(app, t, (app.outline_view(), fades_outside_artboards(app))); painter.line_segment([pos2(at.x, rect.top()), pos2(at.x, rect.bottom())], Stroke::new(1.0, color)); painter.line_segment([pos2(rect.left(), at.y), pos2(rect.right(), at.y)], Stroke::new(1.0, color)); } @@ -1296,12 +1297,14 @@ fn draw_frame(app: &mut VectorcraftApp, ui: &Ui, frame: Frame) { const OUTLINE_CANVAS: Color32 = Color32::WHITE; /// The color of the artboards' names and the ruler origin's crosshair in Outline, on -/// [`OUTLINE_CANVAS`]. +/// [`OUTLINE_CANVAS`], and in Overprint Preview, on its white canvas. const OUTLINE_DIM: Color32 = Color32::from_gray(0x4b); /// The pasteboard and the artboards' shadows and paper of document `st`, or in Outline (`outline`) /// the whole canvas in [`OUTLINE_CANVAS`], with no paper drawn for the artboards: no Simulate /// Colored Paper color, no artboard background color, and no paper with View › Hide Artboards. +/// In Overprint Preview (and Separations Preview, which turns it on) the canvas outside the +/// artboards is white instead of the pasteboard color, and the artboards draw no shadows. fn paint_paper( app: &VectorcraftApp, st: &vectorcraft_engine::DocState, @@ -1323,11 +1326,13 @@ fn paint_paper( // An artboard with a background color draws its paper in that color. With Simulate Colored Paper // on, the canvas multiplies it with the paper color: each sRGB channel is artboard × paper / 255, // rounded. The transparency grid, while it shows, covers it as it covers the others. - painter.rect_filled(rect, 0.0, t.pasteboard); // The paper and the transparency grid are document colors: they go through the display - // profile as the art does. The pasteboard and the shadows are the interface's. + // profile as the art does. The pasteboard and the shadows are the interface's. Overprint + // Preview's white canvas is white paper, so it goes through the profile too. let display = app.display_profile.transform(app.session.prefs.monitor_profile_display); let on_display = |c: Color32| crate::display_profile::color32(display.as_deref(), c); + let overprint = vectorcraft_render::proof::overprint_preview_on(); + painter.rect_filled(rect, 0.0, if overprint { on_display(Color32::WHITE) } else { t.pasteboard }); if !shows_artboards(app) { // View › Hide Artboards: no edges and no pasteboard, the whole canvas paper (#4038). painter.rect_filled(rect, 0.0, on_display(paper_color(&doc.setup))); @@ -1338,9 +1343,12 @@ fn paint_paper( for ab in &doc.artboards { let q = xf.quad(ab.rect); // Hard 2 pt drop shadow, right and bottom (measured: #4d4d4d then #565656 on #606060). - let shift = |d: f32| q.iter().map(|p| *p + vec2(d, d)).collect::>(); - painter.add(Shape::convex_polygon(shift(2.0), Color32::from_black_alpha(26), Stroke::NONE)); - painter.add(Shape::convex_polygon(shift(1.0), Color32::from_black_alpha(52), Stroke::NONE)); + // Overprint Preview draws no shadows. + if !overprint { + let shift = |d: f32| q.iter().map(|p| *p + vec2(d, d)).collect::>(); + painter.add(Shape::convex_polygon(shift(2.0), Color32::from_black_alpha(26), Stroke::NONE)); + painter.add(Shape::convex_polygon(shift(1.0), Color32::from_black_alpha(52), Stroke::NONE)); + } match &grid { Some((tex, cell)) => checker(painter, &q, ab.rect, xf.zoom, tex.id(), *cell), None => { @@ -1380,7 +1388,8 @@ fn backdrop(app: &VectorcraftApp, st: &vectorcraft_engine::DocState, outline: bo let paper = paper_color(setup); let b = if shows_artboards(app) { crate::display_profile::Backdrop { - everywhere: None, + // In Overprint Preview the canvas around the artboards is white paper. + everywhere: vectorcraft_render::proof::overprint_preview_on().then_some([255; 3]), artboards: st.doc.artboards.iter().map(|ab| (ab.rect, rgb(artboard_paper(ab, paper)))).collect(), grid: shows_transparency_grid(st).then(|| (setup.grid_colors.map(|c| rgb(crate::panels::c32(&c))), setup.grid_size.cell())), } @@ -1557,13 +1566,44 @@ fn artboard_outlines(app: &VectorcraftApp, ui: &Ui, painter: &egui::Painter, xf: let tool_selected = artboards::tool_labelled(app); let editing_name = ui.data(|d| d.get_temp::(name_edit_id()).map(|e| e.index)); let unlabelled = |i: usize| editing_name == Some(i) || u64::try_from(i).ok().is_some_and(|idx| tool_selected.contains(&idx)); - artboard_edges(app, doc, (painter, xf, t), (active_ab, dim_on_canvas(t, app.outline_view())), unlabelled); + artboard_edges(app, doc, (painter, xf, t), (active_ab, dim_on_canvas(app, t, (app.outline_view(), fades_outside_artboards(app)))), unlabelled); } /// The color of the artboards' names and the ruler origin's crosshair over the pasteboard, or over -/// [`OUTLINE_CANVAS`] in Outline (`outline`). -fn dim_on_canvas(t: &Tokens, outline: bool) -> Color32 { - if outline { OUTLINE_DIM } else { t.text_dim } +/// [`OUTLINE_CANVAS`] in Outline (`outline`), or over Overprint Preview's white canvas while the +/// artboards show. Over a white canvas that Fade Region Outside Artboard darkens (`faded`), they +/// are black. +fn dim_on_canvas(app: &VectorcraftApp, t: &Tokens, (outline, faded): (bool, bool)) -> Color32 { + match (white_canvas(app, outline), faded) { + (true, true) => Color32::BLACK, + (true, false) => OUTLINE_DIM, + (false, _) => t.text_dim, + } +} + +/// The canvas outside the artboards is white: in Outline (`outline`), and in Overprint Preview +/// while the artboards show. +fn white_canvas(app: &VectorcraftApp, outline: bool) -> bool { + outline || (vectorcraft_render::proof::overprint_preview_on() && shows_artboards(app)) +} + +/// The color of the Artboard tool's names of its selected artboards over a white canvas, faded by +/// Fade Region Outside Artboard or not: a dark blue. +const SELECTED_NAME_ON_WHITE: [u8; 3] = [0x1a, 0x2b, 0x59]; + +/// Over a white canvas ([`white_canvas`]), the labels among `overlays` that name an artboard (the +/// Artboard tool's names of its selected artboards) draw in [`SELECTED_NAME_ON_WHITE`]. +fn names_on_a_white_canvas(app: &VectorcraftApp, overlays: &mut [Overlay]) { + if !white_canvas(app, app.outline_view()) { + return; + } + for o in overlays { + if let Overlay::Label { text, color, .. } = o + && artboards::names_an_artboard(text) + { + *color = SELECTED_NAME_ON_WHITE; + } + } } /// The edges, bleeds, marks and names of `doc`'s artboards, `active_ab` the active one, the names diff --git a/crates/ui-egui/src/canvas/panes.rs b/crates/ui-egui/src/canvas/panes.rs index 63d89f2be2..54622c48bd 100644 --- a/crates/ui-egui/src/canvas/panes.rs +++ b/crates/ui-egui/src/canvas/panes.rs @@ -585,7 +585,7 @@ fn draw_pane(app: &mut VectorcraftApp, ui: &Ui, w: Win, cell: egui::Rect) -> boo grid(&painter, &xf, st.doc.grid.spacing, st.doc.grid.subdivisions, look); } if shows_artboards(app) { - artboard_edges(app, &st.doc, (&painter, &xf, &t), (v.artboard, dim_on_canvas(&t, v.outline)), |_| false); + artboard_edges(app, &st.doc, (&painter, &xf, &t), (v.artboard, dim_on_canvas(app, &t, (v.outline, false))), |_| false); } if app.ui.view.guides_shown() { guides_of(app, st, (&painter, &xf, &t), rect); diff --git a/crates/ui-egui/src/canvas/tests.rs b/crates/ui-egui/src/canvas/tests.rs index 1922842acd..88b45a8a0f 100644 --- a/crates/ui-egui/src/canvas/tests.rs +++ b/crates/ui-egui/src/canvas/tests.rs @@ -3335,6 +3335,7 @@ fn pixel_preview_shows_the_document_pixels() { #[test] fn the_canvas_is_drawn_through_the_display_profile_while_the_preference_is_on() { use crate::display_profile::{Found, Reading}; + let _view = crate::dialogs::proof_setup::tests::keeping_the_proof_view(); let mut app = VectorcraftApp::new(Session::new(), Default::default()); app.session.execute("file.new", &json!({"width": 400, "height": 300})).unwrap(); app.session.execute("shape.rectangle", &json!({"x": 100, "y": 50, "width": 200, "height": 200})).unwrap(); @@ -3515,6 +3516,88 @@ fn translucent_art_over_the_paper() { assert!(app.canvas.key.as_ref().is_some_and(|k| k.outline && k.backdrop.is_none())); } +/// With a display profile, in Overprint Preview translucent art around the artboards is blended +/// with the white canvas before the conversion, as art over the paper is. With the preview off it +/// converts alone, over the pasteboard. +#[test] +fn translucent_art_around_the_artboards_is_blended_with_overprint_previews_white_canvas() { + let _view = crate::dialogs::proof_setup::tests::changing_the_proof_view(); + vectorcraft_color::cms::with_active(vectorcraft_color::cms::active(), translucent_art_around_the_artboards); +} + +fn translucent_art_around_the_artboards() { + use crate::display_profile::{Found, Reading}; + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.run("file.new", json!({"width": 400, "height": 300})).unwrap(); + app.ui.task_bar = false; + app.ui.view.rulers = false; + app.canvas.worker_started = true; // every frame on this thread + // Left of the artboard. + let outside = app.run("shape.rectangle", json!({"x": -60, "y": 100, "width": 40, "height": 40})).unwrap()["id"].clone(); + app.run("paint.setFill", json!({"ids": [outside], "color": "#00ff00"})).unwrap(); + app.run("transparency.set", json!({"ids": [outside], "opacity": 50})).unwrap(); + app.run("select.none", json!({})).unwrap(); + let ctx = egui::Context::default(); + // The whole art raster one frame uploads: its width and its pixels. + let upload = |app: &mut VectorcraftApp| -> Option<(usize, Vec)> { + let (_, mut delta) = frame_output(app, &ctx); + let art = app.canvas.texture.as_ref()?.id(); + let up = delta.set.iter().find(|e| e.0.eq(&art)).and_then(|e| e.1.last()).filter(|d| d.pos.is_none()).map(|d| { + let egui::ImageData::Color(img) = &d.image; + (img.width(), img.pixels.clone()) + }); + delta.clear(); + up + }; + upload(&mut app).expect("the first frame"); + let v = app.view_mut().unwrap(); + (v.zoom, v.center) = (1.0, Point::new(120.0, 150.0)); + upload(&mut app).expect("the view at 100%"); + let p3 = crate::display_profile::tests::p3(); + let t = vectorcraft_color::cms::display::DisplayTransform::from_icc(&p3).unwrap(); + app.display_profile.report(Reading { display: Some("DP-1".into()), found: Found::Profile { icc: p3, from: "test".into() } }); + upload(&mut app).expect("drawn again, converted"); + let white = t.apply8([255; 3]); + let over = |c: egui::Color32, under: [u8; 3]| { + let k = 255 - u32::from(c.a()); + [0, 1, 2].map(|i| u32::from(c.to_array()[i]) + (u32::from(under[i]) * k + 127) / 255) + }; + let plain = |s: egui::Color32| { + let mut px = s.to_array(); + t.apply_premultiplied(&mut px); + egui::Color32::from_rgba_premultiplied(px[0], px[1], px[2], px[3]) + }; + // The pixel at the translucent rectangle's center, in sRGB (the display profile's preference + // off) and as the canvas shows it (on). + let pixel = |app: &mut VectorcraftApp| { + app.session.prefs.monitor_profile_display = false; + let (width, srgb) = upload(app).expect("drawn in sRGB"); + let key = app.canvas.key.clone().unwrap(); + let view = View { zoom: key.zoom, center: Point::new(key.cx, key.cy), rotation: key.rot, ..View::default() }; + let (_, _, view) = frame_view(None, (key.w, key.h), &view, key.ppp); + let at = view * Point::new(-40.0, 120.0); + let at = at.y as usize * width + at.x as usize; + app.session.prefs.monitor_profile_display = true; + let (_, shown) = upload(app).expect("drawn again, converted"); + (srgb[at], shown[at], app.canvas.key.clone().unwrap()) + }; + let (s, c, key) = pixel(&mut app); + assert!((50..=205).contains(&s.a()), "the 50% fill: {s:?}"); + assert!(key.backdrop.as_ref().is_some_and(|b| b.everywhere.is_none()), "Preview: the pasteboard is no paper"); + assert_eq!(c, plain(s), "over the pasteboard the art converts alone"); + app.run("view.overprintPreview", json!({"on": true})).unwrap(); + let (s, c, key) = pixel(&mut app); + assert!((50..=205).contains(&s.a()), "the 50% fill: {s:?}"); + assert_eq!(key.backdrop.as_ref().and_then(|b| b.everywhere), Some([255; 3]), "the white canvas is paper"); + let k = 255 - u32::from(s.a()); + let mix = [0, 1, 2].map(|j| (u32::from(s.to_array()[j]) + (255 * k + 127) / 255).min(255) as u8); + let (want, got) = (t.apply8(mix), over(c, white)); + assert!((0..3).all(|j| got[j].abs_diff(u32::from(want[j])) <= 1), "{got:?} shown, {want:?} wanted"); + // The test tells the two apart: the fill converted alone shows another color over the white canvas. + let alone = over(plain(s), white); + assert!((0..3).any(|j| alone[j].abs_diff(got[j]) > 2), "{alone:?} and {got:?}"); +} + /// View › Hide Template (#2000): a template layer's art leaves the canvas, and Show Template /// draws it again, dimmed as before; each re-renders at once. #[test] @@ -6705,6 +6788,7 @@ fn canvas_look(app: &mut VectorcraftApp, ctx: &egui::Context) -> (Vec, /// Preview the pasteboard keeps its color and the artboards their white paper. #[test] fn outline_draws_on_a_white_canvas_with_artboards_as_edges() { + let _view = crate::dialogs::proof_setup::tests::keeping_the_proof_view(); let mut app = VectorcraftApp::new(Session::new(), Default::default()); app.session.execute("file.new", &json!({"width": 200, "height": 100, "artboards": 2})).unwrap(); for brightness in crate::theme::Brightness::ALL { @@ -6744,6 +6828,7 @@ fn outline_draws_on_a_white_canvas_with_artboards_as_edges() { /// artboard's color and the paper color over the whole canvas. #[test] fn outline_draws_no_colored_paper() { + let _view = crate::dialogs::proof_setup::tests::keeping_the_proof_view(); let mut app = VectorcraftApp::new(Session::new(), Default::default()); app.session.execute("file.new", &json!({"width": 200, "height": 100, "artboards": 2})).unwrap(); { @@ -6778,11 +6863,111 @@ fn outline_draws_no_colored_paper() { assert_eq!(edges, 0); } +/// In Overprint Preview, and in Separations Preview, which turns it on, the canvas outside the +/// artboards is white instead of the pasteboard color in every interface brightness, the artboards +/// draw no shadows, and their names draw in the dark gray that shows on white. Where the Artboard +/// tool darkens the canvas, the names are black and the tool's names of its selected artboards dark +/// blue. The artboards keep their paper and edges. Turning it off brings back the pasteboard, the +/// shadows and the theme's names. +#[test] +fn overprint_preview_draws_a_white_canvas_without_shadows() { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.session.execute("file.new", &json!({"width": 200, "height": 100, "artboards": 2})).unwrap(); + // The filled shapes laid over an artboard moved down and right, as a shadow is. + let shadows = |app: &mut VectorcraftApp, ctx: &egui::Context| { + let s = shapes(app, ctx); + let xf = Xf::new(app.canvas_rect.unwrap(), app.view().unwrap()); + let quads: Vec> = app.session.active().unwrap().doc.artboards.iter().map(|a| xf.quad(a.rect).to_vec()).collect(); + let moved = |p: &[Pos2]| { + quads.iter().any(|q| { + let d = p.first().zip(q.first()).map(|(a, b)| *a - *b); + d.is_some_and(|d| { + d.x > 0.5 && (d.x - d.y).abs() < 0.01 && q.len() == p.len() && q.iter().zip(p).all(|(a, b)| (*a + d - *b).length() < 0.01) + }) + }) + }; + s.iter().filter(|s| matches!(s, Shape::Path(p) if p.fill != Color32::TRANSPARENT && moved(&p.points))).count() + }; + let rgb = |[r, g, b]: [u8; 3]| Color32::from_rgb(r, g, b); + let (selected_blue, dark_blue) = (rgb(vectorcraft_tools::xform::BLUE), rgb(SELECTED_NAME_ON_WHITE)); + let _view = crate::dialogs::proof_setup::tests::changing_the_proof_view(); + for brightness in crate::theme::Brightness::ALL { + let ctx = egui::Context::default(); + crate::theme::apply(&ctx, brightness); + let t = Tokens::get(&ctx); + assert_ne!(t.pasteboard, Color32::WHITE, "{brightness:?}"); + let steps = [ + ("view.overprintPreview", false), + ("view.overprintPreview", true), + ("view.overprintPreview", false), + ("view.separationsPreview", true), + ("view.separationsPreview", false), + ]; + for (command, on) in steps { + let case = format!("{brightness:?} {command} {on}"); + app.run(command, json!({"on": on})).unwrap(); + assert_eq!(vectorcraft_render::proof::overprint_preview_on(), on, "{case}"); + let (covers, papers, edges, names) = canvas_look(&mut app, &ctx); + assert_eq!(papers, [Color32::WHITE; 2], "{case}: the artboards keep their paper"); + assert_eq!(edges, 2, "{case}"); + if on { + assert_eq!(covers.last(), Some(&Color32::WHITE), "{case}: the canvas is white"); + assert!(!covers.contains(&t.pasteboard), "{case}: no pasteboard: {covers:?}"); + assert_eq!(shadows(&mut app, &ctx), 0, "{case}: no artboard shadows"); + assert_eq!(names, [OUTLINE_DIM; 2], "{case}: names readable on white"); + // The Artboard tool darkens the canvas around the artboards (Fade Region Outside + // Artboard) and labels its selected artboard itself: the other artboard's name is + // black, and the tool's name dark blue. + app.select_tool("artboard"); + let (_, _, _, names) = canvas_look(&mut app, &ctx); + assert!(names.contains(&Color32::BLACK), "{case}: names readable on the faded canvas: {names:?}"); + assert!(names.contains(&dark_blue), "{case}: {names:?}"); + assert!(!names.contains(&OUTLINE_DIM) && !names.contains(&selected_blue), "{case}: {names:?}"); + app.select_tool("selection"); + } else { + assert_eq!(covers.last(), Some(&t.pasteboard), "{case}: the pasteboard"); + assert!(shadows(&mut app, &ctx) > 0, "{case}: the artboards' shadows"); + assert_eq!(names, [t.text_dim; 2], "{case}"); + // Over the pasteboard the Artboard tool's name keeps its blue. + app.select_tool("artboard"); + let (_, _, _, names) = canvas_look(&mut app, &ctx); + assert!(names.contains(&selected_blue), "{case}: {names:?}"); + app.select_tool("selection"); + } + } + } +} + +/// In Outline, where the Artboard tool's Fade Region Outside Artboard darkens the white canvas, +/// the artboards' names are black and the tool's names of its selected artboards dark blue. With +/// Fade Region Outside Artboard off, the names keep Outline's dark gray. +#[test] +fn outline_names_show_on_the_faded_canvas() { + let _view = crate::dialogs::proof_setup::tests::keeping_the_proof_view(); + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.session.execute("file.new", &json!({"width": 200, "height": 100, "artboards": 2})).unwrap(); + let ctx = egui::Context::default(); + crate::theme::apply(&ctx, crate::theme::Brightness::Dark); + app.view_mut().unwrap().outline = true; + app.select_tool("artboard"); + assert!(app.session.prefs.fade_region_outside_artboard, "on by default"); + let [r, g, b] = SELECTED_NAME_ON_WHITE; + let dark_blue = Color32::from_rgb(r, g, b); + let (_, _, _, names) = canvas_look(&mut app, &ctx); + assert!(names.contains(&Color32::BLACK) && names.contains(&dark_blue), "{names:?}"); + assert!(!names.contains(&OUTLINE_DIM), "{names:?}"); + app.session.prefs.fade_region_outside_artboard = false; + let (_, _, _, names) = canvas_look(&mut app, &ctx); + assert!(names.contains(&OUTLINE_DIM) && names.contains(&dark_blue), "{names:?}"); + assert!(!names.contains(&Color32::BLACK), "{names:?}"); +} + /// A split-view pane or floating window draws its own view's Outline, whatever the current view /// shows: the white canvas and dark gray artboard names in Outline, and the pasteboard and the /// theme's names in Preview. #[test] fn a_pane_draws_its_own_views_outline() { + let _view = crate::dialogs::proof_setup::tests::keeping_the_proof_view(); let mut app = VectorcraftApp::new(Session::new(), Default::default()); app.run("file.new", json!({"width": 200, "height": 100, "artboards": 2})).unwrap(); crate::doc_windows::new_window(&mut app).unwrap(); @@ -6823,6 +7008,7 @@ fn a_pane_draws_its_own_views_outline() { #[test] fn a_pane_blends_translucent_art_before_the_display_profile() { use crate::display_profile::{Found, Reading}; + let _view = crate::dialogs::proof_setup::tests::keeping_the_proof_view(); let mut app = VectorcraftApp::new(Session::new(), Default::default()); app.run("file.new", json!({"width": 200, "height": 100})).unwrap(); let half = app.run("shape.rectangle", json!({"x": 50, "y": 25, "width": 100, "height": 50})).unwrap()["id"].clone(); @@ -6892,6 +7078,7 @@ fn a_pane_blends_translucent_art_before_the_display_profile() { #[test] fn the_ruler_origin_crosshair_shows_on_the_outline_canvas() { use egui::Event; + let _view = crate::dialogs::proof_setup::tests::keeping_the_proof_view(); for outline in [false, true] { let mut app = VectorcraftApp::new(Session::new(), Default::default()); app.run("file.new", json!({"width": 400, "height": 300})).unwrap(); @@ -13921,6 +14108,7 @@ fn the_task_bar_stays_up_through_a_click_and_gives_way_to_a_drag() { /// the Artboard tool still shows them. #[test] fn hidden_artboards_leave_a_paper_canvas_without_edges() { + let _view = crate::dialogs::proof_setup::tests::keeping_the_proof_view(); let mut app = VectorcraftApp::new(Session::new(), Default::default()); app.run("file.new", json!({"width": 400, "height": 300})).unwrap(); let ctx = egui::Context::default(); diff --git a/crates/ui-egui/src/control/tests.rs b/crates/ui-egui/src/control/tests.rs index 96c4880d39..5be51f84a6 100644 --- a/crates/ui-egui/src/control/tests.rs +++ b/crates/ui-egui/src/control/tests.rs @@ -1257,6 +1257,7 @@ fn menu_dialogs_open_after_a_merge_on_another_thread() { /// leave the view off, so they apply it by command id without giving the documents new revisions. #[test] fn panels_that_redraw_apply_a_merge_on_another_thread_first() { + let _view = crate::dialogs::proof_setup::tests::changing_the_proof_view(); let cases = [ ("view.separationsPreview", json!({"on": false})), ("view.overprintPreview", json!({"on": false})), diff --git a/crates/ui-egui/src/dialogs/proof_setup.rs b/crates/ui-egui/src/dialogs/proof_setup.rs index 735fafaaef..b0b772f316 100644 --- a/crates/ui-egui/src/dialogs/proof_setup.rs +++ b/crates/ui-egui/src/dialogs/proof_setup.rs @@ -521,6 +521,12 @@ pub(crate) mod tests { VIEW.read().unwrap_or_else(|e| e.into_inner()) } + /// Lets a test elsewhere change the proof view: the tests that change or keep it wait while the + /// guard lives, and dropping it puts back the default view. + pub(crate) fn changing_the_proof_view() -> impl Drop { + DefaultView::new() + } + fn frame(app: &mut VectorcraftApp, ctx: &egui::Context) { let mut out = ctx.run_ui(egui::RawInput::default(), |ui| super::super::show(app, ui.ctx())); out.textures_delta.clear(); diff --git a/crates/ui-egui/src/display_profile.rs b/crates/ui-egui/src/display_profile.rs index a1acf8ebbe..b4b9ed2d6c 100644 --- a/crates/ui-egui/src/display_profile.rs +++ b/crates/ui-egui/src/display_profile.rs @@ -273,7 +273,8 @@ pub(crate) fn convert(t: Option<&DisplayTransform>, pixels: &mut [u8]) { /// The pasteboard and Outline's white canvas are interface colors and are not part of it. #[derive(Clone, Debug, PartialEq)] pub struct Backdrop { - /// View › Hide Artboards: the sRGB color of the paper that covers the whole canvas. + /// The sRGB color of the paper where no artboard is: with View › Hide Artboards the paper that + /// covers the whole canvas, and in Overprint Preview the white canvas around the artboards. pub(crate) everywhere: Option<[u8; 3]>, /// The artboards in the order they are drawn (the last on top), each with its paper's sRGB color. pub(crate) artboards: Vec<(Rect, [u8; 3])>, @@ -430,9 +431,10 @@ impl<'a> Over<'a> { } } - /// The paper at pixel `i` of the row at height `y`, whose artboard on top is `owner`. + /// The paper at pixel `i` of the row at height `y`, whose artboard on top is `owner`: the paper + /// where no artboard is when there is none. fn paper_at(&self, owner: u32, i: usize, y: f64) -> Option { - let b = self.boards.get(owner as usize)?; + let Some(b) = self.boards.get(owner as usize) else { return self.everywhere }; Some(match &self.grid { Some((colors, cell)) => { let p = self.to_doc * Point::new(i as f64 + 0.5, y); @@ -459,7 +461,7 @@ impl<'a> Over<'a> { } let paper = if a == 255 { None - } else if self.everywhere.is_some() { + } else if self.boards.is_empty() { self.everywhere } else { if !found { @@ -497,8 +499,9 @@ impl<'a> Over<'a> { /// [`convert`], with each translucent pixel over the paper or the transparency grid of `backdrop` /// blended with it in sRGB before the conversion. The canvas draws the art over the paper /// converted: such a pixel keeps its alpha and takes the color that, drawn over the converted -/// paper, shows the blend converted. Opaque and fully transparent pixels, and pixels over the -/// pasteboard, convert as [`convert`] converts them. The pixels are rows of `width`; `view` maps the +/// paper, shows the blend converted. Translucent pixels where no artboard is are blended with the +/// backdrop's paper there (`everywhere`) when it has one. Opaque and fully transparent pixels, and +/// pixels over the pasteboard, convert as [`convert`] converts them. The pixels are rows of `width`; `view` maps the /// document to them, and the backdrop's `zoom` is the canvas's screen points per document point, /// in which the grid's cells are measured. pub(crate) fn convert_over(t: Option<&DisplayTransform>, pixels: &mut [u8], width: u32, view: Affine, backdrop: Option<(&Backdrop, f64)>) { @@ -682,6 +685,21 @@ pub(crate) mod tests { assert_eq!(srgb, row(20, half_red)); } + /// Overprint Preview's white canvas is paper too: translucent pixels around the artboards are + /// blended with it, and pixels on an artboard with the artboard's own paper. + #[test] + fn translucent_pixels_around_the_artboards_are_blended_with_the_white_canvas() { + let t = DisplayTransform::from_icc(&p3()).unwrap(); + let half_red = [128, 0, 0, 128]; + let dark = [40; 3]; + let b = Backdrop { everywhere: Some([255; 3]), artboards: vec![(Rect::new(0.0, 0.0, 10.0, 1.0), dark)], grid: None }; + let mut px = row(20, half_red); + convert_over(Some(&t), &mut px, 20, Affine::IDENTITY, Some((&b, 1.0))); + let at = |i: usize| -> [u8; 4] { px[i * 4..i * 4 + 4].try_into().unwrap() }; + assert_near(shown_over(at(2), t.apply8(dark)), blended(&t, half_red, dark), "on the artboard"); + assert_near(shown_over(at(15), t.apply8([255; 3])), blended(&t, half_red, [255; 3]), "around the artboards"); + } + #[test] fn the_backdrop_is_found_through_the_view() { let t = DisplayTransform::from_icc(&p3()).unwrap(); diff --git a/docs/mcp.md b/docs/mcp.md index 3c577e0356..37332352f4 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -5080,7 +5080,9 @@ Each fill and stroke (and each character's fill and stroke) can overprint: its i of knocking them out. `object.setOverprint {fill?, stroke?, item?, ids?}` sets it (groups set their contents, type its characters too; `item` aims at one appearance item) and `attributes.info {ids?}` reads it back (`null` where the objects differ). Overprint Preview (`view.overprintPreview`) and Separations Preview show it; rendering approximates -it by darkening (the stronger ink of each plate wins, so a colour overprinting itself stays that colour). Older files that listed Overprint Black objects in the document get the flags on load. +it by darkening (the stronger ink of each plate wins, so a colour overprinting itself stays that colour). While either +preview is on, the canvas around the artboards is white instead of the pasteboard color and the artboards draw no +shadows; turning it off brings both back. Older files that listed Overprint Black objects in the document get the flags on load. PDF export writes them with `advanced.overprint: "preserve"` (the default): each overprinting fill and stroke sets a graphics state with `/OP true /op true /OPM 1` (`/OPM 0` in PDF/A). With `discardWhiteOverprint` (`document.setup`, on by default) white ones knock out instead; `"discard"` writes none. @@ -8412,7 +8414,8 @@ profile again leaves the canvas as it is. Exports, `ui.render`, the document, panels and thumbnails are not converted; with Proof Colors on, the proof is drawn first and then converted. Translucent art and the antialiased edges of art over an artboard's paper or the transparency grid are blended with it in sRGB, and the blend is converted; over the pasteboard and in Outline the art -is converted on its own. +is converted on its own. In Overprint Preview the white canvas around the artboards is paper too, and the art there is +blended with it. `ui.inspect` returns `displayProfile`: `{enabled, display, source, profile, from, applied, reason, osManaged, readRequested}`, where `source` is `profile`, `srgbProfile` (a profile that shows sRGB unchanged), `system`, `none`, `pending` or `unsupported`, `applied` says whether the canvas is converted, `reason` says why not, and `readRequested` diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 3da663c191..b84699f7a6 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -911,7 +911,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - **Assign Profile's three choices:** the Assign rows of Edit › Assign Profile… (the Separations panel's Color Settings section) offer Don't Color Manage This Document, the working space of the document's color mode (Working RGB or Working CMYK, with its name) and Profile with the other profiles of that kind, as [Assign or remove a color profile](https://help.adobe.com/archive/en_US/illustrator/cs3/illustrator_cs3_help.pdf#page=150) lists them. They act on the profile of the document's color mode: an RGB document's RGB profile, a CMYK document's CMYK profile; the other model's profile stays as it is (VectorCraft's own rule; Document Setup › Color sets both). Picking the working space assigns its profile, which stays when the working space changes later. A choice the document already has runs nothing. Tests in `panels/separations.rs`. - **Canvas through the display's profile on Windows and X11:** Preferences › Performance › Use Monitor Profile for Canvas (on by default) converts the canvas's art, artboard paper and transparency grid from sRGB into the ICC profile of the display that shows most of the main window, after any proof, as the help page describes the monitor's profile translating the document's colors for the monitor ([the help page](https://help.adobe.com/archive/en_US/illustrator/cs4/illustrator_cs4_help.pdf#page=151)). Windows gives the display's default profile, and a display with Advanced Color on is left to Windows ([Microsoft Learn](https://learn.microsoft.com/en-us/windows/win32/wcs/advanced-color-icc-profiles)); X11 gives colord's profile for the output or the `_ICC_PROFILE` property. macOS converts the window itself, and a Wayland session stays sRGB. `ui.inspect` reports `displayProfile`. Tests in `color/src/cms/display.rs`, `ui-egui/src/display_profile.rs` and `canvas::tests::the_canvas_is_drawn_through_the_display_profile_while_the_preference_is_on`. - **Refresh Monitor Profile:** Edit › Refresh Monitor Profile (`view.refreshMonitorProfile`), VectorCraft's own command, reads the display's profile again on the next frame instead of waiting up to 10 seconds, so a profile installed or changed while the app runs is used without a restart; a request made while a reading runs starts when it ends, and the command is off while Use Monitor Profile for Canvas is off. `ui.inspect`'s `displayProfile.readRequested` reports a request that hasn't started. Tests `display_profile::tests::a_requested_reading_starts_on_the_next_frame_past_both_intervals`, `a_request_made_while_a_reading_runs_waits_for_it_to_end`, `a_request_is_dropped_when_the_preference_goes_off` (desktop app) and `menus::tests::refresh_monitor_profile_asks_for_a_reading_of_the_display_profile`. -- **Translucent art blended before the display profile:** with Use Monitor Profile for Canvas converting, translucent art and the anti-aliased edges of art over an artboard's paper, a colored artboard or the transparency grid are blended with it in sRGB and the blend is converted, so the monitor's profile translates the document's colors as they are composited ([the help page](https://help.adobe.com/archive/en_US/illustrator/cs4/illustrator_cs4_help.pdf#page=151)). The frame rendered whole, the part an edit renders again, the render worker's frame, the pan fill and the other windows' panes do the same; over the pasteboard and in Outline the art is converted on its own, and with no profile to convert into nothing changes. Tests `display_profile::tests::translucent_pixels_over_the_paper_are_blended_before_they_are_converted`, `the_transparency_grid_is_blended_cell_by_cell`, `the_backdrop_is_found_through_the_view` and `canvas::tests::translucent_art_over_the_paper_is_blended_before_the_display_profile`. +- **Translucent art blended before the display profile:** with Use Monitor Profile for Canvas converting, translucent art and the anti-aliased edges of art over an artboard's paper, a colored artboard or the transparency grid are blended with it in sRGB and the blend is converted, so the monitor's profile translates the document's colors as they are composited ([the help page](https://help.adobe.com/archive/en_US/illustrator/cs4/illustrator_cs4_help.pdf#page=151)). The frame rendered whole, the part an edit renders again, the render worker's frame, the pan fill and the other windows' panes do the same; over the pasteboard and in Outline the art is converted on its own, in Overprint Preview the art around the artboards is blended with its white canvas, and with no profile to convert into nothing changes. Tests `display_profile::tests::translucent_pixels_over_the_paper_are_blended_before_they_are_converted`, `the_transparency_grid_is_blended_cell_by_cell`, `the_backdrop_is_found_through_the_view` and `canvas::tests::translucent_art_over_the_paper_is_blended_before_the_display_profile`. - **Out-of-gamut warning after a profile change:** the out-of-gamut warning and its closest-color correction in the Color panel and Color Picker ([the help page](https://helpx.adobe.com/illustrator/using/adjusting-colors.html)) check the color against the document's assigned CMYK profile, else the working CMYK space, and update when Edit › Assign Profile… or Edit › Color Settings… changes that space or a loaded profile changes, without a change of color. Which CMYK space the warning uses is VectorCraft's own rule. Tests: `gamut_warning_follows_a_profile_change` and `gamut_warning_follows_a_profile_loaded_again` in `dialogs/color_picker/tests.rs`. - **Swatch Options and New Swatch color warnings:** both dialogs show the out-of-gamut triangle and the out-of-web-color cube under the color, each with its correction beside it, and a click on the icon or the correction shifts the color to the closest printable or web-safe color ([the archived user guide](https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf#page=236), Swatch options; [the help page](https://helpx.adobe.com/illustrator/using/adjusting-colors.html)). The icons in the Color panel and the Color Picker correct the color too. VectorCraft's own rules: the triangle shows in RGB, HSB and Lab and the cube in every mode but Web Safe RGB, both can show at once, a web correction of a Grayscale, Lab or CMYK color is edited in RGB, a gamut correction keeps the CMYK equivalent and is edited in CMYK, and a correction keeps the name, the color type and Global and changes the dialog's fields only, so OK records one undo step. Tests: `swatch_options_shows_and_corrects_both_warnings` and `swatch_warnings_follow_the_mode` in `dialogs/swatch_options.rs`, `a_warning_corrects_the_new_colour_only_until_ok` in `dialogs/new_swatch.rs`. - **Assign Profile and the working spaces:** Edit › Assign Profile… tags the document and leaves the working spaces of Edit › Color Settings… as they are, in Color Settings, the Separations panel and the settings saved for the next start. Colors show and convert through the profiles assigned; a change in Color Settings keeps the profiles the document in front is assigned in use, and removing an assigned profile in use puts the working space back in its place. The profiles in use follow the document in front: a new, opened or reverted document, a switch to another tab, a close, Undo and Redo of Assign Profile, a failed batch, each step of a batch, Export All Open and the update of placed documents put that document's profiles in use, and the working spaces where it is assigned none or no document is open. With Window › Arrange › Tile or floating document windows, each document behind the front one draws its art, paper and transparency grid through its own assigned profiles, and loading or removing a profile redraws the documents assigned it; placed documents inside it still draw through the front document's profiles. How documents behind the front one draw is VectorCraft's own rule. View › Proof Setup › Working CMYK simulates the working CMYK space of Color Settings in Proof Colors and Separations Preview, also in a document assigned another CMYK profile. Public references: [Changing the color profile for a document and About color working spaces](https://help.adobe.com/archive/en_US/illustrator/cs3/illustrator_cs3_help.pdf#page=150) and [Soft-proof presets](https://help.adobe.com/archive/en_US/illustrator/cs3/illustrator_cs3_help.pdf#page=134). Tests in `engine/tests/color_settings.rs`. @@ -1633,7 +1633,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - **Navigator panel options:** the Navigator panel menu's Panel Options… sets the color the view box is drawn in, from a preset list (VectorCraft's own: Light Red, the default, then the layer colors) or a custom color, and Draw Dashed Lines as Solid Lines, off by default, which draws dashed strokes without their dashes in the panel's thumbnail only (`ui.navigatorPanelOptions`; kept with the UI state; behavior reference: [View artwork](https://helpx.adobe.com/illustrator/using/viewing-artwork.html)). - **Attributes panel options:** the Attributes panel menu's Panel Options… sets how many recent URLs the URL menu lists, a whole number from 1 to 30 (10 by default, VectorCraft's own value); the panel keeps the 30 newest URLs of the session, so a lower count hides older URLs without removing them (`ui.attributesPanelOptions`; kept with the UI state; behavior reference: [Create image maps for web graphics](https://helpx.adobe.com/illustrator/desktop/save-and-export/export-files-to-different-formats/create-image-maps-for-web-graphics.html); test `panel_options_set_how_many_recent_urls_the_menu_lists`). - **Navigator View Artboard Contents Only:** the Navigator panel menu's View Artboard Contents Only is on by default, and the thumbnail then shows only the art inside the artboards, with art on the pasteboard and in the gaps between artboards left out; turning it off shows the art outside the artboards too (`ui.navigatorPanelOptions {viewArtboardContentsOnly}`; kept with the UI state, read as on when it was never saved; the fit to the artboards' union and the cut at each artboard's edge are VectorCraft's own rules; behavior references: [Navigate and zoom artwork](https://helpx.adobe.com/illustrator/desktop/get-started/learn-the-basics/navigate-and-zoom-artwork.html), [View artwork](https://helpx.adobe.com/illustrator/using/viewing-artwork.html)). -- **Views:** the status bar's artboard navigator (first, previous, next, last; `view.goToArtboard`) goes to an artboard, fits it and synchronizes the Artboard tool selection when that tool is active; ordinary object selection is preserved. Its four buttons are also commands of their own (`view.firstArtboard`, `view.previousArtboard`, `view.nextArtboard`, `view.lastArtboard`), listed in Edit › Keyboard Shortcuts without a default key, so a user can give them keys such as Page Up and Page Down (#5218). Actual Next-button regressions cover keyboard/Properties deletion and Undo in `chrome.rs`. Fit Artboard in Window and Actual Size show the navigator's artboard. The Artboards panel highlights that active artboard: clicking a row makes it active (the Artboard tool's too, while it is chosen) as does clicking an artboard with the Artboard tool, double-clicking its number also fits it in the window and double-clicking its name renames it. Duplicate Artboards, or a row dragged onto New Artboard, copies the artboard with its art (#446). Escape leaves Presentation Mode, `view.screenMode` from it goes back to Normal Screen Mode, and the screen mode isn't saved with the preferences: the app always starts in Normal Screen Mode with its menus and panels (#472). View › Pixel Preview shows the art as the document pixels it rasterizes to, one per point and hard-edged when magnified, turning with a rotated view (it used to draw the smooth vectors, with only the pixel grid over them). In Outline view a template layer keeps drawing in Preview, dimmed, so a picture placed to be traced stays visible under the outlines (#1505, fixes #1486). Outline view draws on a white canvas in every interface brightness and Canvas Color, pasteboard included, with the artboards as their edges and no paper (VectorCraft's own rule), so the black outlines of art on the pasteboard show. +- **Views:** the status bar's artboard navigator (first, previous, next, last; `view.goToArtboard`) goes to an artboard, fits it and synchronizes the Artboard tool selection when that tool is active; ordinary object selection is preserved. Its four buttons are also commands of their own (`view.firstArtboard`, `view.previousArtboard`, `view.nextArtboard`, `view.lastArtboard`), listed in Edit › Keyboard Shortcuts without a default key, so a user can give them keys such as Page Up and Page Down (#5218). Actual Next-button regressions cover keyboard/Properties deletion and Undo in `chrome.rs`. Fit Artboard in Window and Actual Size show the navigator's artboard. The Artboards panel highlights that active artboard: clicking a row makes it active (the Artboard tool's too, while it is chosen) as does clicking an artboard with the Artboard tool, double-clicking its number also fits it in the window and double-clicking its name renames it. Duplicate Artboards, or a row dragged onto New Artboard, copies the artboard with its art (#446). Escape leaves Presentation Mode, `view.screenMode` from it goes back to Normal Screen Mode, and the screen mode isn't saved with the preferences: the app always starts in Normal Screen Mode with its menus and panels (#472). View › Pixel Preview shows the art as the document pixels it rasterizes to, one per point and hard-edged when magnified, turning with a rotated view (it used to draw the smooth vectors, with only the pixel grid over them). In Outline view a template layer keeps drawing in Preview, dimmed, so a picture placed to be traced stays visible under the outlines (#1505, fixes #1486). Outline view draws on a white canvas in every interface brightness and Canvas Color, pasteboard included, with the artboards as their edges and no paper (VectorCraft's own rule), so the black outlines of art on the pasteboard show. Overprint Preview and Separations Preview draw the canvas around the artboards in white, with no artboard shadows (VectorCraft's own rule), and turning them off brings back the pasteboard color and the shadows. In Presentation Mode, → and ← go to the next and the previous artboard, and a click anywhere goes to the next one, as the status bar navigator's Next and Previous do (`view.goToArtboard`): on the last artboard → and a click leave the view as it is, and so does ← on the first. The arrow keys do not move the selection there, and the tool does not receive a click, so a click selects and draws nothing (behavior reference: [View artwork](https://helpx.adobe.com/illustrator/using/viewing-artwork.html)). Full Screen Mode and Presentation Mode put the window full screen, covering the taskbar and the window's frame, and Normal Screen Mode or Full Screen Mode with Menu Bar puts it back (#4365); a window the user made full screen stays so. An unmodified Escape in either Full Screen Mode exits to Normal Screen Mode after any open popup, focused field, tool gesture, ruler-origin drag, floating Tools panel move, edit mode, drawer, flyout or view rotation has taken its Escape; a later Escape exits when that action is finished. This is a VectorCraft choice for both full screen variants, based on the public [shortcut list](https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html); the list does not specify that priority or the return mode. diff --git a/docs/ui-parity.md b/docs/ui-parity.md index e9fd857a9d..244e96035c 100644 --- a/docs/ui-parity.md +++ b/docs/ui-parity.md @@ -540,6 +540,7 @@ next unit in the order a right-click on a ruler lists them, from Feet back to Po | Tabs panel: a stop drags from where the press landed, a stop just added included | done | #1458 | | Outline view keeps template layers in Preview, dimmed | done | #1486; a picture placed to be traced stays visible under the outlines | | Outline view draws on a white canvas, the artboards as their edges | done | Outline shows only the paths ([Outline mode](https://helpx.adobe.com/illustrator/desktop/get-started/learn-the-basics/preview-artwork-as-outlines.html)). VectorCraft's own rule for the canvas: in every interface brightness and Canvas Color the whole canvas is white, pasteboard included; the artboards draw no paper (no Simulate Colored Paper or artboard color, and no paper with Hide Artboards); the artboard names and the ruler origin's crosshair are dark gray; split views and floating windows follow their own view. Tests `outline_draws_on_a_white_canvas_with_artboards_as_edges`, `outline_draws_no_colored_paper`, `a_pane_draws_its_own_views_outline`, `the_ruler_origin_crosshair_shows_on_the_outline_canvas` | +| Overprint Preview draws a white canvas around the artboards, with no artboard shadows | done | VectorCraft's own rule, in Overprint Preview and in Separations Preview, which turns it on: the canvas outside the artboards is white in every interface brightness, the artboards keep their paper and edges and draw no shadows, and the artboard names and the ruler origin's crosshair are dark gray. Where the Artboard tool's Fade Region Outside Artboard darkens a white canvas (here and in Outline) the names are black, and over a white canvas the Artboard tool's names of its selected artboards are dark blue. With a display profile, translucent art around the artboards is blended with the white canvas. Turning the preview off brings back the pasteboard color and the shadows. Tests `overprint_preview_draws_a_white_canvas_without_shadows`, `outline_names_show_on_the_faded_canvas`, `translucent_art_around_the_artboards_is_blended_with_overprint_previews_white_canvas`, `translucent_pixels_around_the_artboards_are_blended_with_the_white_canvas` | | Outline view: a click selects by the outlines drawn, so it reaches a path behind an image (picked on its frame, unless Show Images in Outline Mode draws its pixels) or a gradient mesh (picked on its mesh lines) | done | #6437; in Outline mode the path is selected directly ([Object selection methods and preferences](https://helpx.adobe.com/illustrator/desktop/manage-objects/select-objects/object-selection-methods-and-preferences.html), Object Selection by Path Only). Type, symbol instances, blends, envelopes and placed documents are still picked within their bounds. Tests `outline_mode_picks_paths_through_images_and_meshes`, `outline_view_click_through_an_image_selects_the_path_behind` | | Arrange Tools add-on (VectorCraft addition): Object › Plug-ins › Arrange Tools runs Arrange in Grid… (grid by row, one row or one column; columns, H and V spacing, Center on Artboard; Preview), Swap Objects, Swap Objects and Sizes, Replace with Top Object… (Actual Size, Bounds or Bounds (Fit Proportionally); Keep Original; Scale Strokes & Effects; Preview), Set Size of Each… (Width and Height each ticked on or off, Constrain Width and Height Proportions with one side, the reference point, Scale Strokes & Effects; Preview) and Zoom to Selection, each one undo step | done | `addon.arrange.*`, `crates/engine/src/cmd/addons/arrange.rs`, `crates/ui-egui/src/addons/arrange.rs` and their tests; not a feature of the reference app, so it is not scored | | Arrange Tools add-on (VectorCraft addition): Object › Plug-ins › Arrange Tools › Group Overlapping Objects groups the selected objects whose visual bounds overlap or touch (chains included, within one layer or group), each group at its frontmost member's stacking place, one undo step | done | #4928; `addon.arrange.groupOverlapping`, `crates/engine/src/cmd/addons/arrange.rs` and its tests; not a feature of the reference app, so it is not scored |