mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-30 02:07:10 +01:00
Docs: state the zero-offset rule for path.moveHandles
The params text and docs/mcp.md now say that a move by 0, 0 changes only the anchors it makes corners, so a live shape whose listed anchors need no change stays live, and one with an anchor made a corner becomes a plain path.
This commit is contained in:
1 parent
17a5016538
commit
7f96211081
3 files changed
+6
-4
No files matched your search
@@ -59,7 +59,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Move Direction Handles",
|
||||
[],
|
||||
None,
|
||||
"{handles: [{id, subpath?, anchor, which: \"in\"|\"out\"}, ...], dx, dy, independent?: bool} move several direction handles by (dx, dy) as one undo step; an anchor with one handle listed moves it as path.setHandle does (a smooth anchor turns its other handle in line at its own length), and an anchor with both handles listed moves both and becomes a corner; independent (default false) makes every listed handle's anchor a corner and leaves its other handle; a handle listed twice moves once; an empty list, a missing or unknown path, subpath or anchor, or a which other than \"in\" or \"out\" is refused",
|
||||
"{handles: [{id, subpath?, anchor, which: \"in\"|\"out\"}, ...], dx, dy, independent?: bool} move several direction handles by (dx, dy) as one undo step; an anchor with one handle listed moves it as path.setHandle does (a smooth anchor turns its other handle in line at its own length), and an anchor with both handles listed moves both and becomes a corner; independent (default false) makes every listed handle's anchor a corner and leaves its other handle; a handle listed twice moves once; a move by 0, 0 changes only the anchors it makes corners, so a live shape with no such anchor stays live and one with such an anchor becomes a plain path, and with none it changes nothing and records no undo step; an empty list, a missing or unknown path, subpath or anchor, or a which other than \"in\" or \"out\" is refused",
|
||||
has_doc,
|
||||
move_handles
|
||||
),
|
||||
|
||||
+4
-2
@@ -7968,8 +7968,10 @@ same way for a blend's spine point; without `handle` it is refused. These rules
|
||||
on one path or several, by the same offset as one undo step. An anchor with one handle listed places it as
|
||||
`path.setHandle` does, so a smooth anchor turns its other handle in line at its own length; an anchor with both handles
|
||||
listed moves both and becomes a corner. `independent: true` makes the anchor of every listed handle a corner and leaves
|
||||
its other handle where it is. A handle listed twice moves once, and a move by 0, 0 that makes no anchor a corner leaves
|
||||
the document as it is and records no undo step. An empty or missing `handles`, a `which` other than `"in"` or `"out"`,
|
||||
its other handle where it is. A handle listed twice moves once. A move by 0, 0 changes only the anchors it makes corners, so a live
|
||||
shape whose listed anchors need no change stays live, and a live shape with an anchor it makes a corner becomes a plain
|
||||
path; when it makes no anchor a corner it leaves the document as it is
|
||||
and records no undo step. An empty or missing `handles`, a `which` other than `"in"` or `"out"`,
|
||||
an object that is not a path, a missing subpath or anchor, a `dx` or `dy` that is missing, not a number or 1e9 pt or
|
||||
more in size, and an `independent` that is not true or false are refused, and the document does not change. With Direct
|
||||
Selection, a click on the end of a direction handle of a path picks that handle, a Shift-click adds it to the picked
|
||||
|
||||
@@ -1605,7 +1605,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- **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.
|
||||
VectorCraft's own preference General › Interpolate Control Points When Moving Anchors (`interpolateControlPoints`, off by default, fixes #7832): on, a Direct Selection drag, an arrow-key nudge, a Move or a Transform Again of selected anchors re-maps both handles of each segment with one moved end by the turn, uniform scale and move that take its old ends to its new ends, so a segment between corner anchors keeps its shape; a segment with both ends moved, or with its ends at the same place before or after the move, moves rigidly, and a smooth anchor keeps its handles in line. The commands take an `interpolate` param that defaults to the preference, and the value used joins the journal and Transform Again. Each drag or nudge is one undo step (`a_nudge_with_the_preference_on_re_maps_both_handles_of_the_segment`, `a_direct_selection_drag_with_the_preference_on_re_maps_the_handles_in_one_undo_step`, `a_smooth_anchor_keeps_its_handles_in_line`).
|
||||
Picking several direction handles is VectorCraft's own behavior. With Direct Selection, a click on a path's direction handle picks it, a Shift-click adds or removes it without moving it, and Escape lets the picked handles go. Dragging one of two or more picked handles moves all of them, on one path or several, by the same offset in one undo step (`path.moveHandles`); an anchor with both handles picked becomes a corner, and Alt makes each moved handle's anchor a corner (`a_drag_of_one_of_two_picked_handles_moves_both_in_one_undo_step`, `shift_click_and_escape_let_picked_handles_go`, `both_handles_of_an_anchor_or_alt_make_a_corner` in `crates/engine/tests/it/several_handles.rs`).
|
||||
Picking several direction handles is VectorCraft's own behavior. With Direct Selection, a click on a path's direction handle picks it, a Shift-click adds or removes it without moving it, and Escape lets the picked handles go. Dragging one of two or more picked handles moves all of them, on one path or several, by the same offset in one undo step (`path.moveHandles`); an anchor with both handles picked becomes a corner, and Alt makes each moved handle's anchor a corner; a move by 0, 0 leaves a live shape live when it makes none of its anchors a corner (`a_drag_of_one_of_two_picked_handles_moves_both_in_one_undo_step`, `shift_click_and_escape_let_picked_handles_go`, `both_handles_of_an_anchor_or_alt_make_a_corner`, `a_move_by_nothing_leaves_a_live_shape_that_needs_no_change_live` in `crates/engine/tests/it/several_handles.rs`).
|
||||
VectorCraft's own preference General › Delete Removes Anchor Points and Keeps Paths Joined (`deleteKeepsPathsJoined`, off by default, part of #8326): on, Delete, Backspace and Edit › Clear remove the direct-selected anchors of each path as Remove Anchor Points does, refitting the curve around each one, so a closed path stays closed and an open path stays in one piece; the next anchor along (the one before at an open path's end) is selected, so the next Delete goes on along the path. Paths with a selected segment are still cut there, objects selected whole are still deleted, and a path left with fewer than two anchors goes, in one undo step. `edit.clear` takes a `keepJoined` param that defaults to the preference, and the value used joins the journal (`with_the_preference_on_delete_keeps_a_closed_path_closed_and_selects_the_next_anchor`, `several_paths_and_an_object_selected_whole_change_in_one_undo_step`, `with_the_preference_on_delete_and_backspace_keep_the_path_joined`).
|
||||
VectorCraft's own preference General › Double-Click Adds Anchor Points (`doubleClickAddsAnchorPoints`, off by default, part of #8326): on, a double-click without modifier keys on a path segment with Direct Selection adds an anchor at the clicked point, keeping the curve's shape, with only the new anchor selected, in one undo step (`path.insertAnchor` with `selectAnchor`); on an anchor, a handle, a center point, a blend's spine point or a fill the double-click does what it did before, and a clipping path's segment gets the anchor (`with_the_preference_on_a_double_click_on_a_segment_adds_an_anchor_there`, `with_the_preference_on_a_double_click_in_a_group_adds_only_on_a_segment`, `with_the_preference_on_a_double_click_gives_way_to_spine_points_and_reaches_clipping_paths`, `with_the_preference_on_a_double_click_on_a_segment_adds_an_anchor_in_one_undo_step`, `the_double_click_and_delete_preferences_are_separate`).
|
||||
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).
|
||||
|
||||
Reference in new issue
Block a user