From d2fdc9728a674754caab11ca664f6103344da859 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 21 Nov 2026 11:13:22 -0800 Subject: [PATCH 1/3] Pen: Quick Pen marks an arc's center with a cross while the arc is drawn Wherever the Quick Pen tool shows an arc's protractor (while the arc is dragged, or as the piece the next click adds), it also draws a small cross at the arc's center, as the circle and three-point arc tools draw theirs. The cross is VectorCraft's own behavior. Adds a test for the cross while hovering and dragging. --- crates/engine/src/tests/quickpen.rs | 27 +++++++++++++++++++++++++++ crates/tools/src/quickpen.rs | 18 ++++++++++++------ docs/mcp.md | 3 ++- docs/target-app-parity.md | 1 + 4 files changed, 42 insertions(+), 7 deletions(-) diff --git a/crates/engine/src/tests/quickpen.rs b/crates/engine/src/tests/quickpen.rs index c6174aa19f..3612dfe2b9 100644 --- a/crates/engine/src/tests/quickpen.rs +++ b/crates/engine/src/tests/quickpen.rs @@ -677,6 +677,33 @@ fn a_hovered_arc_shows_the_protractor_with_the_rubber_band() { } } +/// The two arms of a cross centered on `c` among the overlays. +fn crosses_at(o: &[Overlay], c: Point) -> usize { + o.iter().filter(|o| matches!(o, Overlay::Line { a, b, .. } if a.midpoint(*b).distance(c) < 1e-9)).count() +} + +/// While a half circle from (200, 100) to (300, 100) is dragged, or is the piece the next click +/// adds, the tool shows a cross at its center, (250, 100); while a line is dragged, it shows none. +#[test] +fn an_arc_shows_a_cross_at_its_center() { + let mut s = session(); + quick_pen(&mut s); + let center = pt(250.0, 100.0); + for (action, arms) in [("line", 0), ("sharpArc", 2)] { + key(&mut s, ToolKey::Escape); + s.set_tool_option_cmd(&json!({"tool": "quickPen", "key": "action", "value": "line"})).unwrap(); + click(&mut s, 100.0, 100.0); + click(&mut s, 200.0, 100.0); + s.set_tool_option_cmd(&json!({"tool": "quickPen", "key": "action", "value": action})).unwrap(); + s.pointer(&PointerEvent::new(PointerKind::Move, 300.0, 100.0), view()).unwrap(); + assert_eq!(crosses_at(&s.overlays(view()), center), arms, "hovering, {action}"); + s.pointer(&PointerEvent::new(PointerKind::Down, 280.0, 150.0), view()).unwrap(); + s.pointer(&PointerEvent::new(PointerKind::Drag, 300.0, 100.0), view()).unwrap(); + assert_eq!(crosses_at(&s.overlays(view()), center), arms, "dragging, {action}"); + s.pointer(&PointerEvent::new(PointerKind::Up, 300.0, 100.0), view()).unwrap(); + } +} + /// With Measurement Labels on, hovering after the path's last point shows the distance label /// beside the pointer; with them off, no label shows. #[test] diff --git a/crates/tools/src/quickpen.rs b/crates/tools/src/quickpen.rs index d542af832c..6b6a56b408 100644 --- a/crates/tools/src/quickpen.rs +++ b/crates/tools/src/quickpen.rs @@ -15,12 +15,13 @@ //! //! While an arc is drawn, by a drag or as the piece the next click adds, the tool shows a //! protractor around the arc's center: a tick across its circle every 15° from where the arc -//! starts, a longer one every 90°, and one where it ends. The piece the next click adds shows its -//! protractor only while the Pen tool's rubber band preference shows that piece. With Smart Guides -//! on, the end of a continuous arc goes onto the nearest tick of that protractor when the tick lies -//! within the snapping tolerance of the pointer, no other Smart Guide snaps the point, and neither -//! the grid nor pixels snap drawn points. A sharp-corner arc sweeps its arc size, so its end is not -//! snapped to a tick. Shift does not constrain Quick Pen points, so it does not change the snapping. +//! starts, a longer one every 90°, and one where it ends, with a small cross at the center. The +//! piece the next click adds shows its protractor only while the Pen tool's rubber band preference +//! shows that piece. With Smart Guides on, the end of a continuous arc goes onto the nearest tick +//! of that protractor when the tick lies within the snapping tolerance of the pointer, no other +//! Smart Guide snaps the point, and neither the grid nor pixels snap drawn points. A sharp-corner +//! arc sweeps its arc size, so its end is not snapped to a tick. Shift does not constrain Quick Pen +//! points, so it does not change the snapping. use std::f64::consts::{FRAC_PI_2, PI}; use std::sync::Arc; @@ -49,6 +50,8 @@ pub const MAX_TURN: f64 = 359.0; pub const TICK_STEP: f64 = 15.0; /// Half the length (screen points) of a protractor tick; the ticks every 90° are twice as long. const TICK_PX: f64 = 4.0; +/// Half the length (screen points) of each arm of the cross at an arc's center. +const CROSS_PX: f64 = 4.0; /// Screen points the pointer moves after a press before the press drags. const DRAG_PX: f64 = 3.0; /// A continuous arc whose end lies within this angle (radians) of straight ahead, or of straight @@ -824,6 +827,9 @@ impl Tool for QuickPenTool { }; if let Some(arc) = arc { o.push(Overlay::Path { path: protractor(cx, &arc), color: FEEDBACK, width: 1.0, dashed: false }); + let (c, arm) = (arc.center, cx.tol(CROSS_PX)); + o.push(Overlay::Line { a: c - Vec2::new(arm, 0.0), b: c + Vec2::new(arm, 0.0), color: FEEDBACK, dashed: false }); + o.push(Overlay::Line { a: c - Vec2::new(0.0, arm), b: c + Vec2::new(0.0, arm), color: FEEDBACK, dashed: false }); } if self.press.is_none() && let Some(h) = end.or(self.hover) diff --git a/docs/mcp.md b/docs/mcp.md index 65383caa1b..c5659c8b5c 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -7335,7 +7335,8 @@ that piece. With Smart Guides on, the end of a continuous arc snaps onto the nea circle, when that tick lies within the Smart Guides snapping tolerance of the pointer, no other Smart Guide snaps the point, and neither Snap to Grid nor Snap to Pixel snaps drawn points. A sharp-corner arc sweeps the arc size, so its end does not snap to a tick. Shift does not constrain Quick Pen points, so it does not change the tick snapping. The -protractor, its 15° step and the tick snapping are VectorCraft's own behavior. +protractor, its 15° step and the tick snapping are VectorCraft's own behavior. A small cross marks the arc's center +wherever the protractor shows; the cross is VectorCraft's own behavior too. Selecting the tool shows its toolbar on the canvas: Straight Line, Continuous Arc and Sharp Corner Arc set `action`, Flip Arc flips the last sharp-corner arc as C does (`tool.quickPen.flipArc {}`, which first finishes any pending tool edit, diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 581f72bb0f..fb125077f7 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -643,6 +643,7 @@ since 2026-10-01. - **Recolor picker follow-up (#8031/#4028):** native Lab numeric entry, document/loaded-library swatches in the Color Picker, and Assign-row Pick from Swatches / Limit to Library menus. #4090 provided the double-click picker and #5113 the Assign sliders. Regression tests `native_lab_entry_in_color_picker` and `row_context_menu_pick_from_swatches_and_limit_to_library` exercise the fields and menu callbacks rather than writing their result state. Area score and hours unchanged. - **Quick Pen tool (#2660, in part):** a tool in the Pen tool's group (Alt+P, Option+P on macOS) draws straight lines, continuous arcs and sharp-corner arcs, one undo step per piece; Alt pressed and let go on its own switches the action, C flips the last sharp-corner arc, `[` and `]` change the arc size by 15°, a click on the first point closes the path, a click on an open end continues it, and Escape or Enter ends it (`path.quickPen`), as [Draw with the Quick Pen tool](https://helpx.adobe.com/illustrator/web/add-and-edit-artwork/draw-and-edit-paths/draw-with-quick-pen-tool.html) and [Quick Pen tool keyboard shortcuts](https://helpx.adobe.com/illustrator/web/add-and-edit-artwork/draw-and-edit-paths/quick-pen-tool-keyboard-shortcuts.html) describe. The 180° default arc, its 15° steps, the side an arc bulges to, a dragged piece ending where the press is let go, and C, `[` and `]` changing the arc being dragged are VectorCraft's own rules. Tests: tools `quickpen::tests`, engine `tests::quickpen`, ui-egui `shortcuts::alt_tap::tests`, `alt_p_chooses_the_quick_pen_and_an_alt_tap_switches_its_action` and `brackets_size_the_quick_pen_arc_being_dragged`. Score and hours unchanged. - **Quick Pen protractor:** while an arc is drawn, by a drag or as the piece the next click adds, the Quick Pen tool shows a protractor around the arc's center: a tick every 15° from the arc's start, a longer one every 90°, and one at its end; the next click's piece shows it only with Enable Rubber Band for the Pen tool on. With Smart Guides on, the end of a continuous arc snaps onto the nearest tick within the snapping tolerance of the pointer when no other Smart Guide snaps the point and neither Snap to Grid nor Snap to Pixel snaps drawn points; Shift does not change it. The protractor, its 15° step and the tick snapping are VectorCraft's own behavior. Tests: tools `the_arc_circle_is_the_circle_the_arc_is_drawn_on`, `a_continuous_arc_end_goes_to_the_nearest_tick`, `a_tick_past_the_coordinate_limit_is_not_used`, `the_protractor_ticks_lie_across_the_arc`; engine `a_continuous_arc_end_snaps_to_the_protractor`, `a_click_puts_a_continuous_arc_end_on_a_tick`, `a_hover_snaps_to_a_tick_only_for_a_continuous_arc`, `an_arc_drag_shows_the_protractor`, `a_hovered_arc_shows_the_protractor_with_the_rubber_band`. New tests of existing Quick Pen behavior: `a_point_snaps_to_a_smart_guide`, `hovering_shows_the_distance_label`. Score and hours unchanged. +- **Quick Pen arc center:** wherever the Quick Pen tool shows an arc's protractor, it also marks the arc's center with a small cross. The cross is VectorCraft's own behavior. Test: engine `an_arc_shows_a_cross_at_its_center`. Score and hours unchanged. - **Optional compact Tools (#7234):** Window > Toolbars > Compact Tools reduces row and column spacing and the main panel's allocated width in one or two columns, docked or floating. The setting is saved with the UI state and applies to Basic, Advanced and edited main Tools layouts; the selected tool, icon size, footer controls and tool-flyout behavior are retained. Turning it off restores the existing layout, which remains the default. Named custom toolbars and flyout spacing are unchanged. Public regressions in `crates/ui-egui/tests/toolbar_compact.rs` cover the actual toolbar layout against the default control, the command and saved-state roundtrip, tool selection, flyouts, footer controls and short-window reachability. This is an optional layout choice, without a styling-parity or score claim; hours are unchanged. From 20425b6914113ec7d59bdfd0562ee8b480a3f036 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 21 Nov 2026 13:09:35 -0800 Subject: [PATCH 2/3] Pen: Quick Pen snaps no first continuous arc to a tick and hides a stale hover A continuous arc that starts a path has no direction to follow and sweeps the arc size, as a sharp-corner arc does. Moving its end onto a protractor tick put the end on a circle the drawn arc does not follow, so `tick_end` now gives no tick for it. The hover keeps the snap settings it was made with (`SnapSettings` in guides/snap.rs: the window, zoom, snapping options, tolerances, Alignment Guides and construction angles). After one of them changes under a still pointer, the hover's rubber band, protractor, distance label and Smart Guides are hidden until the pointer moves, also through a press, so the preview shows no point that a click would not place. A press also drops the hover, so after a click puts an arc's end on a tick no preview runs from that end back to the pointer. While the pointer hovers, the tool asks the canvas to hover it again when the view, the document or the selection changes (`wants_rehover`). --- crates/engine/src/tests/quickpen.rs | 89 +++++++++++++++++++++++++++++ crates/tools/src/guides.rs | 2 +- crates/tools/src/guides/snap.rs | 22 +++++++ crates/tools/src/quickpen.rs | 56 +++++++++++++----- crates/tools/src/quickpen/tests.rs | 15 +++++ docs/mcp.md | 8 ++- docs/target-app-parity.md | 2 +- 7 files changed, 177 insertions(+), 17 deletions(-) diff --git a/crates/engine/src/tests/quickpen.rs b/crates/engine/src/tests/quickpen.rs index 3612dfe2b9..fe4a9ae553 100644 --- a/crates/engine/src/tests/quickpen.rs +++ b/crates/engine/src/tests/quickpen.rs @@ -616,6 +616,23 @@ fn a_click_puts_a_continuous_arc_end_on_a_tick() { } } +/// After a click puts a continuous arc's end on a tick away from the pointer, no preview runs from +/// the placed end back to where the pointer was; the next move shows the preview again. +#[test] +fn a_click_on_a_tick_leaves_no_preview_back_to_the_pointer() { + let at = arc_end_61(); + let v = ViewInfo::default(); + let mut s = session(); + continuous_arc_after_a_line(&mut s, v); + s.pointer(&PointerEvent::new(PointerKind::Move, at.x, at.y), v).unwrap(); + press_in(&mut s, &[(at.x, at.y)], v); + assert!(drawn_end(&s).distance(tick_60()) < 1e-6); + let label = |s: &mut Session| s.overlays(v).iter().any(|o| matches!(o, Overlay::Measure { .. })); + assert!(!label(&mut s), "no distance label back to the pointer"); + s.pointer(&PointerEvent::new(PointerKind::Move, 400.0, 300.0), v).unwrap(); + assert!(label(&mut s)); +} + /// Hovering near a tick as a continuous arc puts the distance label beside the tick; after Alt /// switches the action, the same hover puts it beside the pointer. #[test] @@ -640,6 +657,78 @@ fn a_hover_snaps_to_a_tick_only_for_a_continuous_arc() { } } +/// A hover made with Smart Guides off shows nothing once they are turned on under the still +/// pointer, so it shows no tick that a click would not use (another path's anchor under the +/// pointer takes the click). The next move shows the hover again, its label beside the anchor; +/// once Smart Guides are turned off again, its guides are hidden with it, also after a click. +#[test] +fn a_hover_shows_nothing_after_smart_guides_change() { + let at = arc_end_61(); + let off = ViewInfo { smart_guides: false, ..Default::default() }; + let on = ViewInfo::default(); + let mut s = session(); + s.execute("shape.line", &json!({"x1": at.x, "y1": at.y, "x2": 600, "y2": at.y})).unwrap(); + s.execute("select.set", &json!({"ids": []})).unwrap(); + continuous_arc_after_a_line(&mut s, off); + s.pointer(&PointerEvent::new(PointerKind::Move, at.x, at.y), off).unwrap(); + let label = |s: &mut Session, v: ViewInfo| { + s.overlays(v).iter().find_map(|o| match o { + Overlay::Measure { p, .. } => Some(*p), + _ => None, + }) + }; + assert!(label(&mut s, off).is_some()); + assert_eq!(label(&mut s, on), None, "the hover from before the change shows nothing"); + s.pointer(&PointerEvent::new(PointerKind::Move, at.x, at.y), on).unwrap(); + let off_anchor = label(&mut s, on).unwrap() - at; + assert!(off_anchor.x > 0.0 && (off_anchor.x - off_anchor.y).abs() < 1e-9, "the label sits diagonally off the anchor: {off_anchor:?}"); + let only_points = |s: &mut Session, v: ViewInfo| s.overlays(v).iter().all(|o| matches!(o, Overlay::CurvePoint { .. })); + assert!(!only_points(&mut s, on)); + assert!(only_points(&mut s, off), "only the path's points show"); + // A click before the pointer moves does not bring the stale hover back. + press_in(&mut s, &[(400.0, 300.0)], off); + assert_eq!(label(&mut s, off), None, "no label for the stale hover after the click"); +} + +/// While the pointer hovers, the tool asks the canvas to hover it again when the view, the document +/// or the selection changes under a still pointer, so the snapped point follows the art; a press +/// stops it until the next move. +#[test] +fn a_hover_is_hovered_again_when_the_art_changes() { + let mut s = session(); + continuous_arc_after_a_line(&mut s, view()); + assert!(!s.tool_wants_rehover()); + s.pointer(&PointerEvent::new(PointerKind::Move, 280.0, 180.0), view()).unwrap(); + assert!(s.tool_wants_rehover()); + s.pointer(&PointerEvent::new(PointerKind::Down, 280.0, 180.0), view()).unwrap(); + assert!(!s.tool_wants_rehover()); + s.pointer(&PointerEvent::new(PointerKind::Up, 280.0, 180.0), view()).unwrap(); + assert!(!s.tool_wants_rehover()); +} + +/// A hover on the path's last point, which another path's anchor shares, shows that anchor's Smart +/// Guide; after Smart Guides are turned off, a click there adds nothing and the guide stays hidden +/// while the button is held and after it is let go. +#[test] +fn a_click_that_adds_nothing_keeps_a_stale_hover_hidden() { + let off = ViewInfo { smart_guides: false, ..Default::default() }; + let on = ViewInfo::default(); + let mut s = session(); + s.execute("shape.line", &json!({"x1": 200, "y1": 100, "x2": 200, "y2": 400})).unwrap(); + s.execute("select.set", &json!({"ids": []})).unwrap(); + continuous_arc_after_a_line(&mut s, on); + s.pointer(&PointerEvent::new(PointerKind::Move, 200.0, 100.0), on).unwrap(); + let only_points = |s: &mut Session, v: ViewInfo| s.overlays(v).iter().all(|o| matches!(o, Overlay::CurvePoint { .. })); + assert!(!only_points(&mut s, on), "the anchor's guide shows"); + assert!(only_points(&mut s, off)); + let steps = undo_steps(&s); + s.pointer(&PointerEvent::new(PointerKind::Down, 200.0, 100.0), off).unwrap(); + assert!(only_points(&mut s, off), "the guide stays hidden while the button is held"); + s.pointer(&PointerEvent::new(PointerKind::Up, 200.0, 100.0), off).unwrap(); + assert_eq!(undo_steps(&s), steps, "the click adds nothing"); + assert!(only_points(&mut s, off), "the guide stays hidden"); +} + /// While a press drags an arc, the tool shows its protractor; while it drags a line, it shows none. #[test] fn an_arc_drag_shows_the_protractor() { diff --git a/crates/tools/src/guides.rs b/crates/tools/src/guides.rs index e9f7bf7318..ccbf258512 100644 --- a/crates/tools/src/guides.rs +++ b/crates/tools/src/guides.rs @@ -25,10 +25,10 @@ mod snap; mod targets; pub(crate) use bitangent::TangentLine; -pub(crate) use snap::hold_on_path; pub use snap::{ DEFAULT_CONSTRUCTION_ANGLES, DrawSnap, HandleSnap, Leave, PointSnap, construction_angles, distance_guides, snap_draw, snap_pick, square, }; +pub(crate) use snap::{SnapSettings, hold_on_path}; use targets::Kind; pub use targets::Targets; #[cfg(test)] diff --git a/crates/tools/src/guides/snap.rs b/crates/tools/src/guides/snap.rs index 948f5668b9..0a48b35001 100644 --- a/crates/tools/src/guides/snap.rs +++ b/crates/tools/src/guides/snap.rs @@ -376,6 +376,28 @@ impl SnapKey { } } +/// Every setting that can move a snapped drawn point besides the document: the window and the +/// zoom, the options and tolerances [`SnapKey`] holds except the guides' color and labels, and +/// the construction guides' angles a [`Leave::segment`] follows. A tool that keeps a hover's +/// snapped point compares two of these to see whether a click would still snap the same way. +#[derive(PartialEq)] +pub(crate) struct SnapSettings { + screen: Option, + zoom: f64, + view: [bool; 7], + snap_to_glyph: Option, + alignment_lines: bool, + tolerances: [f64; 2], + angles: &'static [f64], +} + +impl SnapSettings { + pub(crate) fn of(cx: &ToolContext) -> Self { + let SnapKey { screen, view, snap_to_glyph, style, tolerances, .. } = SnapKey::of(cx, &[]); + Self { screen, zoom: cx.zoom, view, snap_to_glyph, alignment_lines: style.lines, tolerances, angles: cx.construction_angles } + } +} + /// The part of the document the window shows (none headless: all of it). pub(super) fn visible(cx: &ToolContext) -> Option { let s = cx.screen?; diff --git a/crates/tools/src/quickpen.rs b/crates/tools/src/quickpen.rs index 6b6a56b408..f4bf64a648 100644 --- a/crates/tools/src/quickpen.rs +++ b/crates/tools/src/quickpen.rs @@ -20,8 +20,11 @@ //! shows that piece. With Smart Guides on, the end of a continuous arc goes onto the nearest tick //! of that protractor when the tick lies within the snapping tolerance of the pointer, no other //! Smart Guide snaps the point, and neither the grid nor pixels snap drawn points. A sharp-corner -//! arc sweeps its arc size, so its end is not snapped to a tick. Shift does not constrain Quick Pen -//! points, so it does not change the snapping. +//! arc, and a continuous arc that has no direction to follow, sweep the arc size, so their ends are +//! not snapped to a tick. After a snap setting changes under a still pointer, the hover's preview, +//! protractor, distance label and Smart Guides are hidden until the pointer moves; when the view, +//! the document or the selection changes, the canvas hovers the still pointer again. Shift does +//! not constrain Quick Pen points, so it does not change the snapping. use std::f64::consts::{FRAC_PI_2, PI}; use std::sync::Arc; @@ -31,7 +34,7 @@ use vectorcraft_doc::{Document, MAX_COORD, Node, NodeId, NodeKind}; use vectorcraft_geom::{Anchor, AnchorKind, BezPath, Point, SubPath, Vec2}; use crate::draw2::FEEDBACK; -use crate::guides::{DrawSnap, Leave}; +use crate::guides::{DrawSnap, Leave, SnapSettings}; use crate::pen::{continue_from, open_end_at}; use crate::{Action, Cursor, Mods, Overlay, PixelOp, PointerEvent, PointerKind, Tool, ToolContext, ToolKey}; @@ -237,12 +240,14 @@ pub fn arc_circle(sp: &SubPath, piece: &Piece) -> Option { /// The protractor tick nearest the end of a continuous arc ending at `piece.to`: the point on the /// arc's circle ([`arc_circle`]) where the sweep is a whole number of [`TICK_STEP`]s. None for -/// other pieces, an arc without a circle, a sweep that rounds to nothing or to a whole circle, and -/// a tick past the document's coordinate limit. +/// other pieces, a continuous arc with no direction to follow (it sweeps the arc size, as a +/// sharp-corner arc does), an arc without a circle, a sweep that rounds to nothing or to a whole +/// circle, and a tick past the document's coordinate limit. pub fn tick_end(sp: &SubPath, piece: &Piece) -> Option { if piece.stroke != Stroke::ContinuousArc { return None; } + arrival(sp)?; let arc = arc_circle(sp, piece)?; let step = TICK_STEP.to_radians(); let s = (arc.sweep / step).round() * step; @@ -374,10 +379,11 @@ pub struct QuickPenTool { press: Option, hover: Option, snap: DrawSnap, - /// The pointer while it hovers, and whether it lies on a Smart Guide target ([`Self::landed`]); - /// `hover` is where Smart Guides put it. The protractor's tick is applied when the point is - /// used ([`Self::hover_end`]), for the action chosen then. A press clears it. - pointer: Option<(Point, bool)>, + /// The pointer while it hovers, whether it lies on a Smart Guide target ([`Self::landed`]), and + /// the snap settings then; `hover` is where Smart Guides put it. The protractor's tick is + /// applied when the point is used ([`Self::hover_end`]), for the action chosen then. A press + /// clears it. + pointer: Option<(Point, bool, SnapSettings)>, } impl Default for QuickPenTool { @@ -508,12 +514,22 @@ impl QuickPenTool { /// Where the next click's piece after `sp` ends while the pointer hovers: the hover's snapped /// point, on the protractor's tick when [`Self::on_tick`] puts it there. None before the - /// pointer moves after a press. + /// pointer moves after a press, and while the hover is stale ([`Self::hover_stale`]). fn hover_end(&self, cx: &ToolContext, sp: &SubPath) -> Option { - let ((p, landed), q) = (self.pointer?, self.hover?); + let (&(p, landed, _), q) = (self.pointer.as_ref()?, self.hover?); + if self.hover_stale(cx) { + return None; + } Some(self.on_tick(cx, sp, self.piece_to(q), p, q, landed)) } + /// Whether the snap settings changed since the pointer last moved: the hover's snapped point + /// and its tick may then not be where a click puts the point, so the hover shows nothing until + /// the pointer moves again. + fn hover_stale(&self, cx: &ToolContext) -> bool { + self.pointer.as_ref().is_some_and(|(_, _, at)| *at != SnapSettings::of(cx)) + } + /// During a press that adds a piece: the points before that piece, as the press found them /// (the last two, see [`tail`]). fn before_piece(&self) -> Option { @@ -636,13 +652,20 @@ impl Tool for QuickPenTool { let (on, from) = self.leave(cx).unzip(); let q = self.snap.hover(cx, p, on.as_slice(), from.as_ref()); self.hover = Some(q); - self.pointer = Some((p, on.is_some() && self.landed(cx, p, q, from.as_ref()))); + self.pointer = Some((p, on.is_some() && self.landed(cx, p, q, from.as_ref()), SnapSettings::of(cx))); vec![] } PointerKind::Down => { if self.press.is_some() { return vec![]; } + // The hover shows again when the pointer moves after the press: the point the press + // places can lie on a tick away from it. A stale hover's guides stay hidden, also + // when the press snaps nothing. + if self.hover_stale(cx) { + self.snap.clear(); + } + self.hover = None; self.pointer = None; self.press_down(cx, p) } @@ -812,8 +835,14 @@ impl Tool for QuickPenTool { self.pointer = None; } + /// A hover's snapped point and its tick depend on the art and the view under a still pointer. + fn wants_rehover(&self) -> bool { + self.pointer.is_some() + } + fn overlays(&self, cx: &ToolContext) -> Vec { - let mut o = self.snap.guides().to_vec(); + // A stale hover's Smart Guides go with its preview. + let mut o = if self.hover_stale(cx) { vec![] } else { self.snap.guides().to_vec() }; let Some((id, sp)) = self.active(cx) else { return o }; let end = if self.press.is_none() { self.hover_end(cx, sp) } else { None }; // The arc being drawn: the piece a press drags, or the piece the next click adds while the @@ -832,6 +861,7 @@ impl Tool for QuickPenTool { o.push(Overlay::Line { a: c - Vec2::new(0.0, arm), b: c + Vec2::new(0.0, arm), color: FEEDBACK, dashed: false }); } if self.press.is_none() + && !self.hover_stale(cx) && let Some(h) = end.or(self.hover) { if cx.pen_rubber_band diff --git a/crates/tools/src/quickpen/tests.rs b/crates/tools/src/quickpen/tests.rs index 5fb23565c5..1319948423 100644 --- a/crates/tools/src/quickpen/tests.rs +++ b/crates/tools/src/quickpen/tests.rs @@ -259,6 +259,21 @@ fn a_tick_past_the_coordinate_limit_is_not_used() { assert!(tick_end(&sp, &inside).is_some(), "a tick inside the limit is used"); } +/// A continuous arc that starts a path has no direction to follow and sweeps the arc size, so its +/// end has no tick to go to: with a 100° arc size, a tick at 105° would move the end off the arc +/// the click draws. +#[test] +fn a_continuous_arc_without_a_direction_has_no_tick() { + let sp = start(pt(0.0, 0.0)); + let pc = Piece { turn: 100.0, ..piece(100.0, 10.0, Stroke::ContinuousArc) }; + let arc = arc_circle(&sp, &pc).unwrap(); + assert!((arc.sweep.to_degrees() - 100.0).abs() < 1e-9, "{arc:?}"); + assert!(tick_end(&sp, &pc).is_none()); + // After a line, the same end has a tick. + let sp = build(&start(pt(-100.0, 0.0)), &[piece(0.0, 0.0, Stroke::Line)], false); + assert!(tick_end(&sp, &pc).is_some()); +} + /// The protractor has a tick every 15° of the sweep, each across the arc's circle, the first /// through the arc's start; a sweep that is not a whole number of steps adds a tick at its end. #[test] diff --git a/docs/mcp.md b/docs/mcp.md index c5659c8b5c..a01a4440e4 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -7333,8 +7333,12 @@ center: a tick across the arc's circle every 15° from where the arc starts, a l arc ends. The piece the next click adds shows its protractor only while Enable Rubber Band for the Pen tool shows that piece. With Smart Guides on, the end of a continuous arc snaps onto the nearest tick of its protractor, on the same circle, when that tick lies within the Smart Guides snapping tolerance of the pointer, no other Smart Guide snaps the -point, and neither Snap to Grid nor Snap to Pixel snaps drawn points. A sharp-corner arc sweeps the arc size, so its end -does not snap to a tick. Shift does not constrain Quick Pen points, so it does not change the tick snapping. The +point, and neither Snap to Grid nor Snap to Pixel snaps drawn points. A sharp-corner arc, and a continuous arc that +starts a path and so has no direction to follow, sweep the arc size, so their ends do not snap to a tick. After a snap +setting (Smart Guides, Snap to Point, Snap to Grid, Snap to Pixel or a snapping tolerance) changes under a still +pointer, the hover's preview, its protractor, its distance label and its Smart Guides are hidden until the pointer +moves. When the view, the document or the selection changes, the canvas hovers the still pointer again. Shift does not constrain Quick Pen points, so it +does not change the tick snapping. The protractor, its 15° step and the tick snapping are VectorCraft's own behavior. A small cross marks the arc's center wherever the protractor shows; the cross is VectorCraft's own behavior too. diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index fb125077f7..06234e9f34 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -642,7 +642,7 @@ since 2026-10-01. - **Recolor picker follow-up (#8031/#4028):** native Lab numeric entry, document/loaded-library swatches in the Color Picker, and Assign-row Pick from Swatches / Limit to Library menus. #4090 provided the double-click picker and #5113 the Assign sliders. Regression tests `native_lab_entry_in_color_picker` and `row_context_menu_pick_from_swatches_and_limit_to_library` exercise the fields and menu callbacks rather than writing their result state. Area score and hours unchanged. - **Quick Pen tool (#2660, in part):** a tool in the Pen tool's group (Alt+P, Option+P on macOS) draws straight lines, continuous arcs and sharp-corner arcs, one undo step per piece; Alt pressed and let go on its own switches the action, C flips the last sharp-corner arc, `[` and `]` change the arc size by 15°, a click on the first point closes the path, a click on an open end continues it, and Escape or Enter ends it (`path.quickPen`), as [Draw with the Quick Pen tool](https://helpx.adobe.com/illustrator/web/add-and-edit-artwork/draw-and-edit-paths/draw-with-quick-pen-tool.html) and [Quick Pen tool keyboard shortcuts](https://helpx.adobe.com/illustrator/web/add-and-edit-artwork/draw-and-edit-paths/quick-pen-tool-keyboard-shortcuts.html) describe. The 180° default arc, its 15° steps, the side an arc bulges to, a dragged piece ending where the press is let go, and C, `[` and `]` changing the arc being dragged are VectorCraft's own rules. Tests: tools `quickpen::tests`, engine `tests::quickpen`, ui-egui `shortcuts::alt_tap::tests`, `alt_p_chooses_the_quick_pen_and_an_alt_tap_switches_its_action` and `brackets_size_the_quick_pen_arc_being_dragged`. Score and hours unchanged. -- **Quick Pen protractor:** while an arc is drawn, by a drag or as the piece the next click adds, the Quick Pen tool shows a protractor around the arc's center: a tick every 15° from the arc's start, a longer one every 90°, and one at its end; the next click's piece shows it only with Enable Rubber Band for the Pen tool on. With Smart Guides on, the end of a continuous arc snaps onto the nearest tick within the snapping tolerance of the pointer when no other Smart Guide snaps the point and neither Snap to Grid nor Snap to Pixel snaps drawn points; Shift does not change it. The protractor, its 15° step and the tick snapping are VectorCraft's own behavior. Tests: tools `the_arc_circle_is_the_circle_the_arc_is_drawn_on`, `a_continuous_arc_end_goes_to_the_nearest_tick`, `a_tick_past_the_coordinate_limit_is_not_used`, `the_protractor_ticks_lie_across_the_arc`; engine `a_continuous_arc_end_snaps_to_the_protractor`, `a_click_puts_a_continuous_arc_end_on_a_tick`, `a_hover_snaps_to_a_tick_only_for_a_continuous_arc`, `an_arc_drag_shows_the_protractor`, `a_hovered_arc_shows_the_protractor_with_the_rubber_band`. New tests of existing Quick Pen behavior: `a_point_snaps_to_a_smart_guide`, `hovering_shows_the_distance_label`. Score and hours unchanged. +- **Quick Pen protractor:** while an arc is drawn, by a drag or as the piece the next click adds, the Quick Pen tool shows a protractor around the arc's center: a tick every 15° from the arc's start, a longer one every 90°, and one at its end; the next click's piece shows it only with Enable Rubber Band for the Pen tool on. With Smart Guides on, the end of a continuous arc snaps onto the nearest tick within the snapping tolerance of the pointer when no other Smart Guide snaps the point and neither Snap to Grid nor Snap to Pixel snaps drawn points; Shift does not change it. A continuous arc that starts a path sweeps the arc size and does not snap to a tick, and a hover hides its preview after a snap setting changes until the pointer moves. The protractor, its 15° step and the tick snapping are VectorCraft's own behavior. Tests: tools `the_arc_circle_is_the_circle_the_arc_is_drawn_on`, `a_continuous_arc_end_goes_to_the_nearest_tick`, `a_tick_past_the_coordinate_limit_is_not_used`, `a_continuous_arc_without_a_direction_has_no_tick`, `the_protractor_ticks_lie_across_the_arc`; engine `a_continuous_arc_end_snaps_to_the_protractor`, `a_click_puts_a_continuous_arc_end_on_a_tick`, `a_click_on_a_tick_leaves_no_preview_back_to_the_pointer`, `a_hover_snaps_to_a_tick_only_for_a_continuous_arc`, `a_hover_shows_nothing_after_smart_guides_change`, `a_click_that_adds_nothing_keeps_a_stale_hover_hidden`, `a_hover_is_hovered_again_when_the_art_changes`, `an_arc_drag_shows_the_protractor`, `a_hovered_arc_shows_the_protractor_with_the_rubber_band`. New tests of existing Quick Pen behavior: `a_point_snaps_to_a_smart_guide`, `hovering_shows_the_distance_label`. Score and hours unchanged. - **Quick Pen arc center:** wherever the Quick Pen tool shows an arc's protractor, it also marks the arc's center with a small cross. The cross is VectorCraft's own behavior. Test: engine `an_arc_shows_a_cross_at_its_center`. Score and hours unchanged. - **Optional compact Tools (#7234):** Window > Toolbars > Compact Tools reduces row and column spacing and the main panel's allocated width in one or two columns, docked or floating. The setting is saved with the UI state and applies to Basic, Advanced and edited main Tools layouts; the selected tool, icon size, footer controls and tool-flyout behavior are retained. Turning it off restores the existing layout, which remains the default. Named custom toolbars and flyout spacing are unchanged. Public regressions in `crates/ui-egui/tests/toolbar_compact.rs` cover the actual toolbar layout against the default control, the command and saved-state roundtrip, tool selection, flyouts, footer controls and short-window reachability. This is an optional layout choice, without a styling-parity or score claim; hours are unchanged. From a5433617279e68e8fbc6a840d540fd22672dd2b1 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sat, 21 Nov 2026 14:41:30 -0800 Subject: [PATCH 3/3] Pen: Alt tapped during a Quick Pen press moves the end on or off the tick at once A press keeps the pointer and the snapped point for the end of the piece it adds. When Alt changes the action during the press, the end goes through the protractor's tick again for the new action, so a continuous arc that snapped to a tick and becomes a sharp-corner arc ends at the pointer, and a piece that becomes a continuous arc goes onto the tick, without waiting for the next drag. This also covers a press that has not dragged. --- crates/engine/src/tests/quickpen.rs | 28 +++++++++++++++++ crates/tools/src/quickpen.rs | 47 ++++++++++++++++++++--------- docs/mcp.md | 4 ++- docs/target-app-parity.md | 2 +- 4 files changed, 64 insertions(+), 17 deletions(-) diff --git a/crates/engine/src/tests/quickpen.rs b/crates/engine/src/tests/quickpen.rs index fe4a9ae553..375f648ac8 100644 --- a/crates/engine/src/tests/quickpen.rs +++ b/crates/engine/src/tests/quickpen.rs @@ -616,6 +616,34 @@ fn a_click_puts_a_continuous_arc_end_on_a_tick() { } } +/// Alt tapped during a press moves the end of the piece for the new action at once, with no +/// further drag: a continuous arc's end on the 60° tick goes to the pointer once the piece is a +/// sharp-corner arc, after a drag and after a press that has not dragged, and a line's end at the +/// pointer goes onto the tick once the piece is a continuous arc. +#[test] +fn an_alt_tap_during_a_press_moves_the_end_for_the_new_action() { + let at = arc_end_61(); + let v = ViewInfo::default(); + // (drag first, Alt taps before the press, the end before Alt, the end after it) + for (drag, taps, before, after) in [(true, 0, tick_60(), at), (false, 0, tick_60(), at), (true, 2, at, tick_60())] { + let mut s = session(); + continuous_arc_after_a_line(&mut s, v); + for _ in 0..taps { + key(&mut s, ToolKey::AltTap); + } + let first = if drag { (280.0, 140.0) } else { (at.x, at.y) }; + s.pointer(&PointerEvent::new(PointerKind::Down, first.0, first.1), v).unwrap(); + if drag { + s.pointer(&PointerEvent::new(PointerKind::Drag, at.x, at.y), v).unwrap(); + } + assert!(drawn_end(&s).distance(before) < 1e-6, "{drag} {taps}: {:?}", drawn_end(&s)); + s.tool_key(ToolKey::AltTap, Mods::default(), v).unwrap(); + assert!(drawn_end(&s).distance(after) < 1e-6, "{drag} {taps} after Alt: {:?}", drawn_end(&s)); + s.pointer(&PointerEvent::new(PointerKind::Up, at.x, at.y), v).unwrap(); + assert!(drawn_end(&s).distance(after) < 1e-6, "{drag} {taps} placed: {:?}", drawn_end(&s)); + } +} + /// After a click puts a continuous arc's end on a tick away from the pointer, no preview runs from /// the placed end back to where the pointer was; the next move shows the preview again. #[test] diff --git a/crates/tools/src/quickpen.rs b/crates/tools/src/quickpen.rs index f4bf64a648..2e5eb61491 100644 --- a/crates/tools/src/quickpen.rs +++ b/crates/tools/src/quickpen.rs @@ -364,12 +364,14 @@ impl Drawing { } /// The press in progress: where it went down, whether it has dragged, and whether it began an undo -/// step (a piece it adds). +/// step (a piece it adds). `end` is the pointer for the end of the piece it adds and where the +/// snap put that end, before the protractor's tick. #[derive(Clone, Copy, Debug, PartialEq)] struct Press { at: Point, dragged: bool, begun: bool, + end: Option<(Point, Point)>, } pub struct QuickPenTool { @@ -478,12 +480,12 @@ impl QuickPenTool { let before = self.before_piece(); let from = before.as_ref().and_then(|sp| sp.anchors.last()).map(|a| Leave::segment(cx, a.p, false).without_contact()); let q = self.snap.drag(cx, p, from.as_ref()); - let q = match (&before, self.drawing.as_ref().and_then(|dr| dr.pieces.last())) { - (Some(sp), Some(piece)) => { - let landed = piece.stroke == Stroke::ContinuousArc && self.landed(cx, p, q, from.as_ref()); - self.on_tick(cx, sp, *piece, p, q, landed) - } - _ => q, + if let Some(pr) = self.press.as_mut() { + pr.end = Some((p, q)); + } + let q = match self.drawing.as_ref().and_then(|dr| dr.pieces.last()) { + Some(piece) => self.press_end(cx, piece, p, q), + None => q, }; let Some(last) = self.drawing.as_mut().and_then(|dr| dr.pieces.last_mut()) else { return vec![] }; if last.to == q { @@ -493,6 +495,15 @@ impl QuickPenTool { vec![Action::Preview(COMMAND.into(), self.params(false)), drawn()] } + /// Where `piece`, which a press draws, ends with the pointer at `p` that the snap put at `q`: + /// on the protractor's tick when [`Self::on_tick`] puts it there for the piece's action. + fn press_end(&self, cx: &ToolContext, piece: &Piece, p: Point, q: Point) -> Point { + let Some(sp) = self.before_piece() else { return q }; + let from = sp.anchors.last().map(|a| Leave::segment(cx, a.p, false).without_contact()); + let landed = piece.stroke == Stroke::ContinuousArc && self.landed(cx, p, q, from.as_ref()); + self.on_tick(cx, &sp, *piece, p, q, landed) + } + /// `q`, where the last snap put the end of `piece` drawn after `sp` (the pointer being at `p`), /// moved onto the protractor's nearest tick ([`tick_end`]) when Smart Guides are on, the tick /// lies within the snapping tolerance of the pointer, and nothing else snapped the point: the @@ -582,15 +593,15 @@ impl QuickPenTool { return vec![]; } let from = self.leave(cx).map(|l| l.1); - let q = self.snap.press(cx, p, &[id], from.as_ref()); - let landed = self.action == Stroke::ContinuousArc && self.landed(cx, p, q, from.as_ref()); - let q = self.on_tick(cx, sp, self.piece_to(q), p, q, landed); + let snapped = self.snap.press(cx, p, &[id], from.as_ref()); + let landed = self.action == Stroke::ContinuousArc && self.landed(cx, p, snapped, from.as_ref()); + let q = self.on_tick(cx, sp, self.piece_to(snapped), p, snapped, landed); let (piece, kept) = (self.piece_to(q), sp.anchors.len()); if let Some(dr) = self.drawing.as_mut() { dr.push(piece, kept); dr.before_press = shared_node(cx.doc, id).cloned(); } - self.press = Some(Press { at: p, dragged: false, begun: true }); + self.press = Some(Press { at: p, dragged: false, begun: true, end: Some((p, snapped)) }); return vec![Action::Begin("Quick Pen".into()), Action::Preview(COMMAND.into(), self.params(false)), drawn()]; } if let Some((id, si, at_first)) = open_end_at(cx, p, tol, None) @@ -800,11 +811,17 @@ impl Tool for QuickPenTool { } ToolKey::AltTap => { self.action = self.action.next(); - // A drag under way draws its piece with the new action. + // A drag under way draws its piece with the new action. Its end goes through the + // protractor's tick again for that action: a continuous arc's end on a tick goes + // back to where the snap put the pointer for another action, and the other way. if self.press.is_some_and(|pr| pr.begun) && self.held(cx) { - let (action, turn) = (self.action, self.turn); - if let Some(last) = self.drawing.as_mut().and_then(|dr| dr.pieces.last_mut()) { - (last.stroke, last.turn, last.flip) = (action, turn, false); + let (action, turn, end) = (self.action, self.turn, self.press.and_then(|pr| pr.end)); + let piece = self.drawing.as_ref().and_then(|dr| dr.pieces.last()).map(|&pc| { + let pc = Piece { stroke: action, turn, flip: false, ..pc }; + end.map_or(pc, |(p, q)| Piece { to: self.press_end(cx, &pc, p, q), ..pc }) + }); + if let (Some(piece), Some(last)) = (piece, self.drawing.as_mut().and_then(|dr| dr.pieces.last_mut())) { + *last = piece; } return vec![Action::Preview(COMMAND.into(), self.params(false)), drawn()]; } diff --git a/docs/mcp.md b/docs/mcp.md index a01a4440e4..a529564ad9 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -7334,7 +7334,9 @@ arc ends. The piece the next click adds shows its protractor only while Enable R that piece. With Smart Guides on, the end of a continuous arc snaps onto the nearest tick of its protractor, on the same circle, when that tick lies within the Smart Guides snapping tolerance of the pointer, no other Smart Guide snaps the point, and neither Snap to Grid nor Snap to Pixel snaps drawn points. A sharp-corner arc, and a continuous arc that -starts a path and so has no direction to follow, sweep the arc size, so their ends do not snap to a tick. After a snap +starts a path and so has no direction to follow, sweep the arc size, so their ends do not snap to a tick. Alt tapped +during a press moves the piece's end for the new action at once: off the tick when a continuous arc becomes a +sharp-corner arc, and onto it when the piece becomes a continuous arc. After a snap setting (Smart Guides, Snap to Point, Snap to Grid, Snap to Pixel or a snapping tolerance) changes under a still pointer, the hover's preview, its protractor, its distance label and its Smart Guides are hidden until the pointer moves. When the view, the document or the selection changes, the canvas hovers the still pointer again. Shift does not constrain Quick Pen points, so it diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index 06234e9f34..03f9478ece 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -642,7 +642,7 @@ since 2026-10-01. - **Recolor picker follow-up (#8031/#4028):** native Lab numeric entry, document/loaded-library swatches in the Color Picker, and Assign-row Pick from Swatches / Limit to Library menus. #4090 provided the double-click picker and #5113 the Assign sliders. Regression tests `native_lab_entry_in_color_picker` and `row_context_menu_pick_from_swatches_and_limit_to_library` exercise the fields and menu callbacks rather than writing their result state. Area score and hours unchanged. - **Quick Pen tool (#2660, in part):** a tool in the Pen tool's group (Alt+P, Option+P on macOS) draws straight lines, continuous arcs and sharp-corner arcs, one undo step per piece; Alt pressed and let go on its own switches the action, C flips the last sharp-corner arc, `[` and `]` change the arc size by 15°, a click on the first point closes the path, a click on an open end continues it, and Escape or Enter ends it (`path.quickPen`), as [Draw with the Quick Pen tool](https://helpx.adobe.com/illustrator/web/add-and-edit-artwork/draw-and-edit-paths/draw-with-quick-pen-tool.html) and [Quick Pen tool keyboard shortcuts](https://helpx.adobe.com/illustrator/web/add-and-edit-artwork/draw-and-edit-paths/quick-pen-tool-keyboard-shortcuts.html) describe. The 180° default arc, its 15° steps, the side an arc bulges to, a dragged piece ending where the press is let go, and C, `[` and `]` changing the arc being dragged are VectorCraft's own rules. Tests: tools `quickpen::tests`, engine `tests::quickpen`, ui-egui `shortcuts::alt_tap::tests`, `alt_p_chooses_the_quick_pen_and_an_alt_tap_switches_its_action` and `brackets_size_the_quick_pen_arc_being_dragged`. Score and hours unchanged. -- **Quick Pen protractor:** while an arc is drawn, by a drag or as the piece the next click adds, the Quick Pen tool shows a protractor around the arc's center: a tick every 15° from the arc's start, a longer one every 90°, and one at its end; the next click's piece shows it only with Enable Rubber Band for the Pen tool on. With Smart Guides on, the end of a continuous arc snaps onto the nearest tick within the snapping tolerance of the pointer when no other Smart Guide snaps the point and neither Snap to Grid nor Snap to Pixel snaps drawn points; Shift does not change it. A continuous arc that starts a path sweeps the arc size and does not snap to a tick, and a hover hides its preview after a snap setting changes until the pointer moves. The protractor, its 15° step and the tick snapping are VectorCraft's own behavior. Tests: tools `the_arc_circle_is_the_circle_the_arc_is_drawn_on`, `a_continuous_arc_end_goes_to_the_nearest_tick`, `a_tick_past_the_coordinate_limit_is_not_used`, `a_continuous_arc_without_a_direction_has_no_tick`, `the_protractor_ticks_lie_across_the_arc`; engine `a_continuous_arc_end_snaps_to_the_protractor`, `a_click_puts_a_continuous_arc_end_on_a_tick`, `a_click_on_a_tick_leaves_no_preview_back_to_the_pointer`, `a_hover_snaps_to_a_tick_only_for_a_continuous_arc`, `a_hover_shows_nothing_after_smart_guides_change`, `a_click_that_adds_nothing_keeps_a_stale_hover_hidden`, `a_hover_is_hovered_again_when_the_art_changes`, `an_arc_drag_shows_the_protractor`, `a_hovered_arc_shows_the_protractor_with_the_rubber_band`. New tests of existing Quick Pen behavior: `a_point_snaps_to_a_smart_guide`, `hovering_shows_the_distance_label`. Score and hours unchanged. +- **Quick Pen protractor:** while an arc is drawn, by a drag or as the piece the next click adds, the Quick Pen tool shows a protractor around the arc's center: a tick every 15° from the arc's start, a longer one every 90°, and one at its end; the next click's piece shows it only with Enable Rubber Band for the Pen tool on. With Smart Guides on, the end of a continuous arc snaps onto the nearest tick within the snapping tolerance of the pointer when no other Smart Guide snaps the point and neither Snap to Grid nor Snap to Pixel snaps drawn points; Shift does not change it. A continuous arc that starts a path sweeps the arc size and does not snap to a tick, Alt tapped during a press moves the piece's end onto or off the tick for the new action, and a hover hides its preview after a snap setting changes until the pointer moves. The protractor, its 15° step and the tick snapping are VectorCraft's own behavior. Tests: tools `the_arc_circle_is_the_circle_the_arc_is_drawn_on`, `a_continuous_arc_end_goes_to_the_nearest_tick`, `a_tick_past_the_coordinate_limit_is_not_used`, `a_continuous_arc_without_a_direction_has_no_tick`, `the_protractor_ticks_lie_across_the_arc`; engine `a_continuous_arc_end_snaps_to_the_protractor`, `a_click_puts_a_continuous_arc_end_on_a_tick`, `an_alt_tap_during_a_press_moves_the_end_for_the_new_action`, `a_click_on_a_tick_leaves_no_preview_back_to_the_pointer`, `a_hover_snaps_to_a_tick_only_for_a_continuous_arc`, `a_hover_shows_nothing_after_smart_guides_change`, `a_click_that_adds_nothing_keeps_a_stale_hover_hidden`, `a_hover_is_hovered_again_when_the_art_changes`, `an_arc_drag_shows_the_protractor`, `a_hovered_arc_shows_the_protractor_with_the_rubber_band`. New tests of existing Quick Pen behavior: `a_point_snaps_to_a_smart_guide`, `hovering_shows_the_distance_label`. Score and hours unchanged. - **Quick Pen arc center:** wherever the Quick Pen tool shows an arc's protractor, it also marks the arc's center with a small cross. The cross is VectorCraft's own behavior. Test: engine `an_arc_shows_a_cross_at_its_center`. Score and hours unchanged. - **Optional compact Tools (#7234):** Window > Toolbars > Compact Tools reduces row and column spacing and the main panel's allocated width in one or two columns, docked or floating. The setting is saved with the UI state and applies to Basic, Advanced and edited main Tools layouts; the selected tool, icon size, footer controls and tool-flyout behavior are retained. Turning it off restores the existing layout, which remains the default. Named custom toolbars and flyout spacing are unchanged. Public regressions in `crates/ui-egui/tests/toolbar_compact.rs` cover the actual toolbar layout against the default control, the command and saved-state roundtrip, tool selection, flyouts, footer controls and short-window reachability. This is an optional layout choice, without a styling-parity or score claim; hours are unchanged.