mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-27 16:59:43 +01:00
Pen: Quick Pen drags move a selected path's anchors and segments, and its context menu deletes
With no path being drawn, the Quick Pen tool edits the selected paths, as the
help page describes ("Drag the anchor points or the path to edit the object",
and right-click Delete to remove a path):
- A drag on an anchor moves it, and a drag that starts on one of several
selected anchors moves them all; a drag on a segment moves its two ends.
The tool selects what it moves (select.anchors or select.segments) and
sends path.moveAnchors with interpolate, one undo step per drag, so a
segment with one moved end is turned and scaled to its new ends: a line
stays a line and an arc an arc of the same angle. A dragged anchor snaps
to Smart Guides. Escape during the drag takes it back.
- A click on an anchor selects it alone, and Shift-click adds it to the
selected anchors or takes it out. A click on an open end still goes on
drawing from it (with the path selected whole again), a drag there moves
the end, and a click on a segment starts a new path.
- With the Quick Pen chosen, the canvas context menu has Delete
(edit.clear), which removes the selected anchors or objects.
The cursor shows what a press does over an anchor, a selected anchor, an
open end or a segment. While a path is being drawn, a press adds a piece as
before. Which presses select and which move, and the drag snapping only an
anchor, are VectorCraft's own rules.
Docs: docs/mcp.md, ROADMAP, docs/target-app-parity.md, docs/ui-parity.md,
crates/tools/src/cursors.toml.
https://helpx.adobe.com/illustrator/web/add-and-edit-artwork/draw-and-edit-paths/draw-with-quick-pen-tool.html
This commit is contained in:
1 parent
e34c9198dd
commit
2d3be0f514
11 files changed
+443
-16
No files matched your search
@@ -149,6 +149,7 @@ Ranked; detail in [docs/roadmap.md](docs/roadmap.md) and [docs/gaps.md](docs/gap
|
||||
- 2026-11-17: Circle Tool Options (double-click the Circle tool): Show Center, Show Radii and Show Diameter switch what the tool shows while a circle is drawn, Color sets the color of the center cross and radius lines, Anchors at Standard Positions off puts the circle's anchors at the points it was drawn through (`shape.circleThroughPoints {anchors: "points"}`), and Third Point by Dragging off draws a three-point circle with three clicks and a two-point circle with a double-click on the second point. A VectorCraft addition: headline numbers unchanged.
|
||||
- 2026-11-19: Quick Pen tool, in the Pen tool's group (Alt+P, Option+P on macOS): clicks or drags add straight lines, continuous arcs or sharp-corner arcs; Alt tapped on its own switches the action, C flips the last arc, `[` and `]` size it, a click on the first point closes the path and a click on an open end continues it (`path.quickPen`, part of #2660). Headline numbers unchanged.
|
||||
- 2026-11-19: Quick Pen toolbar on the canvas while the tool is active: Straight Line, Continuous Arc and Sharp Corner Arc, Flip Arc, and More Options with Hide Toolbar, Pin Toolbar Position and Reset Toolbar Position; it follows the drawing beside the path's last point and its handle drags it (`tool.quickPen.flipArc`, `window.quickPenToolbar`, Window › Quick Pen Toolbar; part of #2660). Headline numbers unchanged.
|
||||
- 2026-11-19: Quick Pen editing: with no path being drawn, a drag on an anchor or a segment of a selected path moves it, a line staying a line and an arc an arc; a click selects an anchor, Shift-click adds one, and the canvas context menu's Delete removes the selected anchors (`path.moveAnchors`, `edit.clear`; #2660). Headline numbers unchanged.
|
||||
- 2026-10-31: Pattern libraries: Window › Swatch Libraries › Patterns and the Swatches panel's library menu open Geometric Patterns, a built-in library of eleven pattern swatches (dots, stripes, checks, a grid and shapes); clicking one adds its pattern and swatch to the document, once, and applies it to the active fill or stroke (`swatch.library.add`).
|
||||
- 2026-11-11: Pattern libraries: Patterns › Grit Textures, a second built-in pattern library, holds eight seamless black textures (Fine Grain, Coarse Grit, Sand, Speckle, Stipple, Scratches, Sparse Flecks and Dense Flecks) on tiles of 18 to 36 pt, each drawn the same way every time; marks that reach past a tile edge continue on the next tile, so the tiles join without a seam (`swatch.library.add`). Scores and estimates unchanged.
|
||||
- 2026-11-11: Pattern libraries: Patterns › Optical Effects, a third built-in pattern library, of VectorCraft's own designs, holds eight black wave, moiré and op-art tiles (Sine Bands, Ripple Lines, Interference Rings, Offset Rings, Warped Checks, Pinched Stripes, Chevron Pulse and Radiating Lenses) of 32 to 48 pt, each drawn the same way every time; each tile is one period of its design, and art that reaches past a tile edge continues on the next tile, so the tiles join without a seam (`swatch.library.add`). Scores and estimates unchanged.
|
||||
|
||||
@@ -562,3 +562,140 @@ fn path_quick_pen_replaces_the_points_after_keep() {
|
||||
let ends: Vec<Point> = only_path(&s).anchors.iter().map(|a| a.p).collect();
|
||||
assert_eq!(ends, [pt(0.0, 0.0), pt(100.0, 0.0), pt(200.0, 0.0)]);
|
||||
}
|
||||
|
||||
/// A selected path drawn with `path.quickPen` from `start` through `pieces`, with the Quick Pen
|
||||
/// chosen and no path being drawn.
|
||||
fn selected_quick_pen_path(s: &mut Session, start: (f64, f64), pieces: Value) -> NodeId {
|
||||
let r = s.execute("path.quickPen", &json!({"start": [start.0, start.1], "pieces": pieces})).unwrap();
|
||||
let id = NodeId(r["id"].as_u64().unwrap());
|
||||
s.execute("select.set", &json!({"ids": [id.0]})).unwrap();
|
||||
quick_pen(s);
|
||||
id
|
||||
}
|
||||
|
||||
fn points(s: &Session) -> Vec<Point> {
|
||||
only_path(s).anchors.iter().map(|a| a.p).collect()
|
||||
}
|
||||
|
||||
fn shift_click(s: &mut Session, x: f64, y: f64) {
|
||||
let v = view();
|
||||
let mods = Mods { shift: true, ..Mods::default() };
|
||||
for kind in [PointerKind::Down, PointerKind::Up] {
|
||||
s.pointer(&PointerEvent { mods, ..PointerEvent::new(kind, x, y) }, v).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
/// Is segment `i` of `sp` a circular arc: do its points a quarter and three quarters along lie on
|
||||
/// the circle through its ends and its middle?
|
||||
fn segment_is_circular(sp: &SubPath, i: usize) -> bool {
|
||||
use vectorcraft_geom::ParamCurve;
|
||||
let seg = sp.segment(i);
|
||||
let (a, b, c) = (seg.eval(0.0), seg.eval(0.5), seg.eval(1.0));
|
||||
let d = 2.0 * (a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y));
|
||||
let sq = |p: Point| p.x * p.x + p.y * p.y;
|
||||
let center = pt(
|
||||
(sq(a) * (b.y - c.y) + sq(b) * (c.y - a.y) + sq(c) * (a.y - b.y)) / d,
|
||||
(sq(a) * (c.x - b.x) + sq(b) * (a.x - c.x) + sq(c) * (b.x - a.x)) / d,
|
||||
);
|
||||
let r = center.distance(a);
|
||||
[0.25, 0.75].iter().all(|&t| (seg.eval(t).distance(center) - r).abs() < r * 1e-3)
|
||||
}
|
||||
|
||||
/// With no path being drawn, a drag on an anchor of the selected path moves that anchor alone, in
|
||||
/// one undo step: at the corner between a line and an arc, the line stays a line and the arc a
|
||||
/// circular arc.
|
||||
#[test]
|
||||
fn a_drag_on_an_anchor_moves_it_and_the_arc_stays_an_arc() {
|
||||
let mut s = session();
|
||||
selected_quick_pen_path(&mut s, (100.0, 100.0), json!([{"x": 200, "y": 100}, {"x": 300, "y": 100, "action": "sharpArc", "turn": 90}]));
|
||||
assert_eq!(points(&s), [pt(100.0, 100.0), pt(200.0, 100.0), pt(300.0, 100.0)]);
|
||||
let undo = undo_steps(&s);
|
||||
press(&mut s, &[(200.0, 100.0), (200.0, 80.0), (200.0, 50.0)]);
|
||||
assert_eq!(undo_steps(&s), undo + 1);
|
||||
let sp = only_path(&s);
|
||||
assert_eq!(sp.anchors.iter().map(|a| a.p).collect::<Vec<_>>(), [pt(100.0, 100.0), pt(200.0, 50.0), pt(300.0, 100.0)]);
|
||||
assert!(sp.segment_is_line(0), "{:?}", sp.anchors);
|
||||
assert!(!sp.segment_is_line(1) && segment_is_circular(&sp, 1), "{:?}", sp.anchors);
|
||||
assert_eq!(paths(&s).len(), 1, "no new path");
|
||||
}
|
||||
|
||||
/// A drag on a segment of the selected path moves that segment's two ends.
|
||||
#[test]
|
||||
fn a_drag_on_a_segment_moves_its_ends() {
|
||||
let mut s = session();
|
||||
selected_quick_pen_path(&mut s, (100.0, 300.0), json!([{"x": 300, "y": 300}, {"x": 300, "y": 400}]));
|
||||
press(&mut s, &[(200.0, 300.0), (200.0, 280.0), (200.0, 250.0)]);
|
||||
assert_eq!(points(&s), [pt(100.0, 250.0), pt(300.0, 250.0), pt(300.0, 400.0)]);
|
||||
assert_eq!(paths(&s).len(), 1);
|
||||
}
|
||||
|
||||
/// A drag that starts on an end of the selected open path moves that end; a click there still
|
||||
/// goes on drawing from it.
|
||||
#[test]
|
||||
fn a_drag_on_an_open_end_moves_it() {
|
||||
let mut s = session();
|
||||
let id = selected_quick_pen_path(&mut s, (100.0, 300.0), json!([{"x": 300, "y": 300}]));
|
||||
press(&mut s, &[(300.0, 300.0), (320.0, 320.0), (350.0, 350.0)]);
|
||||
assert_eq!(points(&s), [pt(100.0, 300.0), pt(350.0, 350.0)]);
|
||||
assert!(s.doc().unwrap().selection.partial(id).is_some(), "the dragged end is selected");
|
||||
click(&mut s, 350.0, 350.0);
|
||||
assert!(s.doc().unwrap().selection.partial(id).is_none(), "drawing goes on with the path selected whole");
|
||||
click(&mut s, 350.0, 450.0);
|
||||
assert_eq!(points(&s), [pt(100.0, 300.0), pt(350.0, 350.0), pt(350.0, 450.0)]);
|
||||
}
|
||||
|
||||
/// A click on an anchor selects it alone, Shift-click adds another, and Delete (`edit.clear`, the
|
||||
/// context menu's Delete) then removes both.
|
||||
#[test]
|
||||
fn clicks_select_anchors_for_delete() {
|
||||
let mut s = session();
|
||||
let id = selected_quick_pen_path(&mut s, (100.0, 100.0), json!([{"x": 200, "y": 100}, {"x": 300, "y": 100}, {"x": 400, "y": 100}]));
|
||||
let undo = undo_steps(&s);
|
||||
click(&mut s, 200.0, 100.0);
|
||||
let picked = |s: &Session| s.doc().unwrap().selection.partial(id).cloned().unwrap_or_default().into_iter().collect::<Vec<_>>();
|
||||
assert_eq!(picked(&s), [(0, 1)]);
|
||||
shift_click(&mut s, 300.0, 100.0);
|
||||
assert_eq!(picked(&s), [(0, 1), (0, 2)]);
|
||||
shift_click(&mut s, 300.0, 100.0);
|
||||
assert_eq!(picked(&s), [(0, 1)], "Shift-click takes it out again");
|
||||
shift_click(&mut s, 300.0, 100.0);
|
||||
assert_eq!(undo_steps(&s), undo, "selecting is no edit");
|
||||
s.execute("edit.clear", &json!({})).unwrap();
|
||||
let left: Vec<Point> = paths(&s).iter().flat_map(|(_, pd)| pd.subpaths.iter().flat_map(|sp| sp.anchors.iter().map(|a| a.p))).collect();
|
||||
assert!(!left.contains(&pt(200.0, 100.0)) && !left.contains(&pt(300.0, 100.0)), "{left:?}");
|
||||
}
|
||||
|
||||
/// Escape during a drag puts the anchor back, and the release then changes nothing.
|
||||
#[test]
|
||||
fn escape_takes_back_an_anchor_drag() {
|
||||
let mut s = session();
|
||||
selected_quick_pen_path(&mut s, (100.0, 100.0), json!([{"x": 200, "y": 100}, {"x": 300, "y": 100}]));
|
||||
let (before, undo) = (points(&s), undo_steps(&s));
|
||||
let v = view();
|
||||
s.pointer(&PointerEvent::new(PointerKind::Down, 200.0, 100.0), v).unwrap();
|
||||
s.pointer(&PointerEvent::new(PointerKind::Drag, 200.0, 150.0), v).unwrap();
|
||||
assert_ne!(points(&s), before, "the drag previews");
|
||||
key(&mut s, ToolKey::Escape);
|
||||
s.pointer(&PointerEvent::new(PointerKind::Up, 200.0, 150.0), v).unwrap();
|
||||
assert_eq!(points(&s), before);
|
||||
assert_eq!(undo_steps(&s), undo);
|
||||
assert_eq!(paths(&s).len(), 1);
|
||||
}
|
||||
|
||||
/// While a path is being drawn, a press on one of its points adds a piece as before; the editing
|
||||
/// starts only after Escape ends the path.
|
||||
#[test]
|
||||
fn a_press_while_drawing_adds_a_piece() {
|
||||
let mut s = session();
|
||||
quick_pen(&mut s);
|
||||
click(&mut s, 100.0, 100.0);
|
||||
click(&mut s, 200.0, 100.0);
|
||||
click(&mut s, 200.0, 200.0);
|
||||
press(&mut s, &[(200.0, 100.0), (220.0, 90.0), (250.0, 80.0)]);
|
||||
assert_eq!(points(&s).len(), 4, "a piece added");
|
||||
key(&mut s, ToolKey::Escape);
|
||||
press(&mut s, &[(200.0, 100.0), (200.0, 70.0), (200.0, 50.0)]);
|
||||
let got = points(&s);
|
||||
assert_eq!(got.len(), 4);
|
||||
assert!(got[1].distance(pt(200.0, 50.0)) < 1e-9, "{got:?}");
|
||||
}
|
||||
@@ -47,14 +47,20 @@ look = "The same pointer as Arrow, hollow: white with a dark outline."
|
||||
[[cursor]]
|
||||
id = "DirectAnchor"
|
||||
group = "Selection"
|
||||
shown_when = ["Direct Selection over an anchor of a path that isn't selected."]
|
||||
shown_when = [
|
||||
"Direct Selection over an anchor of a path that isn't selected.",
|
||||
"The Quick Pen, with no path being drawn, over an anchor of a selected path that is not itself selected (a click selects it, a drag moves it).",
|
||||
]
|
||||
hotspot = "The arrow's tip."
|
||||
look = "ArrowHollow with a small hollow square badge (an unselected anchor)."
|
||||
|
||||
[[cursor]]
|
||||
id = "DirectAnchorSelected"
|
||||
group = "Selection"
|
||||
shown_when = ["Direct Selection over an anchor of a selected path."]
|
||||
shown_when = [
|
||||
"Direct Selection over an anchor of a selected path.",
|
||||
"The Quick Pen, with no path being drawn, over a selected anchor.",
|
||||
]
|
||||
hotspot = "The arrow's tip."
|
||||
look = "ArrowHollow with a small filled square badge (a selected anchor)."
|
||||
|
||||
@@ -137,6 +143,7 @@ shown_when = [
|
||||
"The Gradient tool over the annotator's handles and during most gradient drags.",
|
||||
"The Perspective Grid and Perspective Selection over plane widgets and handles.",
|
||||
"Selection and Objects on Path over an Objects on Path group's Move All widget, and while dragging it.",
|
||||
"The Quick Pen, with no path being drawn, over a segment of a selected path, and while a drag moves an anchor or a segment.",
|
||||
]
|
||||
hotspot = "The centre."
|
||||
look = "A four-way move cursor."
|
||||
@@ -242,6 +249,7 @@ group = "Pen"
|
||||
shown_when = [
|
||||
"The Pen (not drawing) over an end of an open path (a click continues it).",
|
||||
"The Curvature tool over an open end.",
|
||||
"The Quick Pen (not drawing) over an end of an open path (a click continues it, a drag on a selected path's end moves it).",
|
||||
]
|
||||
hotspot = "The nib's tip."
|
||||
look = "The Pen nib with a slash badge."
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
//! point closes the path, a click on an end of an open path goes on drawing from it, and Escape
|
||||
//! or Enter ends the path. The path's points show as circles, without handles, and a preview
|
||||
//! shows the piece the next click adds. Points snap to Smart Guides. Each piece is one undo step.
|
||||
//! While no path is being drawn, the tool edits the selected paths ([`edit`]).
|
||||
|
||||
mod edit;
|
||||
|
||||
use std::f64::consts::{FRAC_PI_2, PI};
|
||||
use std::sync::Arc;
|
||||
@@ -24,6 +27,7 @@ use crate::draw2::FEEDBACK;
|
||||
use crate::guides::{DrawSnap, Leave};
|
||||
use crate::pen::{continue_from, open_end_at};
|
||||
use crate::{Action, Cursor, Mods, Overlay, PointerEvent, PointerKind, Tool, ToolContext, ToolKey};
|
||||
use edit::{Edit, Grab};
|
||||
|
||||
/// The tool's id.
|
||||
pub const ID: &str = "quickPen";
|
||||
@@ -282,13 +286,15 @@ pub struct QuickPenTool {
|
||||
turn: f64,
|
||||
drawing: Option<Drawing>,
|
||||
press: Option<Press>,
|
||||
/// A press on an anchor or a segment of a selected path while no path is being drawn.
|
||||
edit: Option<Edit>,
|
||||
hover: Option<Point>,
|
||||
snap: DrawSnap,
|
||||
}
|
||||
|
||||
impl Default for QuickPenTool {
|
||||
fn default() -> Self {
|
||||
Self { action: Stroke::Line, turn: DEFAULT_TURN, drawing: None, press: None, hover: None, snap: DrawSnap::default() }
|
||||
Self { action: Stroke::Line, turn: DEFAULT_TURN, drawing: None, press: None, edit: None, hover: None, snap: DrawSnap::default() }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -409,8 +415,9 @@ impl QuickPenTool {
|
||||
}
|
||||
|
||||
/// What a press draws: a piece on the path being drawn, its closing piece, or a new path (from
|
||||
/// an end of an open path, the path goes on).
|
||||
fn press_down(&mut self, cx: &ToolContext, p: Point) -> Vec<Action> {
|
||||
/// an end of an open path, the path goes on). With no path being drawn, a press on an anchor
|
||||
/// or a segment of a selected path waits to see whether it drags ([`edit`]).
|
||||
fn press_down(&mut self, cx: &ToolContext, p: Point, shift: bool) -> Vec<Action> {
|
||||
if self.drawing.is_some() && self.active(cx).is_none() {
|
||||
self.drawing = None;
|
||||
}
|
||||
@@ -442,30 +449,75 @@ impl QuickPenTool {
|
||||
self.press = Some(Press { at: p, dragged: false, begun: true });
|
||||
return vec![Action::Begin("Quick Pen".into()), Action::Preview(COMMAND.into(), self.params(false)), drawn()];
|
||||
}
|
||||
if let Some(grab) = edit::grab_at(cx, p, tol) {
|
||||
self.edit = Some(Edit::new(grab, p, shift));
|
||||
return vec![];
|
||||
}
|
||||
if let Some((id, si, at_first)) = open_end_at(cx, p, tol, None)
|
||||
&& cx.doc.is_editable(id)
|
||||
{
|
||||
// From its start, `continue_from` reverses the path first; the tool then sees it.
|
||||
self.drawing = Some(Drawing { id: Some(id), si, ..Drawing::default() });
|
||||
let mut out = continue_from(cx, id, si, at_first);
|
||||
out.push(drawn());
|
||||
return out;
|
||||
return self.continue_path(cx, id, si, at_first);
|
||||
}
|
||||
self.start_path(cx, p)
|
||||
}
|
||||
|
||||
/// Goes on drawing from an end of subpath `si` of path `id`.
|
||||
fn continue_path(&mut self, cx: &ToolContext, id: NodeId, si: usize, at_first: bool) -> Vec<Action> {
|
||||
// From its start, `continue_from` reverses the path first; the tool then sees it.
|
||||
self.drawing = Some(Drawing { id: Some(id), si, ..Drawing::default() });
|
||||
let mut out = vec![];
|
||||
// Anchors selected by an earlier click or drag: the path is selected whole again.
|
||||
if !cx.selection.anchors.is_empty() || !cx.selection.segments.is_empty() {
|
||||
let top = cx.doc.parent_of(id).filter(|p| cx.doc.node(*p).is_some_and(|n| matches!(n.kind, NodeKind::Compound { .. }))).unwrap_or(id);
|
||||
out.push(Action::Exec("select.set".into(), json!({"ids": [top.0]})));
|
||||
}
|
||||
out.extend(continue_from(cx, id, si, at_first));
|
||||
out.push(drawn());
|
||||
out
|
||||
}
|
||||
|
||||
/// Starts a new path at `p`.
|
||||
fn start_path(&mut self, cx: &ToolContext, p: Point) -> Vec<Action> {
|
||||
let q = self.snap.press(cx, p, &[], None);
|
||||
self.drawing = Some(Drawing { start: Some(q), ..Drawing::default() });
|
||||
vec![Action::Exec(COMMAND.into(), self.params(false)), Action::Notify("created".into())]
|
||||
}
|
||||
|
||||
/// Ends the path being drawn; a press that added a piece is taken back.
|
||||
/// Ends the path being drawn; a press that added a piece, or moved part of a path, is taken
|
||||
/// back.
|
||||
fn end(&mut self) -> Vec<Action> {
|
||||
self.drawing = None;
|
||||
self.snap.clear();
|
||||
let moved = self.edit.take().is_some_and(|e| e.began);
|
||||
match self.press.take() {
|
||||
Some(pr) if pr.begun => vec![Action::Cancel],
|
||||
_ if moved => vec![Action::Cancel],
|
||||
_ => vec![],
|
||||
}
|
||||
}
|
||||
|
||||
/// The release of a press on an anchor or a segment of a selected path: a drag moves what it
|
||||
/// holds to `p` and ends its undo step. A click on an end of an open path goes on drawing from
|
||||
/// it, a click on another anchor selects it alone (with Shift, adds it to the selected anchors
|
||||
/// or takes it out), and a click on a segment starts a new path there.
|
||||
fn release_edit(&mut self, cx: &ToolContext, mut e: Edit, p: Point) -> Vec<Action> {
|
||||
if e.began {
|
||||
let mut out = e.drag(cx, p);
|
||||
out.push(Action::Commit);
|
||||
return out;
|
||||
}
|
||||
match e.grab {
|
||||
Grab::Anchor { id, si, ai, .. } if e.shift => {
|
||||
vec![Action::Exec("select.anchors".into(), json!({"id": id.0, "anchors": [[si, ai]], "mode": "toggle"}))]
|
||||
}
|
||||
Grab::Anchor { id, si, ai, end: true, .. } => self.continue_path(cx, id, si, ai == 0),
|
||||
Grab::Anchor { id, si, ai, .. } => {
|
||||
vec![Action::Exec("select.anchors".into(), json!({"id": id.0, "anchors": [[si, ai]], "mode": "set"}))]
|
||||
}
|
||||
Grab::Segment { .. } => self.start_path(cx, e.start),
|
||||
}
|
||||
}
|
||||
|
||||
/// The piece the next click adds, from the end of `sp` to `h`, as a path to preview.
|
||||
fn rubber_band(&self, sp: &SubPath, h: Point) -> Option<BezPath> {
|
||||
let n = sp.anchors.len();
|
||||
@@ -490,7 +542,7 @@ impl Tool for QuickPenTool {
|
||||
}
|
||||
|
||||
fn busy(&self) -> bool {
|
||||
self.press.is_some()
|
||||
self.press.is_some() || self.edit.is_some()
|
||||
}
|
||||
|
||||
fn pointer(&mut self, cx: &ToolContext, ev: &PointerEvent) -> Vec<Action> {
|
||||
@@ -502,12 +554,18 @@ impl Tool for QuickPenTool {
|
||||
vec![]
|
||||
}
|
||||
PointerKind::Down => {
|
||||
if self.press.is_some() {
|
||||
if self.press.is_some() || self.edit.is_some() {
|
||||
return vec![];
|
||||
}
|
||||
self.press_down(cx, p)
|
||||
self.press_down(cx, p, ev.mods.shift)
|
||||
}
|
||||
PointerKind::Drag => {
|
||||
if let Some(e) = self.edit.as_mut() {
|
||||
if !e.began && p.distance(e.start) < cx.tol(DRAG_PX) {
|
||||
return vec![];
|
||||
}
|
||||
return e.drag(cx, p);
|
||||
}
|
||||
let Some(mut pr) = self.press else { return vec![] };
|
||||
if !pr.dragged && p.distance(pr.at) < cx.tol(DRAG_PX) {
|
||||
return vec![];
|
||||
@@ -520,6 +578,9 @@ impl Tool for QuickPenTool {
|
||||
self.drag_to(cx, p)
|
||||
}
|
||||
PointerKind::Up => {
|
||||
if let Some(e) = self.edit.take() {
|
||||
return self.release_edit(cx, e, p);
|
||||
}
|
||||
let out = match self.press {
|
||||
// The piece ends where the press is let go, also past the last drag.
|
||||
Some(pr) if pr.begun => {
|
||||
@@ -595,6 +656,8 @@ impl Tool for QuickPenTool {
|
||||
/// The drawing goes on only when the path is back as it was before the press.
|
||||
fn drop_press(&mut self, cx: &ToolContext) -> Vec<Action> {
|
||||
self.snap.clear();
|
||||
// The session takes back what an edit moved; the release that follows does nothing.
|
||||
self.edit = None;
|
||||
if self.press.take().is_some_and(|pr| pr.begun)
|
||||
&& let Some(dr) = self.drawing.as_mut()
|
||||
{
|
||||
@@ -655,8 +718,10 @@ impl Tool for QuickPenTool {
|
||||
fn deactivate(&mut self, _cx: &ToolContext) -> Vec<Action> {
|
||||
self.drawing = None;
|
||||
self.snap.clear();
|
||||
let moved = self.edit.take().is_some_and(|e| e.began);
|
||||
match self.press.take() {
|
||||
Some(pr) if pr.begun => vec![Action::Commit],
|
||||
_ if moved => vec![Action::Commit],
|
||||
_ => vec![],
|
||||
}
|
||||
}
|
||||
@@ -674,6 +739,9 @@ impl Tool for QuickPenTool {
|
||||
|
||||
fn overlays(&self, cx: &ToolContext) -> Vec<Overlay> {
|
||||
let mut o = self.snap.guides().to_vec();
|
||||
if let Some(e) = &self.edit {
|
||||
o.extend(e.guides.iter().cloned());
|
||||
}
|
||||
let Some((id, sp)) = self.active(cx) else { return o };
|
||||
if self.press.is_none()
|
||||
&& let Some(h) = self.hover
|
||||
@@ -703,6 +771,12 @@ impl Tool for QuickPenTool {
|
||||
let close = sp.anchors.len() >= 2 && sp.anchors.first().is_some_and(|f| f.p.distance(p) <= tol);
|
||||
return if close { Cursor::PenClose } else { Cursor::PenDrawing };
|
||||
}
|
||||
if let Some(e) = &self.edit {
|
||||
return if e.began { Cursor::Move } else { edit::cursor(cx, e.grab) };
|
||||
}
|
||||
if let Some(grab) = edit::grab_at(cx, p, tol) {
|
||||
return edit::cursor(cx, grab);
|
||||
}
|
||||
if open_end_at(cx, p, tol, None).is_some() { Cursor::PenContinue } else { Cursor::Pen }
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
//! Editing with the Quick Pen while no path is being drawn: a drag on an anchor of a selected path
|
||||
//! moves it, and a drag on one of its segments moves that segment (`path.moveAnchors` with
|
||||
//! `interpolate`: a segment with one moved end is turned and scaled to its new ends, so a line
|
||||
//! stays a line and an arc stays an arc of the same angle; at a smooth point, where two arcs join,
|
||||
//! the handles stay in line and the arcs bend to meet). The moved anchor snaps as a Direct
|
||||
//! Selection drag's does. A click on an anchor selects it, Shift-click adds it to the selected anchors or takes it
|
||||
//! out, and the canvas context menu's Delete then removes them (`edit.clear`). A click on an end
|
||||
//! of an open path goes on drawing from it, as before.
|
||||
|
||||
use std::collections::BTreeSet;
|
||||
|
||||
use serde_json::json;
|
||||
use vectorcraft_doc::{AnchorRef, NodeId, Selection};
|
||||
use vectorcraft_geom::Point;
|
||||
|
||||
use crate::draw2::{anchor_in, segment_in, shown_paths};
|
||||
use crate::guides::{PointSnap, Targets};
|
||||
use crate::{Action, Cursor, Overlay, ToolContext};
|
||||
|
||||
/// What a press holds.
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub(super) enum Grab {
|
||||
/// Anchor `ai` of subpath `si` of path `id`, at `at`; `end` when it is an end of an open subpath.
|
||||
Anchor { id: NodeId, si: usize, ai: usize, at: Point, end: bool },
|
||||
/// The segment from anchor `seg` of subpath `si` of path `id` to the next one.
|
||||
Segment { id: NodeId, si: usize, seg: usize },
|
||||
}
|
||||
|
||||
impl Grab {
|
||||
/// The path the grab is on.
|
||||
pub(super) fn id(self) -> NodeId {
|
||||
match self {
|
||||
Grab::Anchor { id, .. } | Grab::Segment { id, .. } => id,
|
||||
}
|
||||
}
|
||||
|
||||
/// The anchors the drag moves when they are not already selected: the anchor, or the
|
||||
/// segment's two ends.
|
||||
fn anchors(self, cx: &ToolContext) -> Option<Vec<AnchorRef>> {
|
||||
match self {
|
||||
Grab::Anchor { si, ai, .. } => Some(vec![(si, ai)]),
|
||||
Grab::Segment { id, si, seg } => {
|
||||
let n = cx.doc.node(id)?.path_data()?.subpaths.get(si)?.anchors.len();
|
||||
Some(vec![(si, seg), (si, (seg + 1).checked_rem(n)?)])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// An anchor or a segment of a selected path under `p`, within the tool's point tolerance `tol`.
|
||||
/// Anchors come before segments.
|
||||
pub(super) fn grab_at(cx: &ToolContext, p: Point, tol: f64) -> Option<Grab> {
|
||||
let shown = shown_paths(cx);
|
||||
if let Some((id, si, ai)) = anchor_in(cx, shown.iter().copied(), p, tol) {
|
||||
let sp = cx.doc.node(id)?.path_data()?.subpaths.get(si)?;
|
||||
let at = sp.anchors.get(ai)?.p;
|
||||
let end = !sp.closed && (ai == 0 || ai + 1 == sp.anchors.len());
|
||||
return Some(Grab::Anchor { id, si, ai, at, end });
|
||||
}
|
||||
segment_in(cx, shown, p, tol).map(|(id, si, seg, _)| Grab::Segment { id, si, seg })
|
||||
}
|
||||
|
||||
/// The cursor over `grab`: an open end shows that a click goes on drawing from it, another anchor
|
||||
/// that it can be selected and moved, and a segment that it moves.
|
||||
pub(super) fn cursor(cx: &ToolContext, grab: Grab) -> Cursor {
|
||||
match grab {
|
||||
Grab::Anchor { end: true, .. } => Cursor::PenContinue,
|
||||
Grab::Anchor { id, si, ai, .. } if cx.selection.partial(id).is_some_and(|s| s.contains(&(si, ai))) => Cursor::DirectAnchorSelected,
|
||||
Grab::Anchor { .. } => Cursor::DirectAnchor,
|
||||
Grab::Segment { .. } => Cursor::Move,
|
||||
}
|
||||
}
|
||||
|
||||
/// A press on an anchor or a segment of a selected path, while no path is being drawn.
|
||||
pub(super) struct Edit {
|
||||
pub(super) grab: Grab,
|
||||
/// Where the press went down.
|
||||
pub(super) start: Point,
|
||||
pub(super) shift: bool,
|
||||
/// Whether the press has dragged far enough to move what it holds (an undo step began).
|
||||
pub(super) began: bool,
|
||||
snap: Option<PointSnap>,
|
||||
pub(super) guides: Vec<Overlay>,
|
||||
}
|
||||
|
||||
impl Edit {
|
||||
pub(super) fn new(grab: Grab, start: Point, shift: bool) -> Self {
|
||||
Self { grab, start, shift, began: false, snap: None, guides: vec![] }
|
||||
}
|
||||
|
||||
/// Moves what the press holds by the drag to `p`. The first move selects the anchor, or the
|
||||
/// segment, unless it is already selected, and begins the undo step; a drag that starts on
|
||||
/// one of several selected anchors moves them all.
|
||||
pub(super) fn drag(&mut self, cx: &ToolContext, p: Point) -> Vec<Action> {
|
||||
let mut out = vec![];
|
||||
if !self.began {
|
||||
let id = self.grab.id();
|
||||
let Some(picked) = self.grab.anchors(cx) else { return out };
|
||||
let already = cx.selection.partial(id).is_some_and(|s| picked.iter().all(|a| s.contains(a)));
|
||||
let moving = if already {
|
||||
cx.selection.clone()
|
||||
} else {
|
||||
out.push(match self.grab {
|
||||
Grab::Anchor { si, ai, .. } => Action::Exec("select.anchors".into(), json!({"id": id.0, "anchors": [[si, ai]], "mode": "set"})),
|
||||
Grab::Segment { si, seg, .. } => {
|
||||
Action::Exec("select.segments".into(), json!({"id": id.0, "segments": [[si, seg]], "mode": "set"}))
|
||||
}
|
||||
});
|
||||
let mut sel = Selection { objects: vec![id], ..Selection::default() };
|
||||
sel.anchors.insert(id, picked.into_iter().collect::<BTreeSet<_>>());
|
||||
sel
|
||||
};
|
||||
out.push(Action::Begin("Move".into()));
|
||||
// A held anchor snaps; the anchors and segments that stay put are targets too.
|
||||
if matches!(self.grab, Grab::Anchor { .. }) {
|
||||
self.snap = Some(PointSnap::moving(cx, || Targets::for_anchor_drag(cx.doc, &moving)));
|
||||
}
|
||||
self.began = true;
|
||||
}
|
||||
let d = match (self.grab, &self.snap) {
|
||||
(Grab::Anchor { at, .. }, Some(snap)) => {
|
||||
let (q, guides) = snap.snap_from(cx, at + (p - self.start), None);
|
||||
self.guides = guides;
|
||||
q - at
|
||||
}
|
||||
_ => p - self.start,
|
||||
};
|
||||
if !d.x.is_finite() || !d.y.is_finite() {
|
||||
return out;
|
||||
}
|
||||
out.push(Action::Preview("path.moveAnchors".into(), json!({"dx": d.x, "dy": d.y, "interpolate": true})));
|
||||
out
|
||||
}
|
||||
}
|
||||
@@ -196,6 +196,34 @@ fn the_first_click_starts_a_path() {
|
||||
assert_eq!(t.cursor(&cx, pt(400.0, 400.0), Mods::default()), Cursor::Pen);
|
||||
}
|
||||
|
||||
/// With no path being drawn, the cursor over a selected path shows what a press there does: an
|
||||
/// anchor is selected and moved, a selected anchor shows as one, and a segment moves. A press there
|
||||
/// waits for a drag or a release instead of starting a path.
|
||||
#[test]
|
||||
fn a_selected_paths_anchors_and_segments_show_the_edit_cursors() {
|
||||
let (d, id) = doc_with_rect();
|
||||
let mut s = Selection::default();
|
||||
s.set([id]);
|
||||
let p = paint();
|
||||
let cx = cx(&d, &s, &p);
|
||||
let mut t = QuickPenTool::default();
|
||||
assert_eq!(t.cursor(&cx, pt(100.0, 100.0), Mods::default()), Cursor::DirectAnchor);
|
||||
assert_eq!(t.cursor(&cx, pt(150.0, 100.0), Mods::default()), Cursor::Move);
|
||||
assert_eq!(t.cursor(&cx, pt(400.0, 400.0), Mods::default()), Cursor::Pen);
|
||||
assert!(t.pointer(&cx, &PointerEvent::new(PointerKind::Down, 150.0, 100.0)).is_empty());
|
||||
assert!(t.busy());
|
||||
let a = t.pointer(&cx, &PointerEvent::new(PointerKind::Drag, 150.0, 130.0));
|
||||
assert!(matches!(&a[0], Action::Exec(c, v) if c == "select.segments" && v["mode"] == "set"), "{a:?}");
|
||||
assert!(matches!(&a[2], Action::Preview(c, v) if c == "path.moveAnchors" && v["dy"] == 30.0 && v["interpolate"] == true), "{a:?}");
|
||||
assert_eq!(t.cursor(&cx, pt(150.0, 130.0), Mods::default()), Cursor::Move);
|
||||
let up = t.pointer(&cx, &PointerEvent::new(PointerKind::Up, 150.0, 130.0));
|
||||
assert_eq!(up.last(), Some(&Action::Commit));
|
||||
assert!(!t.busy());
|
||||
s.anchors.insert(id, (0..4).map(|ai| (0, ai)).collect());
|
||||
let cx = crate::testutil::cx(&d, &s, &p);
|
||||
assert_eq!(t.cursor(&cx, pt(100.0, 100.0), Mods::default()), Cursor::DirectAnchorSelected);
|
||||
}
|
||||
|
||||
/// The rubber band previews exactly the piece a click adds.
|
||||
#[test]
|
||||
fn the_rubber_band_is_the_next_piece() {
|
||||
|
||||
@@ -54,7 +54,15 @@ pub fn context_items(app: &VectorcraftApp) -> Vec<Item> {
|
||||
c("Select All", "select.all"),
|
||||
]);
|
||||
} else {
|
||||
v.extend([c("Cut", "edit.cut"), c("Copy", "edit.copy"), c("Paste", "edit.paste"), Sep]);
|
||||
v.extend([c("Cut", "edit.cut"), c("Copy", "edit.copy"), c("Paste", "edit.paste")]);
|
||||
// With the Quick Pen, Delete removes the selected anchor points, or the selected objects
|
||||
// (`edit.clear`), as the public
|
||||
// [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)
|
||||
// page describes for removing a path.
|
||||
if app.session.tool_id() == vectorcraft_tools::quickpen::ID {
|
||||
v.push(c("Delete", "edit.clear"));
|
||||
}
|
||||
v.push(Sep);
|
||||
// With one group or compound path selected the menu has Isolate Selected Group, and with
|
||||
// one path selected (a member of a group or a compound path too) it has Isolate Selected
|
||||
// Path, as the help page
|
||||
|
||||
@@ -214,6 +214,27 @@ fn labels(items: &[Item]) -> Vec<&'static str> {
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// With the Quick Pen, the menu has Delete, which removes the selected anchor points; with another
|
||||
/// tool it does not.
|
||||
#[test]
|
||||
fn the_quick_pen_menu_deletes_the_selected_anchors() {
|
||||
let mut app = app();
|
||||
let a = rect(&mut app, 0.0, 0.0);
|
||||
app.run("select.anchors", json!({"id": a.0, "anchors": [[0, 0]], "mode": "set"})).unwrap();
|
||||
assert!(!labels(&menus::context_items(&app)).contains(&"Delete"), "the Selection tool");
|
||||
app.select_tool("quickPen");
|
||||
let items = menus::context_items(&app);
|
||||
assert!(labels(&items).contains(&"Delete"), "{:?}", labels(&items));
|
||||
assert!(items.iter().any(|it| matches!(it, Item::Cmd("Delete", "edit.clear", _))));
|
||||
menus::invoke(&mut app, "edit.clear", json!({}));
|
||||
let st = app.session.active().unwrap();
|
||||
let pd = st.doc.node(a).unwrap().path_data().unwrap().clone();
|
||||
assert_eq!(pd.subpaths[0].anchors.len(), 3, "one anchor removed");
|
||||
// Nothing selected: no Delete.
|
||||
app.run("select.none", json!({})).unwrap();
|
||||
assert!(!labels(&menus::context_items(&app)).contains(&"Delete"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_menu_follows_the_selection() {
|
||||
let mut app = app();
|
||||
|
||||
+15
@@ -7339,6 +7339,21 @@ toolbar its controls wrap onto more rows. `ui.inspect` gives `quickPenToolbar` (
|
||||
the pin and whether it shows are not saved. These commands run in the desktop app; the headless host does not run them,
|
||||
so they need `--connect`.
|
||||
|
||||
With no path being drawn (after Escape or Enter, or before the first click), the tool edits the selected paths, 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)
|
||||
describes. A drag on one of their anchors moves that anchor, and a drag that starts on one of several selected anchors
|
||||
moves them all; a drag on a segment moves that segment's two ends. The tool selects what it moves
|
||||
(`select.anchors` or `select.segments` with `mode: "set"`) and moves it with `path.moveAnchors {dx, dy, interpolate:
|
||||
true}`, one undo step per drag: a segment with one moved end is turned and scaled to its new ends, so a line stays a
|
||||
line and an arc stays an arc through the same angle, and at a smooth point the handles stay in line. A dragged anchor
|
||||
snaps to Smart Guides; a dragged segment does not. Escape during the drag takes it back. A click on an anchor selects
|
||||
it alone and Shift-click adds it to the selected anchors or takes it out (`select.anchors` with `"set"` or
|
||||
`"toggle"`). A click on an end of an open path still goes on drawing from it, a drag there moves the end, and a click
|
||||
on a segment starts a new path. With the Quick Pen chosen, the canvas context menu (right-click) has Delete, which
|
||||
removes the selected anchors, or the selected objects (`edit.clear {}`). While a path is being drawn, a press on it
|
||||
adds a piece as before. Which presses select, which move, and the drag snapping only an anchor are VectorCraft's own
|
||||
rules.
|
||||
|
||||
`path.quickPen {start?: [x, y], id?, subpath?, keep?, pieces?, closed?}` draws such a path and selects it, as one
|
||||
undo step, and answers `{id}`. With `start`, it makes a new path with the current paint (a black stroke when the paint
|
||||
has neither fill nor stroke). With `id`, it draws on the open subpath `subpath` (0 when left out) of that path: its
|
||||
|
||||
@@ -634,6 +634,7 @@ since 2026-10-01.
|
||||
- **Trim View hides guides and the grid (#8363):** while View › Trim View is on, the canvas and tiled panes draw no ruler guides, no guide paths and no grid, the guides are neither snapped to nor picked, and Show/Hide Guides and Show/Hide Grid are greyed out (menu bar, canvas context menu, Properties) and refuse to run; the stored choices come back when it is turned off, and the rulers stay ([trim view hides guides](https://community.adobe.com/t5/illustrator-discussions/trim-view-hides-guides/td-p/14066140), [guides greyed out](https://community.adobe.com/t5/illustrator-discussions/guides-greyed-out/m-p/11132728)). A drag or double-click on a ruler makes no guide while it is on (no preview, no undo step, a status message). `trim_view_hides_the_guides_and_the_grid`, `trim_view_deselects_selected_guide_paths`, `trim_view_makes_no_guide_from_the_rulers` in `crates/ui-egui/src/canvas/tests.rs`; `trim_view_greys_out_show_guides_and_show_grid` in `crates/ui-egui/src/menus/tests.rs`.
|
||||
|
||||
- **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 editing (#2660):** with no path being drawn, the Quick Pen tool moves an anchor or a segment of a selected path by a drag (`path.moveAnchors` with `interpolate`, one undo step, a line staying a line and an arc an arc), selects an anchor with a click and adds one with Shift-click, and the canvas context menu's Delete removes the selected anchors (`edit.clear`), 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) describes. Which presses select and which move, and the drag snapping only an anchor, are VectorCraft's own rules. Tests: tools `quickpen::tests::a_selected_paths_anchors_and_segments_show_the_edit_cursors`, engine `tests::quickpen` (`a_drag_on_an_anchor_moves_it_and_the_arc_stays_an_arc`, `a_drag_on_a_segment_moves_its_ends`, `a_drag_on_an_open_end_moves_it`, `clicks_select_anchors_for_delete`, `escape_takes_back_an_anchor_drag`, `a_press_while_drawing_adds_a_piece`), ui-egui `tests::contextmenu::the_quick_pen_menu_deletes_the_selected_anchors`. 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.
|
||||
|
||||
- **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.
|
||||
|
||||
+1
-1
@@ -205,7 +205,7 @@ tools, never checked side by side) isn't captured row by row.
|
||||
| Busy cursor during long operations | done | Background open, save and export show the system progress cursor (gap G1) |
|
||||
| Each anchor snaps to Smart Guides and construction angles | done | `DrawSnap` |
|
||||
| Curvature tool: click/drag points, double-click or Alt-click for a corner, temporary Direct Selection, point conversion | partial | circular point markers without direction handles or duplicate markers, Anchor Size and Hide Edges regression-tested (#1236, in part); curve geometry: each stretch of three points follows the circle through them (handles along its tangent, chord/(3·cos²(α/2)) long, shorter in a turn tighter than 30°), open ends curving in, the same rule for the rubber band, dragged, inserted and converted points (#1236, in part); neighbours of a point dragged on an existing path keep their tangents, and modifiers requested in #975 remain |
|
||||
| Quick Pen tool: straight lines, continuous arcs and sharp-corner arcs, Alt/Option to switch action, C to flip an arc, `[` / `]` for its size, Alt+P / Option+P, close on the first point, continue from an end, Escape to end ([help page](https://helpx.adobe.com/illustrator/web/add-and-edit-artwork/draw-and-edit-paths/draw-with-quick-pen-tool.html), [shortcuts](https://helpx.adobe.com/illustrator/web/add-and-edit-artwork/draw-and-edit-paths/quick-pen-tool-keyboard-shortcuts.html)) | partial | `path.quickPen` and the tool in `crates/tools/src/quickpen.rs`, in the Pen tool's group (#2660); the on-canvas toolbar with its actions, Flip Arc and its More menu (Hide Toolbar and Reset Toolbar Position, and VectorCraft's own Pin Toolbar Position) in `crates/ui-egui/src/canvas/quick_pen_bar.rs`. Not yet: dragging a path's ends to change a line's or arc's length, Ctrl+scroll for the arc size, and editing and deleting with the tool |
|
||||
| Quick Pen tool: straight lines, continuous arcs and sharp-corner arcs, Alt/Option to switch action, C to flip an arc, `[` / `]` for its size, Alt+P / Option+P, close on the first point, continue from an end, Escape to end, drag anchors or segments to edit, right-click Delete ([help page](https://helpx.adobe.com/illustrator/web/add-and-edit-artwork/draw-and-edit-paths/draw-with-quick-pen-tool.html), [shortcuts](https://helpx.adobe.com/illustrator/web/add-and-edit-artwork/draw-and-edit-paths/quick-pen-tool-keyboard-shortcuts.html)) | partial | `path.quickPen` and the tool in `crates/tools/src/quickpen.rs`, in the Pen tool's group (#2660); the on-canvas toolbar with its actions, Flip Arc and its More menu (Hide Toolbar and Reset Toolbar Position, and VectorCraft's own Pin Toolbar Position) in `crates/ui-egui/src/canvas/quick_pen_bar.rs`; with no path being drawn, drags on a selected path's anchors and segments move them (`quickpen/edit.rs`, `path.moveAnchors`), clicks select anchors, and the canvas context menu has Delete (`edit.clear`). Not yet: dragging a path's ends to change a line's or arc's length, and Ctrl+scroll for the arc size |
|
||||
| Icon-strip flyout resizing (#5713) | done | Canvas-side edge and bottom; user size persists after reopening and workspace restore; Glyphs and Artboards pointer/cursor regression |
|
||||
| Icon-strip flyout resizing from the top (storytold/craft-libs#1094) | done | Top edge (a 4 pt band over the tab strip) and the canvas-side top corner; the bottom and the icon-column edge stay; the moved top persists after reopening and workspace restore; `an_icon_flyout_grows_upward_from_its_top_edge_and_free_corner` |
|
||||
| Graphic Styles list fills a taller panel (#2992) | done | Docked, floating or in a resized flyout, the list takes the height above the panel's footer, as the Artboards list does; outside a sized panel it stays 220 pt; `the_list_fills_a_tall_panel_above_its_footer` |
|
||||
|
||||
Reference in new issue
Block a user