From 1f6332c0a4cda24ae9887ec3e3a2b79bba21d83e Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 13 Nov 2026 19:17:21 -0800 Subject: [PATCH] Live Paint: Expand keeps the faces and edges that draw Expand kept a face only when its topmost fill had paint, and an edge only when its topmost stroke had paint and a weight. A face or edge drawn by a lower row under an unpainted top row was removed, and one whose only painted row was hidden was kept as a visible path. Expand now keeps a face or edge when it is shown, its opacity is above 0, and any fill or stroke row is shown, has paint and an opacity above 0 (a stroke also a weight above 0), with all of its rows. The rows are checked with the new Appearance::has_drawn_fill and has_drawn_stroke. Merge carried a face's topmost fill paint by the same topmost-row test. It now carries every row of each face that draws by this rule, and of each edge, pins their unplaced gradients to the old outline as repaint_from does, and leaves the strokes' pen pressure, tilt, bearing and rotation behind, since the rebuilt parts are other paths. Docs: livePaint.expand params text, docs/mcp.md, and a line in docs/target-app-parity.md, which also drops a repeated Live Paint Selection marquee line. --- crates/doc/src/appearance.rs | 10 ++ crates/doc/src/appearance/tests.rs | 22 +++ crates/engine/src/cmd/buildcmds.rs | 2 +- crates/engine/src/cmd/buildcmds/live_paint.rs | 45 +++-- crates/engine/src/tests/build.rs | 158 ++++++++++++++++++ docs/mcp.md | 6 + docs/target-app-parity.md | 2 +- 7 files changed, 229 insertions(+), 16 deletions(-) diff --git a/crates/doc/src/appearance.rs b/crates/doc/src/appearance.rs index ba0f5fc013..3bfba32f6a 100644 --- a/crates/doc/src/appearance.rs +++ b/crates/doc/src/appearance.rs @@ -271,6 +271,16 @@ impl Appearance { _ => None, }) } + /// Does any fill draw: one that is shown, has paint and has an opacity above 0, wherever it + /// sits in the stack? + pub fn has_drawn_fill(&self) -> bool { + self.items.iter().any(|i| matches!(i, AppearanceItem::Fill(f) if f.visible && !f.paint.is_none() && f.opacity > 0.0)) + } + /// Does any stroke draw: one that is shown, has paint, a weight above 0 and an opacity above + /// 0, wherever it sits in the stack? + pub fn has_drawn_stroke(&self) -> bool { + self.painted_strokes().any(|s| s.width > 0.0 && s.opacity > 0.0) + } /// Largest distance the painted area can extend beyond any geometry (see /// [`StrokeLayer::reach`]); paths measure their own with [`Self::stroked_bounds`]. pub fn outset(&self) -> f64 { diff --git a/crates/doc/src/appearance/tests.rs b/crates/doc/src/appearance/tests.rs index 22e5659051..cb5f8fed66 100644 --- a/crates/doc/src/appearance/tests.rs +++ b/crates/doc/src/appearance/tests.rs @@ -79,6 +79,28 @@ fn basic_means_one_plain_fill_and_stroke() { assert!(!e.is_basic(), "an effect"); } +#[test] +fn drawn_fills_and_strokes_count_every_row() { + let fill = |p: Paint| AppearanceItem::Fill(FillLayer::new(p)); + let stroke = |p: Paint, w: f64| AppearanceItem::Stroke(StrokeLayer::new(p, w)); + let black = || Paint::solid(Color::BLACK); + assert!(!Appearance::default().has_drawn_fill() && !Appearance::default().has_drawn_stroke()); + // A painted lower row draws under an unpainted top row. + let a = Appearance { items: vec![fill(black()), stroke(black(), 2.0), fill(Paint::None), stroke(Paint::None, 1.0)], ..Appearance::default() }; + assert!(a.has_drawn_fill() && a.has_drawn_stroke()); + // A hidden painted row, a zero opacity or a zero weight draws nothing. + let mut b = Appearance { items: vec![fill(black()), stroke(black(), 2.0)], ..Appearance::default() }; + b.fill_mut().unwrap().visible = false; + b.stroke_mut().unwrap().visible = false; + assert!(!b.has_drawn_fill() && !b.has_drawn_stroke()); + let mut c = Appearance::default_art(); + c.fill_mut().unwrap().opacity = 0.0; + c.stroke_mut().unwrap().opacity = 0.0; + assert!(!c.has_drawn_fill() && !c.has_drawn_stroke()); + let d = Appearance::basic(Paint::None, black(), 0.0); + assert!(!d.has_drawn_fill() && !d.has_drawn_stroke()); +} + #[test] fn set_creates_missing() { let mut a = Appearance::default(); diff --git a/crates/engine/src/cmd/buildcmds.rs b/crates/engine/src/cmd/buildcmds.rs index 3fc5953619..06ec06e348 100644 --- a/crates/engine/src/cmd/buildcmds.rs +++ b/crates/engine/src/cmd/buildcmds.rs @@ -99,7 +99,7 @@ pub fn specs() -> Vec { "Expand", ["Object", "Live Paint"], None, - "{id?, ids?: [id…] (instead of id)} turn Live Paint groups into plain groups of their painted faces and edges → {ids}", + "{id?, ids?: [id…] (instead of id)} turn Live Paint groups into plain groups of the faces and edges that draw, with all their fill and stroke rows: a shown face or edge with an opacity above 0 and a shown fill or stroke row that has paint and an opacity above 0 (a stroke also a weight above 0), whichever row is on top → {ids}", has_selection_or_ids, lp_expand ), diff --git a/crates/engine/src/cmd/buildcmds/live_paint.rs b/crates/engine/src/cmd/buildcmds/live_paint.rs index fb9e6c32ac..04c6a3fb1b 100644 --- a/crates/engine/src/cmd/buildcmds/live_paint.rs +++ b/crates/engine/src/cmd/buildcmds/live_paint.rs @@ -1,7 +1,7 @@ use super::{ - Appearance, Arc, Beside, Document, EDGE_NAME, EngineError, FACE_NAME, GapOptions, GapSize, LIVE_PAINT_NAME, Node, NodeId, Paint, PathData, Point, - Rect, Result, SOURCES_NAME, Selection, Session, SubPath, Value, b, bad, build_children, edge_near, face_at, finite, ids_json, is_live_paint, - json, number_or, object_param, paint_from, po, point_param, repaint_from, replace_roots, root_ids, source_nodes, source_shapes, switch_or, + Appearance, Arc, Beside, Document, EDGE_NAME, EngineError, FACE_NAME, GapOptions, GapSize, LIVE_PAINT_NAME, Node, NodeId, PathData, Point, Rect, + Result, SOURCES_NAME, Selection, Session, SubPath, Value, b, bad, build_children, edge_near, face_at, finite, ids_json, is_live_paint, json, + number_or, object_param, paint_from, po, point_param, repaint_from, replace_roots, root_ids, source_nodes, source_shapes, switch_or, }; /// `options` as stored on a Live Paint group: none for the defaults. @@ -84,6 +84,19 @@ pub(super) fn lp_make(s: &mut Session, p: &Value) -> Result { Ok(json!({ "id": id.0, "faces": faces, "edges": edges })) } +/// The appearance of face or edge `n` for the part Merge makes again in its place, another path: +/// gradients fitted to `n`'s outline keep that fit, and the strokes' pen pressure, tilt, bearing +/// and rotation stay behind. +fn carried_appearance(n: &Node) -> Appearance { + let mut app = (*n.appearance).clone().without_pressure(); + if app.has_unplaced_gradient() + && let Some(bounds) = n.geometric_bounds() + { + app.pin_gradients(bounds); + } + app +} + /// Add the other `roots` (back → front) to the first Live Paint group among them, which keeps its /// id, the paint of its faces and edges, and its own properties apart from the Gap Options, which /// are merged; returns (group, faces, edges). @@ -95,18 +108,16 @@ fn merge_live(d: &mut Document, sel: &mut Selection, roots: &[NodeId]) -> Result .ok_or_else(|| EngineError::Other("Live Paint Merge: select a Live Paint group and the paths to add".into()))?; check_live_paint_takes(d, roots)?; let old = d.node(target).cloned().ok_or(EngineError::NoNode(target))?; - // Paint to carry over: (point inside face, fill) and (point on edge, stroke). - let keep_faces: Vec<(Point, Paint)> = b::faces(&old) - .iter() - .filter(|f| !f.appearance.fill_paint().is_none()) - .filter_map(|f| Some((po::interior_point(f.path_data()?)?, f.appearance.fill_paint()))) - .collect(); + // Paint to carry over: (point inside face, appearance) for faces that draw, and (point on + // edge, appearance) for every edge. + let keep_faces: Vec<(Point, Appearance)> = + b::faces(&old).iter().filter(|f| draws(f)).filter_map(|f| Some((po::interior_point(f.path_data()?)?, carried_appearance(f)))).collect(); let keep_edges: Vec<(Point, Appearance)> = b::edges(&old) .iter() .filter_map(|e| { let pd = e.path_data()?; let sp = pd.subpaths.first().filter(|sp| sp.segment_count() > 0)?; - Some((kurbo::ParamCurve::eval(&sp.segment(0), 0.5), (*e.appearance).clone())) + Some((kurbo::ParamCurve::eval(&sp.segment(0), 0.5), carried_appearance(e))) }) .collect(); let mut sources = source_nodes(&old); @@ -126,12 +137,12 @@ fn merge_live(d: &mut Document, sel: &mut Selection, roots: &[NodeId]) -> Result *ch = children; } g.extras_mut().live_paint_gaps = stored_gap_options(options); - for (pt, paint) in keep_faces { + for (pt, app) in keep_faces { if let Some(fid) = face_at(&g, pt).map(|f| f.id) && let Some(ch) = g.children_mut() && let Some(f) = ch.iter_mut().find(|c| c.id == fid) { - Arc::make_mut(f).appearance.set_fill(paint); + Arc::make_mut(f).appearance = app.into(); } } for (pt, app) in keep_edges { @@ -191,6 +202,13 @@ pub(super) fn lp_release(s: &mut Session, p: &Value) -> Result { Ok(json!({ "ids": ids_json(&ids) })) } +/// Does face or edge `n` draw on the canvas: it is shown, its opacity is above 0, and a fill or +/// stroke row of its appearance draws (see [`Appearance::has_drawn_fill`] and +/// [`Appearance::has_drawn_stroke`])? +fn draws(n: &Node) -> bool { + n.visible && n.opacity > 0.0 && (n.appearance.has_drawn_fill() || n.appearance.has_drawn_stroke()) +} + pub(super) fn lp_expand(s: &mut Session, p: &Value) -> Result { let targets = live_targets(s, p)?; s.edit("Expand Live Paint", |d, sel| { @@ -205,8 +223,7 @@ pub(super) fn lp_expand(s: &mut Session, p: &Value) -> Result { if let Some(ch) = n.children_mut() { ch.retain(|c| match c.name.as_deref() { Some(SOURCES_NAME) => false, - Some(FACE_NAME) => !c.appearance.fill_paint().is_none(), - Some(EDGE_NAME) => !c.appearance.stroke_paint().is_none() && c.appearance.stroke_width() > 0.0, + Some(FACE_NAME | EDGE_NAME) => draws(c), _ => true, }); } diff --git a/crates/engine/src/tests/build.rs b/crates/engine/src/tests/build.rs index 1c3ad5d8b4..0e6bf5ad8d 100644 --- a/crates/engine/src/tests/build.rs +++ b/crates/engine/src/tests/build.rs @@ -2947,6 +2947,164 @@ fn live_paint_release_and_expand() { assert!((area(&s, a) - 10000.0).abs() < 1.0); } +/// Set the appearance rows of the face of Live Paint group `g` at `face` (or the edge nearest +/// `edge`) to `items`, and give it `opacity`; returns that child's id. +fn set_live_part(s: &mut Session, g: NodeId, face: Option<(f64, f64)>, edge: Option<(f64, f64)>, items: Vec, opacity: f32) -> NodeId { + use vectorcraft_tools::builder::{edge_near, face_at}; + let n = node(s, g); + let part = match (face, edge) { + (Some((x, y)), _) => face_at(&n, Point::new(x, y)), + (_, Some((x, y))) => edge_near(&n, Point::new(x, y), 0.5), + _ => None, + }; + let id = part.unwrap().id; + s.edit("t", |d, _| { + let c = d.node_mut(id).unwrap(); + c.appearance.items = items; + c.opacity = opacity; + Ok(()) + }) + .unwrap(); + id +} + +/// Expand keeps a face or edge when a fill or stroke row draws it, whatever row is on top: a +/// painted lower row under an unpainted top row is kept, and a part whose only painted row is +/// hidden, transparent or 0 pt wide, or whose own opacity is 0, is dropped. +#[test] +fn live_paint_expand_keeps_the_faces_and_edges_that_draw() { + use vectorcraft_doc::{FillLayer, StrokeLayer}; + let fill = |p: Paint| AppearanceItem::Fill(FillLayer::new(p)); + let stroke = |p: Paint, w: f64| AppearanceItem::Stroke(StrokeLayer::new(p, w)); + let red = || Paint::solid(Color::rgb(1.0, 0.0, 0.0)); + let hidden = |mut i: AppearanceItem| { + match &mut i { + AppearanceItem::Fill(f) => f.visible = false, + AppearanceItem::Stroke(st) => st.visible = false, + } + i + }; + let clear = |mut i: AppearanceItem| { + match &mut i { + AppearanceItem::Fill(f) => f.opacity = 0.0, + AppearanceItem::Stroke(st) => st.opacity = 0.0, + } + i + }; + let mut s = session(); + let g = live(&mut s); + let lower_fill = set_live_part(&mut s, g, Some((25.0, 50.0)), None, vec![fill(red()), fill(Paint::None)], 1.0); + let hidden_fill = set_live_part(&mut s, g, Some((125.0, 50.0)), None, vec![hidden(fill(red()))], 1.0); + let clear_fill = set_live_part(&mut s, g, Some((75.0, 50.0)), None, vec![clear(fill(red()))], 1.0); + let lower_stroke = set_live_part(&mut s, g, None, Some((0.0, 50.0)), vec![stroke(red(), 2.0), stroke(Paint::None, 1.0)], 1.0); + let hidden_stroke = set_live_part(&mut s, g, None, Some((150.0, 50.0)), vec![hidden(stroke(red(), 2.0))], 1.0); + let thin_stroke = set_live_part(&mut s, g, None, Some((100.0, 50.0)), vec![stroke(red(), 0.0)], 1.0); + let clear_stroke = set_live_part(&mut s, g, None, Some((50.0, 50.0)), vec![clear(stroke(red(), 2.0))], 1.0); + let clear_edge = set_live_part(&mut s, g, None, Some((75.0, 0.0)), vec![stroke(red(), 2.0)], 0.0); + let parts = [lower_fill, hidden_fill, clear_fill, lower_stroke, hidden_stroke, thin_stroke, clear_stroke, clear_edge]; + assert_eq!(parts.iter().collect::>().len(), parts.len()); + let before = node(&s, g); + s.execute("livePaint.expand", &json!({})).unwrap(); + let n = node(&s, g); + let kept: Vec = n.children().unwrap().iter().map(|c| c.id).collect(); + let has = |id: NodeId| kept.contains(&id); + assert!(has(lower_fill) && has(lower_stroke), "a painted lower row draws: {kept:?}"); + for id in [hidden_fill, clear_fill, hidden_stroke, thin_stroke, clear_stroke, clear_edge] { + assert!(!has(id), "{id:?} draws nothing: {kept:?}"); + } + // The kept parts keep every row. + let rows = |n: &Node, id: NodeId| n.children().unwrap().iter().find(|c| c.id == id).unwrap().appearance.items.clone(); + assert_eq!(rows(&n, lower_fill), rows(&before, lower_fill)); + assert_eq!(rows(&n, lower_stroke), rows(&before, lower_stroke)); +} + +/// Merge carries a face's whole appearance when one of its rows draws, and carries nothing from a +/// face that draws nothing. +#[test] +fn live_paint_merge_carries_the_faces_that_draw() { + use vectorcraft_doc::FillLayer; + use vectorcraft_tools::builder::face_at; + let fill = |p: Paint| AppearanceItem::Fill(FillLayer::new(p)); + let green = || Paint::solid(Color::rgb(0.0, 1.0, 0.0)); + let mut s = session(); + let g = live(&mut s); + let rows = vec![fill(green()), fill(Paint::None)]; + set_live_part(&mut s, g, Some((25.0, 50.0)), None, rows.clone(), 1.0); + let mut only_hidden = fill(green()); + if let AppearanceItem::Fill(f) = &mut only_hidden { + f.visible = false; + } + set_live_part(&mut s, g, Some((125.0, 50.0)), None, vec![only_hidden], 1.0); + let c = rect(&mut s, 120.0, 120.0, 100.0, 20.0); + s.execute("livePaint.merge", &json!({"ids": [g.0, c.0]})).unwrap(); + let n = node(&s, g); + assert_eq!(face_at(&n, Point::new(25.0, 50.0)).unwrap().appearance.items, rows, "the drawn lower fill is carried"); + let b = face_at(&n, Point::new(125.0, 50.0)).unwrap(); + assert_eq!(b.appearance.fill_paint(), Paint::solid(Color::rgb(0.0, 0.0, 1.0)), "the face takes its source's fill again"); + assert!(b.appearance.has_drawn_fill()); +} + +/// Merge rebuilds the faces and edges as other paths, so the appearance it carries to them leaves +/// the strokes' pen pressure behind and keeps the rest. +#[test] +fn live_paint_merge_leaves_pen_pressure_behind() { + use vectorcraft_doc::{FillLayer, PressureProfile, StrokeLayer}; + use vectorcraft_tools::builder::{edge_near, face_at}; + let pressed = || { + let mut st = StrokeLayer::new(Paint::solid(Color::BLACK), 3.0); + st.pressure = PressureProfile::from_samples([(0.0, 0.2), (0.5, 1.0), (1.0, 0.2)]); + assert!(st.pressure.is_some()); + st + }; + let green = AppearanceItem::Fill(FillLayer::new(Paint::solid(Color::rgb(0.0, 1.0, 0.0)))); + let mut s = session(); + let g = live(&mut s); + set_live_part(&mut s, g, Some((75.0, 50.0)), None, vec![green.clone(), AppearanceItem::Stroke(pressed())], 1.0); + set_live_part(&mut s, g, None, Some((0.0, 50.0)), vec![AppearanceItem::Stroke(pressed())], 1.0); + let c = rect(&mut s, 120.0, 120.0, 100.0, 20.0); + s.execute("livePaint.merge", &json!({"ids": [g.0, c.0]})).unwrap(); + let n = node(&s, g); + let mut plain = pressed(); + plain.pressure = None; + let face = &face_at(&n, Point::new(75.0, 50.0)).unwrap().appearance.items; + assert_eq!(face, &vec![green, AppearanceItem::Stroke(plain.clone())]); + assert_eq!(edge_near(&n, Point::new(0.0, 50.0), 0.5).unwrap().appearance.items, vec![AppearanceItem::Stroke(plain)]); +} + +/// The gradients Merge carries to the rebuilt faces and edges keep their fit on the old outline, +/// lower rows included. +#[test] +fn live_paint_merge_keeps_the_fit_of_carried_gradients() { + use vectorcraft_color::{Gradient, GradientKind, GradientPaint, GradientStop}; + use vectorcraft_doc::{FillLayer, StrokeLayer}; + use vectorcraft_tools::builder::{edge_near, face_at}; + let stops = vec![GradientStop::new(0.0, Color::BLACK), GradientStop::new(1.0, Color::WHITE)]; + let unplaced = GradientPaint::new(Gradient::new(GradientKind::Linear, stops)); + let gradient = || Paint::Gradient(Box::new(unplaced.clone())); + let mut s = session(); + let g = live(&mut s); + let rows = vec![AppearanceItem::Fill(FillLayer::new(gradient())), AppearanceItem::Fill(FillLayer::new(Paint::None))]; + let face = set_live_part(&mut s, g, Some((25.0, 50.0)), None, rows, 1.0); + let edge = set_live_part(&mut s, g, None, Some((0.0, 50.0)), vec![AppearanceItem::Stroke(StrokeLayer::new(gradient(), 2.0))], 1.0); + let before = node(&s, g); + let old = |id: NodeId| before.children().unwrap().iter().find(|c| c.id == id).unwrap().clone(); + let (old_face, old_edge) = (old(face), old(edge)); + let c = rect(&mut s, 120.0, 120.0, 100.0, 20.0); + s.execute("livePaint.merge", &json!({"ids": [g.0, c.0]})).unwrap(); + let n = node(&s, g); + let geom = |items: &[AppearanceItem]| match items[0].paint() { + Paint::Gradient(gp) => gp.geom, + p => panic!("a gradient, not {p:?}"), + }; + let face_bounds = old_face.geometric_bounds().unwrap(); + let new_face = face_at(&n, Point::new(25.0, 50.0)).unwrap(); + assert_eq!(geom(&new_face.appearance.items), Some(unplaced.resolve(face_bounds)), "the lower-row fill keeps its fit"); + let AppearanceItem::Stroke(st) = &old_edge.appearance.items[0] else { panic!("a stroke") }; + let edge_box = st.paint_bounds(old_edge.geometric_bounds().unwrap()); + let new_edge = edge_near(&n, Point::new(0.0, 50.0), 0.5).unwrap(); + assert_eq!(geom(&new_edge.appearance.items), Some(unplaced.resolve(edge_box)), "the stroke keeps its fit"); +} + fn live_group_only(s: &mut Session) -> NodeId { let r = s.execute("livePaint.make", &json!({})).unwrap(); NodeId(r["id"].as_u64().unwrap()) diff --git a/docs/mcp.md b/docs/mcp.md index 84c75a81d0..beecd227f5 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -3486,6 +3486,12 @@ already walks Image Trace. Short agent entry points: `livePaint.info {group}`, `livePaint.release`, `livePaint.expand`, and `livePaint.gapOptions {ids?, detect?, size?, color?, closeGaps?}` (Object › Live Paint › Gap Options). Make gives each covered face the fill of its front-most covering source, including compound paths with shared curved boundaries. Expand keeps those face fills. + `livePaint.expand` keeps each face and edge that draws, with all its fill and stroke rows: it is shown, its opacity + is above 0, and a fill or stroke row is shown, has paint and an opacity above 0 (a stroke also a weight above 0), + whichever row is on top. A painted lower row under an unpainted top row keeps the part; a part whose only painted + row is hidden is removed. `livePaint.merge` copies the fill and stroke rows of each face that draws by this rule, and + of each edge, to the rebuilt parts, with their gradients kept at their fit on the old outline and without the + strokes' pen pressure, tilt, bearing and rotation. With `detect: true`, paint stops at the gaps that run from a loose end of a path to the nearest path, up to `size` wide (`small` 3 pt, `medium` 6 pt, `large` 12 pt, or a number of points up to 72); `closeGaps: true` adds an unpainted path across each of them. `color` (the Gap Preview diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 296bd84b2b..3ab2127e30 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1447,6 +1447,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur Double-clicking the Live Paint Bucket opens Live Paint Bucket Options ([Paint with the Live Paint Bucket tool](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/learn-painting-basics/paint-with-the-live-paint-bucket-tool.html)): Paint Fills (on) and Paint Strokes (off) set whether a click paints faces, edges or both, Highlight turns the outline of the face or edge under the pointer on or off, and Color and Width set it (red and 4 px by default). Faces are outlined at the Width and edges at half of it, as the page says faces are highlighted with a thick line and edges with a thin line. With both on, a click paints the edge within 4 px of the pointer, else the face, and Shift switches to Paint Fills only; with one on, Shift switches to the other. The options last across tool switches and are saved with the preferences (`tool.setOption {tool: "livePaintBucket"}`). Evidence: `builder::tests::{bucket_options_choose_what_a_click_paints, bucket_options_set_the_highlight, bucket_highlights_an_edge_thinner_than_a_face}`, `dialogs::live_paint_bucket::tests::double_clicking_the_tool_opens_its_options_and_ok_sets_them`. Live Paint Bucket Options has Cursor Swatch Preview, as the [help page](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/learn-painting-basics/paint-with-the-live-paint-bucket-tool.html) lists: with the Bucket selected, the active fill or stroke shows above the pointer between the color swatches before and after it in the Swatches panel, and the Left and Right arrow keys pick the swatch before or after it, as the page describes. The selected art keeps its paint. As VectorCraft's own rules, the option is on at first, the arrows step the stroke when the Stroke proxy is in front, they wrap around at the ends and still step with the preview off, a color that is no swatch shows alone until Right picks the first swatch or Left the last, and the arrows do nothing during a fill drag or with no color swatch. Evidence: `tests::build::{live_paint_bucket_arrow_keys_step_the_active_paint_through_the_swatches, live_paint_bucket_arrow_keys_handle_unmatched_paint_few_swatches_and_drags, live_paint_bucket_arrow_keys_pass_swatches_of_the_same_color_for_fill_and_stroke, swatch_arrow_keys_leave_modified_arrows_to_the_shortcuts}`. Live Paint Make preserves the front-most covering source's fill when compound paths share a curved boundary, and Expand keeps the face fills. Regression evidence: `planar::tests::coincident_curves_keep_their_source_faces` checks source order, winding, fill rules and nearby boundaries; `tests::build::live_paint_make_and_expand_keep_abutting_compound_colors` checks native compound paths, Make, Expand and Undo/Redo. This preserves VectorCraft's source-fill rule without changing arrangement precision. + Object › Live Paint › Expand keeps the faces and edges that draw on the canvas, with all their fill and stroke rows, so the expanded paths look as the painted group did ([Create Live Paint groups](https://helpx.adobe.com/illustrator/desktop/paint-and-fill/learn-painting-basics/create-live-paint-groups.html)). As VectorCraft's own rule, a face or edge draws when it is shown, its opacity is above 0, and any of its fill or stroke rows is shown, has paint and an opacity above 0 (a stroke also needs a weight above 0), whichever row is on top: a painted lower row under an unpainted top row is kept, and a part whose only painted row is hidden is removed. Merge copies the fill and stroke rows of each face that draws by this rule, and of each edge, to the rebuilt parts, with their gradients kept at their fit on the old outline and without the strokes' pen pressure, tilt, bearing and rotation. Evidence: `tests::build::{live_paint_expand_keeps_the_faces_and_edges_that_draw, live_paint_merge_carries_the_faces_that_draw, live_paint_merge_leaves_pen_pressure_behind, live_paint_merge_keeps_the_fit_of_carried_gradients}`. Live Paint Gap Options (Object › Live Paint › Gap Options…, `livePaint.gapOptions`): with Gap Detection on, paint stops at the gaps that run from a loose end of a path to the nearest path, up to Small (3 pt), Medium (6 pt), Large (12 pt) or a custom size; Close Gaps With Paths adds an unpainted path across each gap; Preview applies the options live and draws the gaps in the Gap Preview Color. The options are saved, copied and undone with the group, and Merge keeps the bottom group's options when its Gap Detection is on, or else turns Gap Detection on with Small when another merged group has it on. When Gap Detection is off in every merged group, it stays off. View › Show Live Paint Gaps (`view.livePaintGaps`) draws the gaps of the selected Live Paint groups up to their Paint Stops At size, each in its group's Gap Preview Color, until Hide Live Paint Gaps or Hide Edges hides them ([Live Paint gaps](https://web.archive.org/web/20260105111201/https://helpx.adobe.com/illustrator/desktop/paint-and-fill/learn-painting-basics/find-and-close-gaps-in-live-paint-groups.html)). Double-clicking the Live Paint Selection tool opens its Tool Options ([Live Paint Selection tool options](https://web.archive.org/web/20250904012025/https://helpx.adobe.com/illustrator/using/selecting-objects.html)): with Select Fills off, a click selects an edge instead of a face; with Select Strokes off, Alt-click selects a face instead of an edge; Color and Width set the color and width of the highlight on the face or edge under the pointer (red and 4 px by default). The options last across tool switches and are saved with the preferences (`tool.setOption {tool: "livePaintSelection"}`). @@ -1455,7 +1456,6 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur As VectorCraft's own rule, `tool.setOption` for the Live Paint Bucket and the Live Paint Selection tool, chosen or not, checks every value before it sets any: a switch that is not `true` or `false`, a `color` that is not an RGB color or a layer color's name, or that has an alpha part, a `width` that is not a number and an option the tool does not have give an error naming the option, and nothing is set or saved. A `width` outside 1 to 20 px is still set to the nearest end of that range. Saved settings that hold an invalid value still load, and the tool keeps its default for that option. Evidence: `tests::build::{live_paint_tool_options_refuse_invalid_values_and_change_nothing, live_paint_tool_options_take_rgb_colors_and_clamp_the_width, live_paint_tools_load_saved_settings_with_invalid_values}`. As VectorCraft's own rule, `tool.setOption` for the Shape Builder, chosen or not, checks every value the same way: a switch that is not `true` or `false`, a `pickColorFrom` or `selection` that is not one of its names, a `gapLength` that is not a number, a `highlightColor` that is not an RGB color or a layer color's name, or that has an alpha part, and an option the tool does not have give an error naming the option, and nothing is set or saved. A `gapLength` outside 0 to 72 pt is still set to the nearest end of that range. Evidence: `tests::build::{shape_builder_tool_options_refuse_invalid_values_and_change_nothing, shape_builder_tool_options_take_valid_values_and_clamp_the_gap}`. A drag of 3 screen pixels or more with the Live Paint Selection tool draws a marquee and selects the faces and edges it touches, partly enclosed ones included, and a Shift-drag adds them to the selection or removes them from it ([Modify Live Paint groups](https://web.archive.org/web/20261006115247/https://helpx.adobe.com/illustrator/desktop/paint-and-fill/learn-painting-basics/modify-live-paint-groups.html)). A click and a marquee change the selection on release, and Escape before the release leaves the selection as it was. Locked Live Paint groups, those on a locked layer or artboard, and in isolation mode those outside the isolated art are not highlighted or selected. - A drag with the Live Paint Selection tool draws a marquee and selects the faces and edges it touches, partly enclosed ones included, and a Shift-drag adds them to the selection or removes them from it ([Modify Live Paint groups](https://web.archive.org/web/20261006115247/https://helpx.adobe.com/illustrator/desktop/paint-and-fill/learn-painting-basics/modify-live-paint-groups.html)). A click and a marquee change the selection on release, and Escape before the release leaves the selection as it was. Locked Live Paint groups, those on a locked layer or artboard, and in isolation mode those outside the isolated art are not highlighted or selected. When the object the Blend tool picked first is deleted or undone away before the second click, the next click on an object picks that object first instead of doing nothing. Regression tests: `blend_tool_picks_again_when_its_first_pick_is_gone` in `meshblend.rs` and `the_blend_tool_picks_again_when_its_first_pick_is_deleted` in `tests/blendopts.rs`. Window › Blend opens the Blend panel: Make, the selected blend's Spacing and Orientation (with no blend selected, the options new blends start with), Reverse Front to Back, Reverse Spine, Replace Spine, Expand and Release, each running its Object › Blend command. Make is dimmed until two or more objects are selected. Spacing and Orientation are dimmed until a blend or two or more objects are selected, and the other buttons are dimmed until a blend is selected. The Blend panel's Create Spine menu (Auto, Always, Never; `object.blend.createSpine`) sets whether new blends get a spine, from the Blend tool, Make and `object.blend.make` alike ([Blend panel overview](https://helpx.adobe.com/illustrator/desktop/manage-colors/apply-transparency-and-blending/blend-panel-overview.html)). Auto and Always give every new blend a straight spine, as before; Never makes blends without one, which keep their steps on the straight lines between the keys, have Type and Ramp dimmed, refuse Reverse Spine and spine edits, release without a spine path, and get a spine from Replace Spine. The setting is kept with the preferences and leaves blends already made as they are; Auto as the starting value and keeping the setting across sessions are VectorCraft's own rules. Builds on #5177 by adambelis. Evidence: `tests::blendopts::{create_spine_sets_whether_new_blends_get_a_spine, a_blend_without_a_spine_has_none_to_edit_reverse_ease_or_release, whether_a_blend_has_a_spine_is_saved_and_old_blends_have_one}` and `panels::tests_blend::create_spine_sets_what_new_blends_get_whatever_is_selected`.