mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-18 08:53:33 +00:00
Merge pull request #8250 from dotCooCoo/feat/pen-chosen-again-ends-path
Pen: choosing the Pen again while a path is being drawn ends that path, as Escape does
This commit is contained in:
@@ -120,8 +120,9 @@ fn a_blend_and_an_object_make_one_blend_with_more_keys() {
|
||||
}
|
||||
|
||||
/// Choosing the Blend tool again (its button, W, `tool.select`) finishes the blend: the first
|
||||
/// pick and the chain are dropped, and the document and the selection stay. Choosing another
|
||||
/// tool again keeps its work: the Pen's open path stays open.
|
||||
/// pick and the chain are dropped, and the document and the selection stay. The Pen chosen again
|
||||
/// ends the path it is drawing, as Escape does: the path stays open and the next click starts a
|
||||
/// new one.
|
||||
#[test]
|
||||
fn choosing_the_blend_tool_again_finishes_the_blend() {
|
||||
let mut s = session();
|
||||
@@ -148,7 +149,7 @@ fn choosing_the_blend_tool_again_finishes_the_blend() {
|
||||
click(&mut s, 20.0, 20.0);
|
||||
assert_eq!(s.doc().unwrap().selection.objects, vec![a]);
|
||||
assert_eq!(spec(&s, g).0, vec![b, c], "a was not added");
|
||||
// The Pen chosen again goes on drawing its open path.
|
||||
// The Pen chosen again ends its open path; the next click starts a new one.
|
||||
s.select_tool("pen", v).unwrap();
|
||||
s.execute("select.none", &json!({})).unwrap();
|
||||
let pen = |s: &mut Session, x: f64, y: f64| {
|
||||
@@ -156,16 +157,27 @@ fn choosing_the_blend_tool_again_finishes_the_blend() {
|
||||
s.pointer(&PointerEvent::new(kind, x, y), ViewInfo::default()).unwrap();
|
||||
}
|
||||
};
|
||||
let anchors = |s: &Session, id| match node(s, id).kind {
|
||||
NodeKind::Path { path, .. } => path.subpaths.iter().map(|sp| (sp.anchors.len(), sp.closed)).collect(),
|
||||
_ => vec![],
|
||||
};
|
||||
// With no path being drawn, choosing the Pen again changes nothing.
|
||||
let depth = s.doc().unwrap().history.undo.len();
|
||||
s.select_tool("pen", v).unwrap();
|
||||
assert_eq!((s.doc().unwrap().history.undo.len(), s.doc().unwrap().selection.objects.len()), (depth, 0));
|
||||
pen(&mut s, 100.0, 300.0);
|
||||
pen(&mut s, 200.0, 300.0);
|
||||
let p = s.doc().unwrap().selection.objects[0];
|
||||
let depth = s.doc().unwrap().history.undo.len();
|
||||
s.select_tool("pen", v).unwrap();
|
||||
assert_eq!(s.tool_id(), "pen", "the Pen stays chosen");
|
||||
assert_eq!(s.doc().unwrap().history.undo.len(), depth, "ending the path adds no undo step");
|
||||
assert_eq!(s.doc().unwrap().selection.objects, vec![p], "the path stays selected");
|
||||
pen(&mut s, 300.0, 300.0);
|
||||
let anchors = match node(&s, p).kind {
|
||||
NodeKind::Path { path, .. } => path.subpaths[0].anchors.len(),
|
||||
_ => 0,
|
||||
};
|
||||
assert_eq!(anchors, 3, "the Pen keeps drawing the same path");
|
||||
assert_eq!(anchors(&s, p), vec![(2, false)], "the path stays open with its two anchors");
|
||||
let q = s.doc().unwrap().selection.objects[0];
|
||||
assert_ne!(q, p, "the click starts a new path");
|
||||
assert_eq!(anchors(&s, q), vec![(1, false)]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -147,7 +147,8 @@ impl Session {
|
||||
crate::cmd::distortcmds::silent(self, |g| g.visible = true)?;
|
||||
}
|
||||
// When the tool already active, or the tool lent a selection tool for a drag, is chosen again,
|
||||
// `select_tool` calls its [`Tool::chosen_again`] (the Blend tool finishes its blend).
|
||||
// `select_tool` calls its [`Tool::chosen_again`] (the Blend tool finishes its blend, the Pen
|
||||
// ends its path).
|
||||
let again = self.lender.as_ref().unwrap_or(&self.tool).id() == id;
|
||||
self.switch_tool(id, view)?;
|
||||
// `switch_tool` returns early for the tool already active.
|
||||
|
||||
@@ -282,7 +282,8 @@ pub trait Tool: Send {
|
||||
vec![]
|
||||
}
|
||||
/// The tool, already active, is chosen again (its toolbar button, its shortcut, `tool.select`).
|
||||
/// Most tools keep their state; the Blend tool finishes the blend it is adding to.
|
||||
/// Most tools keep their state; the Blend tool finishes the blend it is adding to, and the Pen
|
||||
/// ends the path it is drawing.
|
||||
fn chosen_again(&mut self, _cx: &ToolContext) -> Vec<Action> {
|
||||
vec![]
|
||||
}
|
||||
|
||||
@@ -458,6 +458,12 @@ impl Tool for PenTool {
|
||||
_ => vec![],
|
||||
}
|
||||
}
|
||||
/// Choosing the Pen again (P, its toolbar button, `tool.select`) ends the path being drawn as
|
||||
/// Escape does: the path stays open, the Pen stays chosen, and the next click starts a new
|
||||
/// path. With no path being drawn it changes nothing.
|
||||
fn chosen_again(&mut self, cx: &ToolContext) -> Vec<Action> {
|
||||
self.deactivate(cx)
|
||||
}
|
||||
/// A dropped press drops only the anchor it was placing, a handle it was dragging or the
|
||||
/// close it was making: the path being drawn goes on with the next click.
|
||||
fn drop_press(&mut self, _cx: &ToolContext) -> Vec<Action> {
|
||||
|
||||
@@ -570,6 +570,98 @@ fn ending_during_a_pen_gesture_commits_and_clears_it() {
|
||||
}
|
||||
}
|
||||
|
||||
/// Choosing the Pen again ends the path being drawn as Escape does, with the rubber band on or off
|
||||
/// and for a one-anchor path: the preview goes, nothing is added to the document, and the next
|
||||
/// click starts a new path. Mid-drag it commits the anchor being placed first. With no path being
|
||||
/// drawn it changes nothing.
|
||||
#[test]
|
||||
fn choosing_the_pen_again_ends_the_path() {
|
||||
let p = paint();
|
||||
let created = |acts: &[Action]| matches!(acts, [Action::Begin(_), Action::Preview(c, _)] if c == "path.create");
|
||||
let preview = |o: &[Overlay]| o.iter().any(|o| matches!(o, Overlay::Path { .. } | Overlay::Measure { .. }));
|
||||
for pts in [vec![Point::new(100.0, 300.0), Point::new(200.0, 300.0)], vec![Point::new(100.0, 300.0)]] {
|
||||
let (d, _, s) = drawing(vectorcraft_geom::SubPath::polyline(&pts, false));
|
||||
for band in [true, false] {
|
||||
let cx = ToolContext { pen_rubber_band: band, ..cx(&d, &s, &p) };
|
||||
let mut t = PenTool { drawing: true, ..PenTool::default() };
|
||||
t.pointer(&cx, &PointerEvent::new(PointerKind::Move, 300.0, 410.0));
|
||||
assert!(preview(&t.overlays(&cx)), "band {band}");
|
||||
assert_eq!(t.cursor(&cx, Point::new(300.0, 410.0), Mods::default()), Cursor::PenDrawing);
|
||||
assert!(t.chosen_again(&cx).is_empty(), "nothing to commit");
|
||||
assert!(!preview(&t.overlays(&cx)), "band {band}");
|
||||
assert_eq!(t.cursor(&cx, Point::new(300.0, 410.0), Mods::default()), Cursor::Pen);
|
||||
let acts = click(&mut t, &cx, 300.0, 410.0, Mods::default());
|
||||
assert!(created(&acts), "{} anchors, band {band}: {acts:?}", pts.len());
|
||||
}
|
||||
// Chosen again (through `tool.select`) while a drag places an anchor: it is committed.
|
||||
let cx = cx(&d, &s, &p);
|
||||
let mut t = PenTool { drawing: true, ..PenTool::default() };
|
||||
t.pointer(&cx, &PointerEvent::new(PointerKind::Down, 300.0, 410.0));
|
||||
t.pointer(&cx, &PointerEvent::new(PointerKind::Drag, 320.0, 440.0));
|
||||
assert_eq!(t.chosen_again(&cx), vec![Action::Commit]);
|
||||
assert!(!t.busy());
|
||||
assert!(t.pointer(&cx, &PointerEvent::new(PointerKind::Up, 320.0, 440.0)).is_empty());
|
||||
assert!(created(&click(&mut t, &cx, 300.0, 500.0, Mods::default())));
|
||||
}
|
||||
let (d, _, s) = drawing(vectorcraft_geom::SubPath::polyline(&[Point::new(100.0, 300.0), Point::new(200.0, 300.0)], false));
|
||||
let cx = cx(&d, &s, &p);
|
||||
let mut t = PenTool::default();
|
||||
assert!(t.chosen_again(&cx).is_empty());
|
||||
assert_eq!(t.cursor(&cx, Point::new(300.0, 410.0), Mods::default()), Cursor::Pen);
|
||||
}
|
||||
|
||||
/// Choosing the Pen again while it draws a path inside a compound path ends that path as Escape
|
||||
/// and Enter do: the compound path is selected, the path is not closed, no undo step is added,
|
||||
/// and the next click starts a new path. Ending a path outside any compound path sends no
|
||||
/// selection change.
|
||||
#[test]
|
||||
fn choosing_the_pen_again_selects_the_compound_parent_of_the_path_being_drawn() {
|
||||
let (mut d, _) = doc_with_rect();
|
||||
let l = d.layers[0].id;
|
||||
let (a, b, compound) = (d.alloc_id(), d.alloc_id(), d.alloc_id());
|
||||
let open = |x: f64| {
|
||||
vectorcraft_geom::PathData::single(vectorcraft_geom::SubPath::polyline(&[Point::new(x, 300.0), Point::new(x + 100.0, 300.0)], false))
|
||||
};
|
||||
let path = |id, x| std::sync::Arc::new(vectorcraft_doc::Node::path(id, open(x), vectorcraft_doc::Appearance::default_art()));
|
||||
let mut node = vectorcraft_doc::Node::new(
|
||||
compound,
|
||||
NodeKind::Compound { children: vec![path(a, 10.0), path(b, 300.0)], rule: vectorcraft_geom::FillRule::NonZero },
|
||||
);
|
||||
node.appearance = vectorcraft_doc::Appearance::default_art().into();
|
||||
d.insert(Some(l), 1, node).unwrap();
|
||||
let p = paint();
|
||||
// The member path alone is the selection while the Pen draws it.
|
||||
let mut s = Selection::default();
|
||||
s.set([a]);
|
||||
let inside = cx(&d, &s, &p);
|
||||
// The selection once the engine ran `select.set`: the compound path.
|
||||
let mut sc = Selection::default();
|
||||
sc.set([compound]);
|
||||
let after = cx(&d, &sc, &p);
|
||||
let select_compound = vec![Action::Exec("select.set".into(), json!({"ids": [compound.0]}))];
|
||||
for key in [None, Some(ToolKey::Escape), Some(ToolKey::Enter)] {
|
||||
let mut t = PenTool { drawing: true, path: Some(a), subpath: Some(0), ..PenTool::default() };
|
||||
assert_eq!(t.cursor(&inside, Point::new(250.0, 450.0), Mods::default()), Cursor::PenDrawing, "{key:?}");
|
||||
let acts = match key {
|
||||
Some(k) => t.key(&inside, k, Mods::default()),
|
||||
None => t.chosen_again(&inside),
|
||||
};
|
||||
assert_eq!(acts, select_compound, "{key:?}: only the selection changes, with no close and no undo step");
|
||||
assert!(!t.busy() && t.active(&after).is_none(), "{key:?}: the path is done");
|
||||
assert_eq!(t.cursor(&after, Point::new(250.0, 450.0), Mods::default()), Cursor::Pen, "{key:?}");
|
||||
let next = click(&mut t, &after, 250.0, 450.0, Mods::default());
|
||||
assert!(
|
||||
matches!(next.as_slice(), [Action::Begin(_), Action::Preview(c, _)] if c == "path.create"),
|
||||
"{key:?}: the next click starts a new path: {next:?}"
|
||||
);
|
||||
}
|
||||
let (d, id, s) = drawing(vectorcraft_geom::SubPath::polyline(&[Point::new(100.0, 300.0), Point::new(200.0, 300.0)], false));
|
||||
let plain = cx(&d, &s, &p);
|
||||
let mut t = PenTool { drawing: true, path: Some(id), subpath: Some(0), ..PenTool::default() };
|
||||
assert!(t.chosen_again(&plain).is_empty());
|
||||
assert!(!t.busy() && t.active(&plain).is_none());
|
||||
}
|
||||
|
||||
/// #501: a press on the first anchor closes the path, however far the drag then goes: the
|
||||
/// closing preview leaves the path closed (so not one the pen extends), and each move still
|
||||
/// previews the close with the incoming handle mirroring the pointer (Alt keeps the outgoing one
|
||||
|
||||
@@ -2693,6 +2693,36 @@ fn the_blend_tool_shortcut_finishes_the_blend() {
|
||||
assert_eq!(app.session.active().unwrap().doc.layers, layers, "no blend was made");
|
||||
}
|
||||
|
||||
/// P, the Pen's shortcut, pressed between clicks while the Pen draws a path ends that path: the Pen
|
||||
/// stays chosen, the path stays open, and the next click starts a new path.
|
||||
#[test]
|
||||
fn the_pen_shortcut_ends_the_path_being_drawn() {
|
||||
use vectorcraft_tools::{PointerEvent, PointerKind};
|
||||
let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default());
|
||||
app.session.execute("file.new", &json!({"width": 600, "height": 300})).unwrap();
|
||||
app.select_tool("pen");
|
||||
let click = |app: &mut VectorcraftApp, x: f64| {
|
||||
let v = app.view_info();
|
||||
app.session.pointer(&PointerEvent::new(PointerKind::Down, x, 100.0), v).unwrap();
|
||||
app.session.pointer(&PointerEvent::new(PointerKind::Up, x, 100.0), v).unwrap();
|
||||
};
|
||||
let press = |key| egui::Event::Key { key, physical_key: Some(key), pressed: true, repeat: false, modifiers: Modifiers::NONE };
|
||||
let anchors = |app: &VectorcraftApp, id| {
|
||||
let path = app.session.active().unwrap().doc.node(id).and_then(|n| n.path_data());
|
||||
path.map(|pd| pd.subpaths.iter().map(|sp| sp.anchors.len()).collect::<Vec<_>>())
|
||||
};
|
||||
click(&mut app, 100.0);
|
||||
click(&mut app, 200.0);
|
||||
let first = app.session.active().unwrap().selection.objects[0];
|
||||
frame(&mut app, vec![press(Key::P), egui::Event::Text("p".into())]);
|
||||
assert_eq!(app.session.tool_id(), "pen");
|
||||
click(&mut app, 300.0);
|
||||
assert_eq!(anchors(&app, first), Some(vec![2]), "the path keeps its two anchors");
|
||||
let second = app.session.active().unwrap().selection.objects[0];
|
||||
assert_ne!(second, first, "the click starts a new path");
|
||||
assert_eq!(anchors(&app, second), Some(vec![1]));
|
||||
}
|
||||
|
||||
/// A Blend tool shortcut that arrives only as text (Shift+~ types `~`) also finishes the blend,
|
||||
/// while another tool's shifted shortcut does not.
|
||||
#[test]
|
||||
|
||||
+3
-1
@@ -12002,7 +12002,9 @@ EPS files hold its drawn steps, as they do for every blend:
|
||||
|
||||
With the Blend tool active, `tool.select {tool: "blend"}` finishes the blend, as a click on the tool's button or W
|
||||
does: it drops the object clicked first and stops the next click adding to the blend just made. The document and the
|
||||
selection stay as they are. Choosing any other tool that is already active leaves its work as it is.
|
||||
selection stay as they are. With the Pen active, `tool.select {tool: "pen"}` ends the path being drawn as Escape does,
|
||||
and so do P and a click on the Pen's button: the path stays open and selected (a path inside a compound path leaves
|
||||
the compound path selected), and the next click starts a new path. Choosing any other tool that is already active leaves its work as it is.
|
||||
|
||||
A blend's spine is the straight lines between its key centres until it is edited. `object.blend.info` lists it
|
||||
(`spine.anchors`, `keyAnchors`: the point each key sits on). `object.blend.spine.addAnchor {x, y}` adds a point where
|
||||
|
||||
@@ -1281,6 +1281,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
Transform Each opens on the scale, move, rotate, reflect, Random, reference point, Transform Objects and Preview it was last confirmed with (kept with the UI state; Copy never is), and its Copy button, left of Cancel, transforms a copy of each object as the [Scale multiple objects](https://helpx.adobe.com/illustrator/desktop/manage-objects/reshape-transform-objects/scale-multiple-objects.html) help page has it; the Copy checkbox is gone (#1732; the remembered values follow a maintainer comment on the issue, not the help page). Its Scale section has the Relative and Absolute radio buttons the same page describes: percentages of each object's size, or the width and height it becomes (`object.transformEach` `relative`, which Transform Again repeats); Absolute measures each object's own box, and the scales act along its axes about that box's reference point, so a turned shape keeps its shape and objects of different sizes come out alike; the fields show the width and height the selected objects share and read "Mixed" when they differ or a side is 0 (a line's), each object measured by its own box, rotated with it, as the Transform panel and the Control bar show it (sizes they show alike count as the same), and a size typed into them sets every object to it (a side left Mixed keeps its size), our choices where the page leaves them open; a live Repeat scales its spacing by the geometric mean of the two factors, so its Absolute size is approximate. The link beside the two scales keeps them in proportion, as the shape dialogs' Width and Height link does (`__constrain`, kept with the dialog's values; where it sits is our choice, the public pages don't establish it). The panel lists Scale, Move and Rotate, then the Options in two columns (Transform Objects, Transform Patterns, Scale Strokes & Effects, Scale Corners; Reflect X, Reflect Y, Random), the Reference Point, and Preview at the left of the button row, level with Copy, Cancel and OK.
|
||||
Transform Again uses the Copy, Transform Patterns, Scale Strokes & Effects and Scale Corners choices of the transform it repeats; after a bounding-box handle drag on area type, it resizes the type area again and the type keeps its size (`object.transformAgain`). With anchors selected with Direct Selection, Move, Rotate, Scale, Reflect, Shear and Transform Again (the commands, their dialogs and the four tools' drags) transform only those anchors, their handles with them, about the centre of the box around them unless a point was clicked; a copy still copies the whole object (#1408; behaviour reference: [adjust path segments](https://helpx.adobe.com/illustrator/using/adjust-path-segments.html); the default reference point and the copy are our choices). The Move, Rotate, Scale, Reflect and Shear dialogs have a Preview checkbox, off when they open: while it is on the canvas follows the values, Cancel rolls it back and OK is still one undo step; Up/Down step the Rotate and Shear angles and the Scale percentages by 1, Shift by 10 (#1412). The five dialogs and Transform Each have Transform Objects beside Transform Patterns: off, the art stays and only its pattern tiles transform (`objects` on the transform commands), and Transform Again repeats the choice (#1448; behaviour reference: [scale objects](https://helpx.adobe.com/illustrator/desktop/manage-objects/reshape-transform-objects/scale-objects.html); the checkboxes are always enabled and the Scale page's pair is applied to all of them, our choices). Reflect's axis is Horizontal, Vertical or an angle (#1460; [reflect objects along an axis](https://helpx.adobe.com/illustrator/desktop/manage-objects/arrange-objects/reflect-objects-along-an-axis.html)).
|
||||
- **Pen:** Alt pressed in the middle of dragging out an anchor splits its handles and keeps the curve already shaped into it (only the outgoing handle follows the pointer); Space held while dragging out an anchor moves it, handles and all. A press on the first anchor of the path being drawn closes it whatever the drag then does: the drag shapes the closing curve and the release closes the path wherever it ends (#501). The first anchor's incoming handle mirrors the pointer, and a click leaves it retracted and the anchor a corner. Its outgoing handle stays where it is on a corner, so the first segment keeps its shape, and on a smooth anchor it turns to stay in line at its own length; Alt makes the anchor a corner and leaves the outgoing handle where it was when Alt went down. The Smart Pen's closing drag does the same (fixes #6634; `path.close`'s `in` and `out`; behavior reference: [draw with the Pen, Curvature, or Pencil tool](https://web.archive.org/web/20220614224656/https://helpx.adobe.com/illustrator/using/drawing-pen-curvature-or-pencil.html), where a click or drag on the first anchor closes the path and Alt breaks the pairing of the closing anchor's handles; which handles the drag sets are our choices). Space held during the Pen's closing drag moves the first anchor, handles and all, as that page also describes (`path.close`'s `at`). Clicking the last anchor of the path being drawn retracts its outgoing handle (convert cursor), and dragging from it pulls out a new one on its own. Auto Add/Delete: over a selected path, a click on a segment adds an anchor and a click on an anchor deletes it (add and delete cursors); Shift held, or Preferences › General › Disable Auto Add/Delete, starts a new path instead. Alt held over a handle end or an anchor of a selected path (the one being drawn too) works as the Anchor Point tool, with its convert cursor: dragging a handle moves it alone, clicking a smooth anchor makes it a corner, dragging an anchor pulls out new symmetric handles, dragging a segment reshapes it; drawing then goes on. Cmd (Ctrl) held drags with the selection tool chosen last, Direct Selection until one is (handles, anchors and segments of the path being drawn or another), and the Pen then goes on drawing its path while that stays selected; the pointer shows that tool's while Cmd is held. The same holds for agents (`pointer_gesture` with `mods.cmd`), as the borrowing now lives in the engine (#494). A drag's preview (the Pen's, the Anchor Point tool's, Direct Selection's handles and anchors) follows every position the pointer is seen at (#834): the canvas sends the tool a drag whenever the pointer's document position differs from the last one it sent, not only when egui's frame delta is non-zero (zero when a compositor coalesces motion and in the frame the pointer comes back into the window after leaving it), and a move that arrives in the release's own frame shapes the preview before the release commits it, once the press has dragged. With the Pen, a press that moves under 3 screen pixels is a click (a corner without handles), and a Precise Cursors command toggles the existing preference and can take a shortcut (#1663).
|
||||
Choosing the Pen again while it draws a path (P, a click on its button, `tool.select`) ends the path as Escape does: the path stays open and selected (a path inside a compound path leaves the compound path selected), the Pen stays chosen, and the next click starts a new path. The [help page](https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/draw-shapes/preview-paths-drawn.html) describes P doing this with the preview off; doing it with Rubber Band on and for the button and `tool.select` are VectorCraft's own rules.
|
||||
- **Direct Selection (#1278):** clicking a segment picks its connection, with hollow endpoint anchors and only that curve's direction handles. Delete leaves the neighboring curves and appearance intact, opens/splits contours in one undo step, and another Delete removes the remaining selected path. A whole-path drag and deliberate anchor selection keep their existing behavior; egui frames and native control/art checked, OS mouse/visual QA pending. Where anchors of overlapping objects coincide, a click or drag takes the anchor of the selected object, also when another object lies over it (#1509, fixes #1508). Delete removes every selected anchor of a closed path (it used to remove the wrong ones), removes objects selected whole along with the selected anchors of others, and keeps the remainder selected so a second Delete removes it (#1674). In isolation mode Direct Selection and Group Selection pick only inside the isolated object (#1666). Escape cancels a Direct Selection drag (#1803, #1743). Double-clicking type (including type nested inside a group) switches to the Type tool and puts the caret at the clicked character.
|
||||
With Direct Selection and Group Selection, a drag that starts on an object while the selection also holds direct-selected anchors or segments moves those anchors and the objects selected whole in one undo step (`path.moveAnchors`), as a drag of a selected anchor does, and the other anchors of a partly selected path stay in place. While Alt is held during the drag, it copies the selected objects instead (`object.transform`). When direct-selected anchors are moved or transformed together with objects selected whole (such a drag, an anchor drag, an arrow key, or Move, Rotate, Scale, Reflect and Shear without a copy), a path inside a selected group is transformed once, with the group.
|
||||
A path segment with a control point whose x or y is infinite or larger in size than `f64::MAX / 16` is measured by its control points, so its bounds hold the whole curve and the canvas check refuses an edit that leaves such a path selected (`path.create` included).
|
||||
|
||||
@@ -167,6 +167,7 @@ tools, never checked side by side) isn't captured row by row.
|
||||
| Cmd/Ctrl lends the last-used selection tool | done | the path being drawn continues afterwards; with Direct Selection (the default until a selection tool is chosen) a Cmd drag moves an anchor of the path being drawn, moves a straight segment or bends a curved one, one undo step each, and a Cmd-click away from art ends the path; with Selection the hidden bounding box of the path being drawn takes no press, so the drag moves the path (#4980); anchors or segments the lent Direct Selection picks are what Copy and Cut take, as with Direct Selection chosen, while Copy with the Pen's own last anchor selected takes the whole path (#6123) |
|
||||
| Click an open path's end to continue it; click another path's end to join | done | #776 |
|
||||
| Rubber Band preview | done | Preferences option |
|
||||
| P while the Pen draws a path ends the path, as Escape does | done | the [help page](https://helpx.adobe.com/illustrator/desktop/draw-shapes-and-paths/draw-shapes/preview-paths-drawn.html) describes P with the preview off; VectorCraft's own rules: it does the same with Rubber Band on, a click on the active Pen's button and `tool.select` do the same, and the Pen stays chosen |
|
||||
| Auto Add/Delete on a selected path; Shift or the preference disables it | done | |
|
||||
| Pen cursors (new path ×, continue /, close o, add +, delete −, convert ^) | done | the nib is a fountain-pen nib, tip on the hotspot, with the slit widening into the breather hole and the heel clipped square to its axis; bitmap tests at 1× and 2× pin the nib and the new-path asterisk, and in-app screenshots compare the Pen with Direct Selection |
|
||||
| Node-editing cursors: Direct Selection's white arrow with a hollow or filled square over an anchor (path unselected or selected); the Reshape Segment cursor over a curved segment (Direct Selection, Anchor Point, the Pen with Alt); the Anchor Point caret for the Pen with Alt; Group Selection's plus (also Direct Selection with Alt); a filled arrow while dragging that turns hollow on a snap; a double arrowhead for an Alt-drag copy | partial | as the public manual describes them, drawn in code; no cue over handles (none documented) |
|
||||
|
||||
Reference in New Issue
Block a user