mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-10 06:31:19 +00:00
Selection: tests check mesh lines in drag outlines; docs list the changed cases
The mesh tests now count each feedback path's subpaths, so a mesh that drew its boundary instead of its mesh lines fails them. The progress-doc lines name the Pathfinder, mesh and symbol instance outlines and the limit's count of evaluated objects.
This commit is contained in:
@@ -1959,6 +1959,21 @@ fn dragged_feedback_boxes(s: &mut Session, x: f64, y: f64) -> Vec<(f64, f64, f64
|
||||
boxes
|
||||
}
|
||||
|
||||
/// The number of subpaths in each path of the Real-time Drawing off feedback the session shows now.
|
||||
fn feedback_subpaths(s: &mut Session) -> Vec<usize> {
|
||||
use vectorcraft_tools::Overlay;
|
||||
use vectorcraft_tools::draw2::FEEDBACK;
|
||||
s.overlays(ViewInfo::default())
|
||||
.into_iter()
|
||||
.filter_map(|o| match o {
|
||||
Overlay::Path { path, color, .. } if color == FEEDBACK => {
|
||||
Some(path.elements().iter().filter(|el| matches!(el, kurbo::PathEl::MoveTo(_))).count())
|
||||
}
|
||||
_ => None,
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// With Real-time Drawing off, a dragged group draws the outline of each member, nested groups'
|
||||
/// members included, at the dragged position instead of one union of them all.
|
||||
#[test]
|
||||
@@ -2129,12 +2144,8 @@ fn real_time_drawing_off_outlines_each_mesh_of_a_dragged_repeat_once() {
|
||||
let boxes = dragged_feedback_boxes(&mut s, 120.0, 120.0);
|
||||
assert_eq!(boxes.len(), 2, "one outline per copy: {boxes:?}");
|
||||
assert_eq!(boxes[0], (130.0, 140.0, 100.0), "the first copy's mesh lines, moved");
|
||||
let lines = s.overlays(ViewInfo::default()).into_iter().find_map(|o| match o {
|
||||
vectorcraft_tools::Overlay::Path { path, color, .. } if color == vectorcraft_tools::draw2::FEEDBACK => Some(path),
|
||||
_ => None,
|
||||
});
|
||||
let subpaths = lines.map_or(0, |path| path.elements().iter().filter(|el| matches!(el, kurbo::PathEl::MoveTo(_))).count());
|
||||
assert!(subpaths > 1, "the mesh's lines, not one boundary: {subpaths}");
|
||||
let subpaths = feedback_subpaths(&mut s);
|
||||
assert!(subpaths.len() == 2 && subpaths.iter().all(|&n| n > 1), "each copy's mesh lines, not one boundary: {subpaths:?}");
|
||||
}
|
||||
|
||||
/// With Real-time Drawing off, a dragged gradient mesh with a Drop Shadow draws its mesh lines as one
|
||||
@@ -2148,6 +2159,8 @@ fn real_time_drawing_off_outlines_a_dragged_mesh_with_an_effect_by_its_lines() {
|
||||
s.execute("object.mesh.create", &json!({"rows": 2, "cols": 2})).unwrap();
|
||||
s.execute("effect.apply", &json!({"effect": "stylize.dropShadow", "item": null})).unwrap();
|
||||
assert_eq!(dragged_feedback_boxes(&mut s, 120.0, 120.0), [(130.0, 140.0, 100.0)]);
|
||||
let subpaths = feedback_subpaths(&mut s);
|
||||
assert!(matches!(subpaths.as_slice(), [n] if *n > 1), "the mesh's lines, not one boundary: {subpaths:?}");
|
||||
}
|
||||
|
||||
/// With Real-time Drawing off, a dragged group with a Vector Halftone keeps its own fill, which is what
|
||||
|
||||
@@ -729,8 +729,8 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- Preferences audit (2026-10-30, #394): every Preferences dialog option is read by shipped code, by its field or its key, except User Interface › Open Documents As Tabs, Units › East Asian Type, Hyphenation › Default Language, Plug-ins & Scratch Disks › Primary and Secondary, and Clipboard Handling › Legacy vector clipboard and its mode, which are stored only; [gaps.md G12](gaps.md#g12-preferences-and-panels-that-dont-act-yet) says what each waits on.
|
||||
- With Performance › Real-time Drawing and Editing off, the bounding box moves with a Selection-tool move drag and the object moves when the button is released ([help](https://web.archive.org/web/20220324053041id_/https://helpx.adobe.com/illustrator/using/real-time-editing.html); `real_time_drawing_off_moves_the_bounding_box_with_a_move_drag`).
|
||||
- Performance › Real-time Drawing and Editing off defers a drag's edits to its release, but a ruler guide dragged out of a ruler or moved still shows as it is dragged, where only its position label showed (#4646; `a_guide_dragged_out_of_a_ruler_shows_while_dragged`, `real_time_drawing_off_still_shows_a_dragged_guide`).
|
||||
- With Real-time Drawing and Editing off, a dragged selection whose outlines have more than 100,000 points shows its moved bounds instead, as the selection at rest does (#525, #2460; `real_time_drawing_off_draws_the_bounds_of_a_selection_too_big_to_outline`).
|
||||
- With Real-time Drawing and Editing off, a move or handle drag of a group, blend, envelope, repeat or intertwine draws the outline of each of its objects instead of one union of them, as VectorCraft's own rule (`real_time_drawing_off_outlines_a_dragged_group_member_by_member`, `real_time_drawing_off_outlines_a_resized_group_member_by_member`, `real_time_drawing_off_outlines_a_dragged_blend_step_by_step`, `real_time_drawing_off_outlines_a_dragged_envelope_object_by_object`).
|
||||
- With Real-time Drawing and Editing off, a dragged selection whose outline points and evaluated objects come to more than 100,000 shows its moved bounds instead, as the selection at rest does (#525, #2460; `real_time_drawing_off_draws_the_bounds_of_a_selection_too_big_to_outline`, `real_time_drawing_off_draws_the_bounds_of_a_group_too_big_to_outline`, `real_time_drawing_off_draws_the_bounds_of_a_repeat_with_too_many_objects`).
|
||||
- With Real-time Drawing and Editing off, a move or handle drag of a group, blend, envelope, repeat or intertwine draws the outline of each of its objects instead of one union of them, as VectorCraft's own rule (`real_time_drawing_off_outlines_a_dragged_group_member_by_member`, `real_time_drawing_off_outlines_a_resized_group_member_by_member`, `real_time_drawing_off_outlines_a_dragged_blend_step_by_step`, `real_time_drawing_off_outlines_a_dragged_envelope_object_by_object`). A group with a Pathfinder effect draws the area the effect makes, a gradient mesh draws its mesh lines, and a symbol instance draws its bounds (`real_time_drawing_off_outlines_a_dragged_pathfinder_group_by_its_area`, `real_time_drawing_off_outlines_each_mesh_of_a_dragged_repeat_once`, `real_time_drawing_off_outlines_a_dragged_symbol_instance_by_its_bounds`).
|
||||
- Dialogs move by dragging their heading (the band down from the top edge, as a title bar), stay on screen and keep where they were moved for the session; the form dialogs' choices are dropdowns (Offset Path's Joins, Average's and Shear's and Reflect's axis), and Offset Path lists Offset, Joins, Miter Limit and previews (#423).
|
||||
- Dialogs open with their first field focused and its value selected: type a value and press Enter (Move, Rotate, Scale…). A dialog opened from a menu takes the keyboard focus every time it opens, not only the first (#1367), and one whose first field starts greyed out (Blend Options on Smooth Color, Layers Panel Options) gives the focus to that field once it is enabled (#1395). Number fields in panels, the Control bar and dialogs (preferences too) step with Up/Down, or with the mouse wheel over the focused field (#485: a notch a step; the panel under it then stays put, and an unfocused field leaves the wheel to scrolling) (Shift: ten, Ctrl/Cmd: a tenth of their unit), applied at once.
|
||||
- While Alt (Option on macOS) is held, the Flare Tool Options' Cancel button reads Reset, which puts every option back to the Flare tool's default and leaves the dialog open (`ui.dialogReset`).
|
||||
|
||||
Reference in New Issue
Block a user