From 959332840ce5f3aae7e1472236b8e34f43f337bb Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Fri, 20 Nov 2026 01:27:12 -0800 Subject: [PATCH] Live Corners: hovering a corner widget highlights the corner it controls While the pointer is within 5 px of a Live Corners widget (the distance within which a press picks the widget), the canvas draws the cut of the corner that widget controls in a 2 px line of the layer color, under the widgets. It works with every tool that shows the widgets: Selection, Direct Selection and the shape tools. Round, inverted round and chamfer corners are highlighted; a square corner has no cut, so nothing is drawn. No line is drawn while a mouse button is down (a press on the widget or a pan), or where a widget is hidden. CornerWidgets::hovered_cut finds the widget under the pointer and takes its corner's segment from the path as drawn, through the corner sources LiveCorners keeps, so a live rectangle, a live polygon and a plain path with Live Corners all highlight the segment they draw. Docs: docs/mcp.md (Live Corners) and the docs/target-app-parity.md evidence list. Part of #1232, reported by XTRECY-BD. --- crates/tools/src/corners.rs | 29 +++++++++++ crates/tools/src/corners/tests.rs | 74 +++++++++++++++++++++++++++ crates/ui-egui/src/canvas/overlays.rs | 11 ++++ crates/ui-egui/src/canvas/tests.rs | 62 ++++++++++++++++++++++ docs/mcp.md | 4 ++ docs/target-app-parity.md | 1 + 6 files changed, 181 insertions(+) diff --git a/crates/tools/src/corners.rs b/crates/tools/src/corners.rs index ab234cf507..e741af77f7 100644 --- a/crates/tools/src/corners.rs +++ b/crates/tools/src/corners.rs @@ -197,6 +197,35 @@ impl CornerWidgets { out.insert(key.into(), value); Value::Object(out) } + + /// The cut corner whose widget is within `tol` (document units) of `p`, as the path draws it in + /// the document, with the object it belongs to: what the canvas highlights while the pointer + /// is over that widget. `None` away from the widgets and for a corner with no cut. + pub fn hovered_cut(&self, doc: &Document, p: Point, tol: f64) -> Option<(NodeId, BezPath)> { + let (i, k) = self.hit(p, tol)?; + let (id, w) = (self.paths.get(i)?.id, self.widget(i, k)?); + let node = doc.node(id)?; + let NodeKind::Path { path, .. } = &node.kind else { return None }; + let lc = LiveCorners::of(node)?; + let mut out = BezPath::new(); + for (sp, from) in path.subpaths.iter().zip(lc.sources()) { + // A subpath whose anchors do not match its sources gives no cut rather than a wrong one. + if from.len() != sp.anchors.len() { + continue; + } + // A corner's cut is the segment between its two anchors (the last one, for a closed + // subpath's first corner); a square corner is one anchor and has none. + for s in 0..sp.segment_count() { + let (a, b) = (from.get(s), from.get(s + 1).or(from.first())); + if a == Some(&w.corner.index) && b == a { + let c = sp.segment(s); + out.move_to(c.p0); + out.curve_to(c.p1, c.p2, c.p3); + } + } + } + (!out.elements().is_empty()).then_some((id, out)) + } } /// The angle between corner `c`'s sides once `xf` maps them into the document, in degrees. diff --git a/crates/tools/src/corners/tests.rs b/crates/tools/src/corners/tests.rs index 21b240b453..77c2aff468 100644 --- a/crates/tools/src/corners/tests.rs +++ b/crates/tools/src/corners/tests.rs @@ -527,3 +527,77 @@ fn a_pen_path_shows_widgets_on_its_corners_only() { assert_eq!(w.corners(), [1, 2]); assert_eq!(pts(&w)[0], Point::new(290.0, 110.0)); } + +/// The bounds of the cut `w` gives for the pointer at `at`, rounded to 1e-6. +fn hovered_bounds(w: &CornerWidgets, d: &Document, at: Point) -> Option<(NodeId, [f64; 4])> { + let (id, cut) = w.hovered_cut(d, at, 5.0)?; + let b = vectorcraft_geom::Shape::bounding_box(&cut); + Some((id, [b.x0, b.y0, b.x1, b.y1].map(|v| (v * 1e6).round() / 1e6))) +} + +/// #1232: the pointer within a press's reach of a widget gives the cut of the corner that widget +/// controls, for each corner of a rounded rectangle, the first one included; nothing away from +/// the widgets. +#[test] +fn a_widget_under_the_pointer_gives_its_corners_cut() { + let (d, id) = live_rect(20.0, Affine::translate((100.0, 100.0))); + let w = CornerWidgets::of(&d, &selected(id), 1.0, false).unwrap(); + assert_eq!(pts(&w), [Point::new(120.0, 120.0), Point::new(180.0, 120.0), Point::new(180.0, 180.0), Point::new(120.0, 180.0)]); + let cuts = [[100.0, 100.0, 120.0, 120.0], [180.0, 100.0, 200.0, 120.0], [180.0, 180.0, 200.0, 200.0], [100.0, 180.0, 120.0, 200.0]]; + for (at, cut) in pts(&w).into_iter().zip(cuts) { + assert_eq!(hovered_bounds(&w, &d, at + Vec2::new(3.0, -3.0)), Some((id, cut)), "{at:?}"); + } + assert_eq!(hovered_bounds(&w, &d, Point::new(127.0, 120.0)), None, "past a press's reach"); + assert_eq!(hovered_bounds(&w, &d, Point::new(150.0, 150.0)), None); +} + +/// #1232: a square corner has no cut to give, and a plain path cut in one corner gives that +/// corner's cut from its own widget, with the corners Direct Selection shows, for each corner +/// kind. +#[test] +fn a_square_corner_gives_no_cut_and_a_plain_paths_corner_gives_its_own() { + let (d, id) = live_rect(0.0, Affine::translate((100.0, 100.0))); + let w = CornerWidgets::of(&d, &selected(id), 1.0, false).unwrap(); + assert_eq!(hovered_bounds(&w, &d, Point::new(110.0, 110.0)), None); + for kind in [CornerKind::Round, CornerKind::InvertedRound, CornerKind::Chamfer] { + let (mut d, id) = doc_with_rect(); + if let Some(NodeKind::Path { path, live, .. }) = d.node_mut(id).map(|n| &mut n.kind) { + vectorcraft_doc::corners::set_corners(path, live, &[2].into(), Some(30.0), Some(kind)); + } + let w = CornerWidgets::of(&d, &selected(id), 1.0, true).unwrap(); + assert_eq!(w.corners(), [0, 1, 2, 3], "{kind:?}"); + assert_eq!(hovered_bounds(&w, &d, Point::new(110.0, 110.0)), None, "{kind:?}: the square top-left corner"); + let at = pts(&w)[2]; + assert_eq!(hovered_bounds(&w, &d, at), Some((id, [170.0, 170.0, 200.0, 200.0])), "{kind:?}"); + } +} + +/// #1232: a live polygon's widget gives its corner's cut, and a widget hidden by Hide Corner +/// Widget for angles greater than gives none at its place. +#[test] +fn a_polygons_widget_gives_its_cut_and_a_hidden_widget_gives_none() { + let live = + LiveShape::Polygon { radius: 80.0, sides: 6, xf: Affine::translate((200.0, 200.0)), radii: vec![], kinds: vec![], radii_relative: false }; + let (mut d, id) = doc_with(live.to_path(), Some(live)); + if let Some(NodeKind::Path { path, live, .. }) = d.node_mut(id).map(|n| &mut n.kind) { + vectorcraft_doc::corners::set_corners(path, live, &[0].into(), Some(10.0), None); + } + let w = CornerWidgets::of(&d, &selected(id), 1.0, false).unwrap(); + let at = pts(&w)[0]; + let (got, b) = hovered_bounds(&w, &d, at).unwrap(); + assert_eq!(got, id); + // The arc of a 10 pt radius at a 120° corner spans 10 pt between its ends. + let (wide, high) = (b[2] - b[0], b[3] - b[1]); + assert!(wide.max(high) <= 10.5 && wide.max(high) > 5.0, "{b:?}"); + let centre = Point::new((b[0] + b[2]) / 2.0, (b[1] + b[3]) / 2.0); + assert!(centre.distance(at) < 15.0, "{b:?} {at:?}"); + // Sheared by 30°: the rectangle's 120° corners (1 and 3) hide above 100°. + let shear = Affine::translate((100.0, 100.0)) * Affine::new([1.0, 0.0, 30f64.to_radians().tan(), 1.0, 0.0, 0.0]); + let (d, id) = live_rect(10.0, shear); + let all = CornerWidgets::of(&d, &selected(id), 1.0, false).unwrap(); + let shown = all.clone().within_angle(100.0).unwrap(); + assert_eq!(shown.corners(), [0, 2]); + assert!(hovered_bounds(&shown, &d, pts(&all)[0]).is_some()); + assert!(hovered_bounds(&all, &d, pts(&all)[1]).is_some(), "shown, the 120° corner has a cut"); + assert_eq!(hovered_bounds(&shown, &d, pts(&all)[1]), None, "hidden, it gives none"); +} diff --git a/crates/ui-egui/src/canvas/overlays.rs b/crates/ui-egui/src/canvas/overlays.rs index b4d2d44aac..cdbe089f61 100644 --- a/crates/ui-egui/src/canvas/overlays.rs +++ b/crates/ui-egui/src/canvas/overlays.rs @@ -10,6 +10,9 @@ use super::outline::{KEY_OUTLINE, c32, node_outline, selection_hit_at, stroke_pa use super::selection_marks::{MarkOptions, SelectionMarks}; use super::{BezPath, Color32, CornerRadius, NodeKind, Overlay, Pos2, Shape, Stroke, StrokeKind, Tokens, VectorcraftApp, Xf, vec2}; +/// The width (screen px) of the cut corner drawn while the pointer is over its Live Corners widget. +const CORNER_HOVER_WIDTH: f32 = 2.0; + pub(super) fn hover_highlight(app: &VectorcraftApp, p: &egui::Painter, xf: &Xf) { let Some(h) = app.hover_doc else { return }; // Smart Guides › Object Highlighting: a Smart Guides display option, so it needs them on and Snap to Grid and Pixel Preview off. @@ -229,6 +232,14 @@ pub(super) fn selection_overlay(app: &mut VectorcraftApp, p: &egui::Painter, xf: app.session.prefs.hide_corner_widget_above, ) { + // The pointer within 5 px of a widget, the distance at which a press picks it: the cut + // corner it controls drawn thicker, under the widgets. Not while the tool is busy (from + // the press to the release) or a mouse button is down (a pan drag leaves the tool idle). + let reach = 5.0 / xf.zoom.max(1e-9); + let idle = !app.session.tool_busy() && !p.ctx().input(|i| i.pointer.any_down()); + if let Some((id, cut)) = app.hover_doc.filter(|_| idle).and_then(|h| w.hovered_cut(&st.doc, h, reach)) { + stroke_path(p, &cut, xf, Stroke::new(CORNER_HOVER_WIDTH, c32(st.doc.layer_color(id)))); + } for (id, q) in w.visible_on() { let (sp, color) = (xf.to_screen(q), c32(st.doc.layer_color(id))); p.circle_filled(sp, 3.0, Color32::WHITE); diff --git a/crates/ui-egui/src/canvas/tests.rs b/crates/ui-egui/src/canvas/tests.rs index d5244aa234..c903791964 100644 --- a/crates/ui-egui/src/canvas/tests.rs +++ b/crates/ui-egui/src/canvas/tests.rs @@ -6112,6 +6112,68 @@ fn corner_widgets_hide_above_the_preference_angle() { assert_eq!(widgets(&mut app), 0); } +/// #1232: with the pointer over a corner widget, the canvas draws the rounded corner it controls +/// thicker in the layer color, with Direct Selection, the Selection tool and the Rectangle tool. +/// It stops while a mouse button is down (a press on the widget or a pan), when the pointer moves +/// away, and where the widget is hidden by Hide Corner Widget for angles greater than. +#[test] +fn hovering_a_corner_widget_highlights_its_corner() { + let mut app = VectorcraftApp::new(Session::new(), Default::default()); + app.session.execute("file.new", &json!({"width": 400, "height": 300})).unwrap(); + let id = app.session.execute("shape.rectangle", &json!({"x": 100, "y": 100, "width": 100, "height": 100})).unwrap()["id"].as_u64().unwrap(); + app.session.execute("object.setLiveShape", &json!({"id": id, "radius": 20})).unwrap(); + let id = vectorcraft_doc::NodeId(id); + let color = c32(app.session.active().unwrap().doc.layer_color(id)); + let ctx = egui::Context::default(); + frame(&mut app, &ctx, vec![]); + let xf = Xf::new(app.canvas_rect.unwrap(), app.view().unwrap()); + for tool in ["directSelection", "selection", "rectangle"] { + app.select_tool(tool); + let st = app.session.active().unwrap(); + let w = vectorcraft_tools::corners::CornerWidgets::of(&st.doc, &st.selection, app.view_info().zoom, tool == "directSelection").unwrap(); + let top_left = w.visible().next().unwrap(); + frame(&mut app, &ctx, vec![egui::Event::PointerMoved(xf.to_screen(top_left))]); + let drawn = drawn_in(&mut app, &ctx, color, 2.0); + // The top-left arc, from (100, 120) to (120, 100) in the document. + let (from, to) = (xf.to_screen(Point::new(100.0, 120.0)), xf.to_screen(Point::new(120.0, 100.0))); + let inside = egui::Rect::from_two_pos(from, to).expand(0.5); + assert!(drawn.len() > 2 && drawn.iter().all(|q| inside.contains(*q)), "{tool}: {drawn:?}"); + assert!(drawn.iter().any(|q| q.distance(from) < 0.5) && drawn.iter().any(|q| q.distance(to) < 0.5), "{tool}: {drawn:?}"); + // While the button is down on the widget and while it is dragged, the corner is not + // highlighted. + let view = app.view_info(); + let inward = top_left + vectorcraft_geom::Vec2::new(8.0, 8.0); + app.session.pointer(&PointerEvent::new(PointerKind::Down, top_left.x, top_left.y), view).unwrap(); + frame(&mut app, &ctx, vec![egui::Event::PointerMoved(xf.to_screen(top_left))]); + assert!(drawn_in(&mut app, &ctx, color, 2.0).is_empty(), "{tool}: after the press"); + app.session.pointer(&PointerEvent::new(PointerKind::Drag, inward.x, inward.y), view).unwrap(); + assert!(app.session.tool_busy(), "{tool}"); + frame(&mut app, &ctx, vec![egui::Event::PointerMoved(xf.to_screen(inward))]); + assert!(drawn_in(&mut app, &ctx, color, 2.0).is_empty(), "{tool}: during the drag"); + app.session.pointer(&PointerEvent::new(PointerKind::Up, inward.x, inward.y), view).unwrap(); + app.session.execute("edit.undo", &json!({})).unwrap(); + frame(&mut app, &ctx, vec![egui::Event::PointerMoved(xf.to_screen(Point::new(150.0, 150.0)))]); + assert!(drawn_in(&mut app, &ctx, color, 2.0).is_empty(), "{tool}: away from the widgets"); + } + // A widget hidden by the angle preference gives no highlight at its place. + app.select_tool("directSelection"); + let st = app.session.active().unwrap(); + let top_left = + vectorcraft_tools::corners::CornerWidgets::of(&st.doc, &st.selection, app.view_info().zoom, true).unwrap().visible().next().unwrap(); + // The middle button down over the widget (a pan, which leaves the tool idle) draws none. + let over = xf.to_screen(top_left); + frame(&mut app, &ctx, vec![egui::Event::PointerMoved(over)]); + assert!(!drawn_in(&mut app, &ctx, color, 2.0).is_empty(), "over the widget"); + let middle = |pressed| egui::Event::PointerButton { pos: over, button: egui::PointerButton::Middle, pressed, modifiers: Default::default() }; + frame(&mut app, &ctx, vec![middle(true)]); + assert!(!app.session.tool_busy()); + assert!(drawn_in(&mut app, &ctx, color, 2.0).is_empty(), "the middle button down"); + frame(&mut app, &ctx, vec![middle(false)]); + app.session.execute("prefs.set", &json!({"key": "hideCornerWidgetAbove", "value": 80})).unwrap(); + frame(&mut app, &ctx, vec![egui::Event::PointerMoved(xf.to_screen(top_left))]); + assert!(drawn_in(&mut app, &ctx, color, 2.0).is_empty(), "hidden above the angle"); +} + /// View › Hide Edges hides a live rectangle's corner widgets, and the Selection tool then /// neither shows the corner cursor over one's place nor rounds the corners from it. With /// edges shown, a drag from the same widget rounds them. diff --git a/docs/mcp.md b/docs/mcp.md index e7abf476a9..b3b7b1f168 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -7702,6 +7702,10 @@ and those shape tools: hidden widgets are not drawn, and those tools do not answ on them. `on`, when given and not `null`, must be `true` or `false` and sets the state; without it, or with `null`, the command toggles. The reply is the new state (`true` when shown, the default). The bounding box, the center point and Direct Selection's corner widgets, which follow `view.cornerWidget` alone, stay as they are, and no undo step is added. +While the pointer is within 5 px of a corner widget that shows, with any tool that shows it, the desktop app draws the +cut of that widget's corner (round, inverted round or chamfer) in a 2 px line of the layer color. A square corner has +no cut and gets no line, and no line is drawn while a mouse button is down. The 5 px reach, the 2 px width and the +color are VectorCraft's own values. No command runs and no undo step is added. ```json {"name":"run_command","arguments":{"command":"object.setLiveShape","params":{"id":12,"corners":[1],"radius":16}}} diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index b1d981428a..9734a310bb 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1481,6 +1481,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur With Direct Selection, Shift pressed during the drag of a curved segment keeps both of its handles at right angles to the line between its anchors, on the same side and at the same length (`path.reshapeSegment {perpendicular}`). Shift held while any segment is dragged with the Anchor Point tool or the Pen with Alt does the same. With the Anchor Point tool, Shift held at the press on an anchor (or a selected blend's spine point) moves it, handles and all, instead of pulling out handles; Shift kept down keeps the move at 45° steps, and a Shift-click that doesn't move leaves the anchor as it was (`path.moveAnchor`). A selected blend spine's segment dragged with the Anchor Point tool, or a curved one dragged with Direct Selection, bends the same way (`object.blend.spine.reshapeSegment`). - **Live Corners:** drag a live rectangle's corner widgets (Selection or Direct Selection) to round all corners, with a radius readout; with Direct Selection, select corner anchors to show and round just those corners (#381). Each corner keeps its own radius and kind (Round, Inverted Round, Chamfer): Alt-click a widget to cycle the kind, double-click it for the Corners dialog, and the Properties and Transform radius fields set the selected corners (`object.setLiveShape {corners, radius, kind}`). A link toggle behind Corner Radius (the `singleCornerRadius` preference) switches the panels to a field for each corner of a live rectangle: Top Left, Top Right, Bottom Right and Bottom Left. Corners stay circular when the rectangle is scaled unevenly or along its own sides when rotated (the radius keeps its size, or scales by the mean scale with Scale Corners on); only a shear distorts them. On a rectangle that isn't square every corner is the same circle: a radius past half the shorter side stops there for all of them, the widgets sit on the corners as drawn and turn the edited corners red at that limit, CSS export writes the drawn radii, and rectangles saved stretched by older versions get circular corners when their corners are next set (#442). Live Corners work on any path's corners too, as on a rectangle's (#511): a star's, a live polygon's (which also shows them to the Selection tool, has a Corner Radius field in the Properties and Transform panels and keeps its radius as its sides change) and a pen path's, wherever two sides meet at an angle at an anchor that isn't smooth: curved sides too, trimmed to what the cut leaves of them (#1144). Direct Selection shows the widgets of every corner, or of the corners holding selected anchors; each corner is a circle tangent to both sides, drawn no larger than takes its cut halfway along its shorter side; a path keeps its uncut outline so its corners stay editable, and the same command, dialog, angle preference and View › Hide Corner Widget apply. With Direct Selection a click on a widget (no drag) selects its corner, as a click on the corner's anchor does, so the next drag on it rounds that corner alone; Shift-click toggles it (#1239). While a corner widget is dragged with the Selection tool the bounding box hides, so the rounding shows against the path alone (#1229). A round corner next to a curved side curves smoothly instead of sticking out of the shape (#1547, fixes #1512). View › Hide Edges hides the Live Corners widgets, the bounding box and the type widget, and the selection tools then do not answer a press on them or change the cursor over them. + With the pointer on a Direct Selection corner widget or close to it, the canvas marks the cut of that widget's corner with a thicker line (#1232). The help page describes this marking of a widget's corner while the pointer is on the widget or close to it ([Live Corners help page, archived](https://web.archive.org/web/2016id_/https://helpx.adobe.com/illustrator/using/reshape-with-live-corners.html)). As VectorCraft's own rules, the mark also shows with the Selection tool and the shape tools on the widgets they show, it is a 2 px line of the layer color within 5 px of the widget, a square corner gets none, and none is drawn while a mouse button is down. Tests: `corners::tests::a_widget_under_the_pointer_gives_its_corners_cut`, `corners::tests::a_square_corner_gives_no_cut_and_a_plain_paths_corner_gives_its_own`, `corners::tests::a_polygons_widget_gives_its_cut_and_a_hidden_widget_gives_none`, `canvas::tests::hovering_a_corner_widget_highlights_its_corner`. - **Rectangle Properties corner type:** a live rectangle's Rectangle Properties (Transform panel, the Properties panel's Transform section and the Contextual Task Bar's Shape Properties) have a Corner menu with Round, Inverted Round and Chamfer. With Corner Radius linked, one menu sets the kind of every corner of each selected rectangle, also corners with no radius, and shows blank when the shown rectangle's kinds differ; unlinked, each corner's row has its own menu beside its radius field, or under it in a panel too narrow for both; the unlinked radius fields and menus leave other selected paths and polygons as they are. A pick is one undo step, and picking the kind the corners already have adds none (`object.setLiveShape {kind, rectanglesOnly, corners}`); an action that records them acts on the rectangles selected when it plays. The help page says a rectangle's corner type can be set for each corner or for all of them at once ([the help page](https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/modify-live-shapes/live-shape-properties.html)); tying the number of menus to the Corner Radius link, the blank value and the undo steps are VectorCraft's own rules (`a_rectangle_shows_linked_and_unlinked_corner_types`, `the_shape_properties_popup_changes_a_rectangle_corner_type`, `the_linked_corner_menu_sets_every_selected_rectangle`, `the_unlinked_corner_menus_fit_a_narrow_panel`, `an_unlinked_corner_radius_leaves_other_selected_shapes`, `a_rectangle_corner_kind_without_a_selected_rectangle_changes_nothing`, `rectangle_kind_menu_targets_all_or_one_corner_and_skips_noop_undo`, `rectangles_only_sets_the_selected_rectangles_when_an_action_plays`, `a_radius_reaches_a_rectangle_that_already_draws_it`). - **Polygon side widget:** a selected live polygon shows a small diamond beside the middle of the right side of its bounding box, with the Selection tool and with the Rectangle, Rounded Rectangle, Ellipse, Polygon and Star tools, while the bounding box and the edges are shown. Dragging the widget sets the polygon's side count, from 3 to 11, as [the help page](https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/modify-live-shapes/add-or-remove-sides-from-polygons.html) describes; typed counts in the Transform panel and `object.setLiveShape` still go from 3 to 1000. A drag down adds one side and a drag up removes one for every 12 screen pixels along the box's own vertical axis, and the pointer shows the count while measurement labels are on. A polygon of more than 11 sides keeps its count until the drag goes up, which gives it 11. The drag sends `object.setLiveShape {sides}`, so the polygon keeps its center, radius and rotation; the release adds one undo step when the count changed and none when it ends where it began, and Escape puts the count back. The widget's look and place, the drag direction, the step and the rule for more than 11 sides are VectorCraft's own (`crates/tools/src/sidewidget.rs`). - **Hide/Show Shape Widgets:** with the Rectangle, Rounded Rectangle, Ellipse, Polygon or Star tool, the Control bar shows a Hide Shape Widgets button, which reads Show Shape Widgets while the widgets are hidden (`view.shapeWidgets {on?}`). [The help page](https://helpx.adobe.com/illustrator/using/live-shapes.html) describes this Control panel button, offered with any live shape drawing tool, as switching the on-canvas widgets of selected shapes off and on. While they are hidden, a selected live rectangle's or polygon's corner widgets, a live ellipse's pie widgets and a live polygon's side widget are not drawn, and the Selection tool and those shape tools do not answer a press, a double-click or the cursor on their place (a shape tool draws from there). The bounding box and its handles, the center point and Direct Selection's corner widgets (View › Hide Corner Widget) stay as they are. The setting is on by default, kept with the interface state across sessions and tool switches, and adds no undo step. Its scope beyond the shape tools, its default and what it leaves shown are VectorCraft's own rules (tests `hidden_shape_widgets_leave_the_bounding_box`, `the_shape_tools_control_bar_hides_and_shows_the_shape_widgets`, `shape_widgets_command_toggles_and_takes_on`, `hidden_shape_widgets_do_not_answer_a_shape_tool` and `hidden_shape_widgets_leave_direct_selections_corners`).