mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-16 07:17:00 +00:00
Merge pull request #7639 from dotCooCoo/feat/global-edit-rotated-copies
Global Edit: rotated copies are matched and take each edit turned by their angle
This commit is contained in:
@@ -6,20 +6,34 @@
|
||||
//! (<https://helpx.adobe.com/ph_fil/illustrator/how-to/global-editing-sensei.html>), in our words:
|
||||
//!
|
||||
//! - With one object selected, Start Global Edit finds the objects that repeat its shape: the
|
||||
//! same outline, wherever it lies and at whatever size. Two options narrow the match: Appearance
|
||||
//! (the same fill and stroke too) and Size (the same width and height too). The search covers
|
||||
//! every artboard and the canvas around them by default; it can be limited to a range of
|
||||
//! artboards (`1, 3-5`) and can leave out the objects that lie on no artboard. Images, type,
|
||||
//! masks, linked files and selections of more than one object are not supported.
|
||||
//! same outline, wherever it lies, at whatever size and at whatever angle. Two options narrow
|
||||
//! the match: Appearance (the same fill and stroke too) and Size (the same width and height
|
||||
//! too). The search covers every artboard and the canvas around them by default; it can be
|
||||
//! limited to a range of artboards (`1, 3-5`) and can leave out the objects that lie on no
|
||||
//! artboard. Images, type, masks, linked files and selections of more than one object are not
|
||||
//! supported.
|
||||
//! - The help page "Edit groups with similar objects"
|
||||
//! (<https://helpx.adobe.com/illustrator/desktop/manage-objects/edit-objects/edit-groups-with-similar-objects.html>):
|
||||
//! with a group selected, Start Global Edit finds the groups like it, and an edit made to an
|
||||
//! object inside one of them is made to the matching object in each of the others. Here a group
|
||||
//! is like another when it holds as many objects, in the same order, each like the one at its
|
||||
//! place (paths, compound paths, symbol instances and groups of them, clipping paths included),
|
||||
//! and they lie the same way relative to each other: the group as a whole is moved or scaled.
|
||||
//! With Appearance on, each of those objects must have the same fill and stroke too; with Size,
|
||||
//! the groups the same width and height.
|
||||
//! and they lie the same way relative to each other: the group as a whole is moved, scaled or
|
||||
//! rotated. With Appearance on, each of those objects must have the same fill and stroke too;
|
||||
//! with Size, the groups the same width and height.
|
||||
//! - The how-to "Design a modern geometric logo"
|
||||
//! (<https://helpx.adobe.com/vn_vi/illustrator/how-to/modern-logo-design.html>) makes rotated
|
||||
//! copies of a group of shapes around a point, then starts Global Edit on one object and edits
|
||||
//! every copy of it at once. Here a rotated copy is found as a moved or scaled one is, and an
|
||||
//! edit reaches it turned by its own angle: an anchor moved to the right on the selected object
|
||||
//! moves downward on a copy turned a quarter turn clockwise. The rules below for rotated copies
|
||||
//! are VectorCraft's own. The angle is the one that lays each anchor and handle of the selected
|
||||
//! object on the copy's of the same order, so a square whose anchors were turned a quarter turn
|
||||
//! is a copy turned a quarter turn. A copy is the same shape when, laid so, every anchor and
|
||||
//! handle lies within a millionth of the larger side of the copy's box of its own ([`SAME`]).
|
||||
//! A reflected copy is another shape. With Size, a rotated copy has the same size when it is the
|
||||
//! selected object rotated without scaling: its width and height are compared as they were
|
||||
//! before the rotation.
|
||||
//! - Selecting one of the repeated objects with the Selection tool highlights the similar objects
|
||||
//! at once, before Global Edit starts. Here they are the objects Start Global Edit would take
|
||||
//! with the current Global Edit Options ([`similar`]).
|
||||
@@ -29,15 +43,16 @@
|
||||
//!
|
||||
//! Here the found objects ([`GlobalEdit::members`]) stay highlighted while the selection keeps the
|
||||
//! object that was selected, so that the Transform panel and the bounding box measure that object
|
||||
//! and not the whole set. Each member keeps the transform (a move and a uniform scale) that maps
|
||||
//! the first object's outline onto its own. After every edit ([`propagate`], run inside
|
||||
//! [`Session::edit`], so the whole change is one undo step), the first selected member the edit
|
||||
//! changed is the model: what changed about it is given to every other member, and nothing else,
|
||||
//! so members found by shape alone keep their own fills and strokes where the edit didn't touch
|
||||
//! them:
|
||||
//! and not the whole set. Each member keeps the transform (a move, a uniform scale and, for a
|
||||
//! rotated copy, a turn) that maps the first object's outline onto its own. After every edit
|
||||
//! ([`propagate`], run inside [`Session::edit`], so the whole change is one undo step), the first
|
||||
//! selected member the edit changed is the model: what changed about it is given to every other
|
||||
//! member, and nothing else, so members found by shape alone keep their own fills and strokes
|
||||
//! where the edit didn't touch them:
|
||||
//!
|
||||
//! - its outline (and anchors), placed through that transform, so in proportion to each member's
|
||||
//! size. Only geometry is placed so: no stroke weight is scaled to a member's size;
|
||||
//! size and turned by its angle. Only geometry is placed so: no stroke weight is scaled to a
|
||||
//! member's size;
|
||||
//! - its opacity, blending, knockout and the object's effects, each when it changed;
|
||||
//! - of its fills and strokes, each setting that changed (paint, weight, opacity, blending,
|
||||
//! effects, caps, dashes, arrowheads …), as it is: it goes to the member's fill or stroke of the
|
||||
@@ -74,12 +89,12 @@
|
||||
//! and later edits leave it as it is.
|
||||
//! The object the edit started from can't be left out (a Shift-click on it selects it or
|
||||
//! deselects it as before), Global Edit ends when fewer than two members are left, and leaving
|
||||
//! one out is not an undo step. Rotated copies are not covered.
|
||||
//! one out is not an undo step.
|
||||
|
||||
use serde::Serialize;
|
||||
use serde_json::{Value, json};
|
||||
use vectorcraft_doc::{Appearance, AppearanceItem, Document, FillLayer, Node, NodeId, NodeKind, Scaling, Shared, StrokeLayer};
|
||||
use vectorcraft_geom::{Affine, BezPath, PathData, Point, Rect, Shape};
|
||||
use vectorcraft_geom::{Affine, BezPath, PathData, Point, Rect, Shape, Vec2};
|
||||
|
||||
use super::wand::{fill_of, stroke_of};
|
||||
use super::{CommandSpec, Result, Session, bad, bool_or, checked_id, cmd, has_doc};
|
||||
@@ -98,7 +113,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Start Global Edit",
|
||||
["Select"],
|
||||
None,
|
||||
"{appearance?: bool, size?: bool, artboards?: \"all\" | range such as \"1, 3-5\", includeCanvas?: bool} (each defaults to the Global Edit Options) while Global Edit is off: start it on the one selected object (a path, compound path, symbol instance or group of them), with the objects of the same shape (for a group: the groups holding objects like its own, at the same places) (and, with `appearance`, the same fill and stroke; with `size`, the same width and height) on the artboards given (and, with `includeCanvas`, off every artboard), at most 10000 → {active: true, count, ids}; while on: stop it (Escape does the same) → {active: false}",
|
||||
"{appearance?: bool, size?: bool, artboards?: \"all\" | range such as \"1, 3-5\", includeCanvas?: bool} (each defaults to the Global Edit Options) while Global Edit is off: start it on the one selected object (a path, compound path, symbol instance or group of them), with the objects of the same shape, moved, scaled or rotated copies of it and not reflected ones (for a group: the groups holding objects like its own, at the same places) (and, with `appearance`, the same fill and stroke; with `size`, the same width and height, for a rotated copy before its rotation) on the artboards given (and, with `includeCanvas`, off every artboard), at most 10000 → {active: true, count, ids}; while on: stop it (Escape does the same) → {active: false}",
|
||||
can_toggle,
|
||||
toggle
|
||||
),
|
||||
@@ -181,7 +196,8 @@ pub type Outlines = Vec<(BezPath, [u8; 3])>;
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct GlobalEdit {
|
||||
/// The objects edited together, the one selected at the start first, each with the transform
|
||||
/// (a move and a uniform scale) that maps that first object's outline onto its own.
|
||||
/// (a move, a uniform scale and, for a turned copy, a turn) that maps that first object's
|
||||
/// outline onto its own.
|
||||
pub members: Vec<(NodeId, Affine)>,
|
||||
/// [`highlights`] as of a document revision: the canvas asks every frame.
|
||||
outlines: std::cell::RefCell<Option<(u64, Outlines)>>,
|
||||
@@ -257,14 +273,60 @@ impl Form {
|
||||
}
|
||||
}
|
||||
|
||||
fn same(&self, o: &Form) -> bool {
|
||||
self.tag == o.tag
|
||||
&& self.symbols == o.symbols
|
||||
&& self.points.len() == o.points.len()
|
||||
&& self.points.iter().zip(&o.points).all(|(a, b)| a.distance(*b) < 1e-6)
|
||||
/// The transform that lays this form's object on `o`'s, point for point in order, and whether
|
||||
/// it turns the object: a move and a uniform scale when the two lie the same way, otherwise a
|
||||
/// turn too. `None` when `o` is another shape, a reflected copy included.
|
||||
fn onto(&self, o: &Form) -> Option<(Affine, bool)> {
|
||||
if self.tag != o.tag || self.symbols != o.symbols || self.points.len() != o.points.len() {
|
||||
return None;
|
||||
}
|
||||
let near = |xf: Affine| self.points.iter().zip(&o.points).all(|(a, b)| (xf * *a).distance(*b) < SAME);
|
||||
let back = self.frame.inverse();
|
||||
if near(Affine::IDENTITY) {
|
||||
return Some((o.frame * back, false));
|
||||
}
|
||||
let turn = self.turn_onto(o)?;
|
||||
near(turn).then(|| (o.frame * turn * back, true))
|
||||
}
|
||||
|
||||
/// The turn, uniform scale and move (both forms in their unit boxes) that best lays this
|
||||
/// form's points on `o`'s in order, by least squares. A turn within [`SQUARE`] of a quarter
|
||||
/// turn is that quarter turn exactly.
|
||||
fn turn_onto(&self, o: &Form) -> Option<Affine> {
|
||||
let n = self.points.len() as f64;
|
||||
let middle = |f: &Form| f.points.iter().fold(Vec2::ZERO, |s, p| s + p.to_vec2()) / n;
|
||||
let (from, to) = (middle(self), middle(o));
|
||||
// With the points as complex numbers about their middles, the fit is `Σ conj(p) q / Σ |p|²`.
|
||||
let (mut re, mut im, mut spread) = (0.0, 0.0, 0.0);
|
||||
for (a, b) in self.points.iter().zip(&o.points) {
|
||||
let (p, q) = (a.to_vec2() - from, b.to_vec2() - to);
|
||||
re += p.dot(q);
|
||||
im += p.cross(q);
|
||||
spread += p.hypot2();
|
||||
}
|
||||
let len = re.hypot(im);
|
||||
let scale = len / spread;
|
||||
if !(scale.is_finite() && scale > 0.0) {
|
||||
return None;
|
||||
}
|
||||
let (mut cos, mut sin) = (re / len, im / len);
|
||||
if cos.abs() < SQUARE {
|
||||
(cos, sin) = (0.0, sin.signum());
|
||||
} else if sin.abs() < SQUARE {
|
||||
(cos, sin) = (cos.signum(), 0.0);
|
||||
}
|
||||
let (a, b) = (scale * cos, scale * sin);
|
||||
Some(Affine::translate(to) * Affine::new([a, b, -b, a, 0.0, 0.0]) * Affine::translate(-from))
|
||||
}
|
||||
}
|
||||
|
||||
/// How far apart two forms' points may lie, each form in its unit box, for the forms to be the
|
||||
/// same. For a turned copy this bounds the angle too: a copy turned and then changed by more than
|
||||
/// a millionth of its larger side is another shape.
|
||||
const SAME: f64 = 1e-6;
|
||||
/// A turn whose sine or cosine is below this is taken as a whole number of quarter turns.
|
||||
const SQUARE: f64 = 1e-9;
|
||||
|
||||
/// Global Edit supports paths, compound paths, symbol instances and groups of them; not images,
|
||||
/// type, linked files, objects with an opacity mask, clipping paths or guides (the help page lists
|
||||
/// images, text, masks and links as unsupported).
|
||||
@@ -395,8 +457,16 @@ fn matches(s: &Session, o: &Options) -> Result<Vec<(NodeId, Affine)>> {
|
||||
}
|
||||
boards.as_ref().is_none_or(|rs| rs.iter().any(|r| on(*r, b)))
|
||||
};
|
||||
// A copy that lies the same way has the size of the selected object when their boxes are as
|
||||
// wide and as high; a turned copy, when the transform that lays the object on it doesn't scale.
|
||||
let same_size = |n: &Node, xf: Affine, turned: bool| {
|
||||
if turned {
|
||||
close(xf.determinant().abs().sqrt(), 1.0)
|
||||
} else {
|
||||
matches!((key_size, size(n)), (Some((w, h)), Some((w2, h2))) if close(w, w2) && close(h, h2))
|
||||
}
|
||||
};
|
||||
let mut out = vec![(*id, Affine::IDENTITY)];
|
||||
let back = form.frame.inverse();
|
||||
super::select::walk_selectable(d, st.isolation, |n| {
|
||||
if n.id == *id || out.len() >= MAX_MEMBERS {
|
||||
return false;
|
||||
@@ -413,12 +483,12 @@ fn matches(s: &Session, o: &Options) -> Result<Vec<(NodeId, Affine)>> {
|
||||
};
|
||||
// The object count first: it turns most objects down before their form is made.
|
||||
if n.children().map(Vec::len) == count
|
||||
&& let Some(f) = Form::of(n).filter(|f| f.same(&form) && supported(n))
|
||||
&& (!o.size || matches!((key_size, size(n)), (Some((w, h)), Some((w2, h2))) if close(w, w2) && close(h, h2)))
|
||||
&& let Some((xf, turned)) = Form::of(n).and_then(|f| form.onto(&f)).filter(|_| supported(n))
|
||||
&& (!o.size || same_size(n, xf, turned))
|
||||
&& (!o.appearance || same_look(key, n))
|
||||
&& in_scope(n)
|
||||
{
|
||||
out.push((n.id, f.frame * back));
|
||||
out.push((n.id, xf));
|
||||
// A group taken is taken whole, as compound paths, symbol instances and the others are.
|
||||
return false;
|
||||
}
|
||||
@@ -464,7 +534,7 @@ fn toggle(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
let o = s.global_edit_options.with(p, &s.doc()?.doc, C)?;
|
||||
let members = matches(s, &o)?;
|
||||
if members.len() < 2 {
|
||||
return Err(bad(C, "no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again"));
|
||||
return Err(bad(C, "no similar objects found (reflected copies are not matched); change the Global Edit Options and try again"));
|
||||
}
|
||||
let ids: Vec<u64> = members.iter().map(|(id, _)| id.0).collect();
|
||||
let st = s.doc_mut()?;
|
||||
@@ -1027,6 +1097,38 @@ mod tests {
|
||||
assert!(taken > 100 && checked - taken > 100 && asked > 200, "{taken} of {checked}, {asked} selected");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_form_is_laid_on_a_turned_copy_and_on_no_reflected_or_unmeasurable_one() {
|
||||
let mut d = Document::new(800.0, 600.0);
|
||||
let mut path = |points: &[(f64, f64)]| {
|
||||
let anchors = points.iter().map(|(x, y)| Anchor::corner(Point::new(*x, *y))).collect();
|
||||
Node::path(d.alloc_id(), PathData::new(vec![SubPath::new(anchors, true)]), Appearance::default())
|
||||
};
|
||||
let form = Form::of(&path(&[(0.0, 0.0), (30.0, 0.0), (30.0, 70.0)])).unwrap();
|
||||
let mut onto = |points: &[(f64, f64)]| Form::of(&path(points)).and_then(|f| form.onto(&f));
|
||||
let near = |xf: Affine, want: [f64; 6]| xf.as_coeffs().iter().zip(want).all(|(a, b)| (a - b).abs() < 1e-9);
|
||||
// The same way at twice the size: a move and a scale, no turn.
|
||||
let (xf, turned) = onto(&[(100.0, 0.0), (160.0, 0.0), (160.0, 140.0)]).unwrap();
|
||||
assert!(!turned && near(xf, [2.0, 0.0, 0.0, 2.0, 100.0, 0.0]), "{xf:?}");
|
||||
// A quarter turn, (x, y) → (−y, x), moved by (100, 0); and a turn by 30° at half the size.
|
||||
let (xf, turned) = onto(&[(100.0, 0.0), (100.0, 30.0), (30.0, 30.0)]).unwrap();
|
||||
assert!(turned && near(xf, [0.0, 1.0, -1.0, 0.0, 100.0, 0.0]), "{xf:?}");
|
||||
let by = Affine::rotate(30f64.to_radians()) * Affine::scale(0.5);
|
||||
let at = |x: f64, y: f64| {
|
||||
let p = by * Point::new(x, y);
|
||||
(p.x, p.y)
|
||||
};
|
||||
let (xf, turned) = onto(&[at(0.0, 0.0), at(30.0, 0.0), at(30.0, 70.0)]).unwrap();
|
||||
assert!(turned && near(xf, by.as_coeffs()), "{xf:?}");
|
||||
// A reflected copy, a copy with an anchor a thousandth of its size away, and points that
|
||||
// are not numbers or not finite.
|
||||
assert!(onto(&[(0.0, 0.0), (-30.0, 0.0), (-30.0, 70.0)]).is_none());
|
||||
assert!(onto(&[at(0.0, 0.0), at(30.0, 0.0), at(30.0, 70.07)]).is_none());
|
||||
assert!(onto(&[(f64::NAN, 0.0), (30.0, 0.0), (30.0, 70.0)]).is_none());
|
||||
assert!(onto(&[(0.0, 0.0), (f64::INFINITY, 0.0), (30.0, 70.0)]).is_none());
|
||||
assert!(onto(&[(0.0, 0.0), (30.0, 0.0)]).is_none(), "another count of anchors");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn support_of_empty_degenerate_and_deep_objects_is_decided_as_building_the_form_decides() {
|
||||
let mut d = Document::new(800.0, 600.0);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
use serde_json::{Value, json};
|
||||
use vectorcraft_doc::{Node, NodeKind};
|
||||
use vectorcraft_geom::{Affine, PathData, Rect};
|
||||
use vectorcraft_geom::{Affine, PathData, Point, Rect};
|
||||
|
||||
use crate::*;
|
||||
|
||||
@@ -320,16 +320,16 @@ fn global_edit_needs_one_supported_object() {
|
||||
let t = NodeId(s.execute("text.create", &json!({"x": 50, "y": 500, "text": "Hi"})).unwrap()["id"].as_u64().unwrap());
|
||||
sel(&mut s, &[t]);
|
||||
assert!(matches!(s.execute("select.globalEdit", &json!({})), Err(EngineError::Disabled(..))), "type");
|
||||
let lone = rect(&mut s, 0.0, 500.0, 30.0, 70.0);
|
||||
// A copy turned a quarter turn (70 × 30) is not taken: rotated copies are not matched, and the
|
||||
// message says so.
|
||||
let turned = rect(&mut s, 200.0, 500.0, 30.0, 70.0);
|
||||
sel(&mut s, &[turned]);
|
||||
s.execute("object.rotate", &json!({"angle": 90})).unwrap();
|
||||
// A reflected copy is not taken, and the message says so.
|
||||
let lone = kite(&mut s, 0.0, 500.0, 1.0);
|
||||
let mirrored = kite(&mut s, 200.0, 500.0, 1.0);
|
||||
sel(&mut s, &[mirrored]);
|
||||
s.execute("object.reflect", &json!({"axis": "vertical"})).unwrap();
|
||||
sel(&mut s, &[lone]);
|
||||
let e = s.execute("select.globalEdit", &json!({})).unwrap_err().to_string();
|
||||
assert!(e.contains("no similar objects") && e.contains("rotated"), "{e}");
|
||||
assert!(e.contains("no similar objects") && e.contains("reflected copies are not matched") && !e.contains("rotated"), "{e}");
|
||||
assert!(s.doc().unwrap().global_edit.is_none());
|
||||
assert!(crate::cmd::globaledit::highlights(&s).is_empty(), "and it is not highlighted");
|
||||
// A group holding type is not offered, though another such group exists.
|
||||
let group = |s: &mut Session, x: f64| {
|
||||
let p = rect(s, x, 100.0, 10.0, 10.0);
|
||||
@@ -851,3 +851,159 @@ fn groups_nested_as_deep_as_a_document_allows_are_edited_together() {
|
||||
s.execute("paint.setFill", &json!({"color": "#12ab34"})).unwrap();
|
||||
assert_eq!(fill(&s, other_inner), "#12ab34");
|
||||
}
|
||||
|
||||
/// A four-sided path with no symmetry, `k` times the size, its box's top left near (`x`, `y`): a
|
||||
/// 30 × 70 rectangle whose first anchor is moved.
|
||||
fn kite(s: &mut Session, x: f64, y: f64, k: f64) -> NodeId {
|
||||
let id = rect(s, x, y, 30.0 * k, 70.0 * k);
|
||||
s.execute("select.anchors", &json!({"id": id.0, "anchors": [[0, 0]]})).unwrap();
|
||||
s.execute("path.moveAnchors", &json!({"dx": 10.0 * k, "dy": -20.0 * k})).unwrap();
|
||||
id
|
||||
}
|
||||
|
||||
/// Rotate `id` by `deg` (counter-clockwise) about the centre of its box → that rotation.
|
||||
fn rotate(s: &mut Session, id: NodeId, deg: f64) -> Affine {
|
||||
let c = bounds(s, id).center();
|
||||
sel(s, &[id]);
|
||||
s.execute("object.rotate", &json!({"angle": deg})).unwrap();
|
||||
Affine::rotate_about(-deg.to_radians(), c)
|
||||
}
|
||||
|
||||
/// A kite at the origin side of the page, a copy of it turned a quarter turn, and a copy at half
|
||||
/// the size turned by 30° → the three and the transforms that lay the first on the other two.
|
||||
fn turned_kites(s: &mut Session) -> ([NodeId; 3], [Affine; 2]) {
|
||||
let a = kite(s, 0.0, 100.0, 1.0);
|
||||
let (b, c) = (kite(s, 200.0, 100.0, 1.0), kite(s, 400.0, 100.0, 0.5));
|
||||
let quarter = rotate(s, b, 90.0) * Affine::translate((200.0, 0.0));
|
||||
let small = rotate(s, c, 30.0) * Affine::translate((400.0, 100.0)) * Affine::scale(0.5) * Affine::translate((0.0, -100.0));
|
||||
assert!(placed(s, a, b, quarter) && placed(s, a, c, small), "the copies as made");
|
||||
([a, b, c], [quarter, small])
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn start_global_edit_takes_rotated_copies_and_an_edit_reaches_each_turned_by_its_angle() {
|
||||
let mut s = session();
|
||||
let ([a, b, c], [quarter, small]) = turned_kites(&mut s);
|
||||
sel(&mut s, &[a]);
|
||||
assert_eq!(crate::cmd::globaledit::highlights(&s).len(), 2, "both are highlighted before the start");
|
||||
assert_eq!(s.execute("select.globalEditOptions", &json!({})).unwrap()["count"], 3);
|
||||
assert_eq!(start(&mut s, a, json!({})), [a, b, c]);
|
||||
let before = (*s.doc().unwrap().doc).clone();
|
||||
let steps = s.doc().unwrap().history.undo.len();
|
||||
// An anchor moved on the selected kite moves on each copy along the copy's own directions.
|
||||
s.execute("select.anchors", &json!({"id": a.0, "anchors": [[0, 1]]})).unwrap();
|
||||
s.execute("path.moveAnchors", &json!({"dx": 12, "dy": 5})).unwrap();
|
||||
assert!(placed(&s, a, b, quarter), "the quarter-turned copy");
|
||||
assert!(placed(&s, a, c, small), "the smaller copy turned by 30°");
|
||||
assert!(!placed(&s, a, b, Affine::translate((200.0, 0.0))), "the copy is still turned");
|
||||
assert_eq!(s.doc().unwrap().history.undo.len(), steps + 1, "one undo step");
|
||||
crate::tests_large_edits::undo_gives_back(&mut s, &before);
|
||||
// A move of the whole kite to the right moves the quarter-turned copy up (counter-clockwise).
|
||||
sel(&mut s, &[a]);
|
||||
let was = bounds(&s, b);
|
||||
s.execute("object.move", &json!({"dx": 10, "dy": 0})).unwrap();
|
||||
let now = bounds(&s, b);
|
||||
assert!((now.x0 - was.x0).abs() < 1e-6 && (now.y0 - (was.y0 - 10.0)).abs() < 1e-6, "{was:?} → {now:?}");
|
||||
assert!(placed(&s, a, b, quarter) && placed(&s, a, c, small), "each copy lies on the kite as before");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_rotated_copy_leads_an_edit_as_any_other_member_does() {
|
||||
let mut s = session();
|
||||
let ([a, b, c], [quarter, small]) = turned_kites(&mut s);
|
||||
// Started on the turned copy, and edited from the smaller one.
|
||||
assert_eq!(start(&mut s, b, json!({})), [b, a, c]);
|
||||
s.execute("select.anchors", &json!({"id": c.0, "anchors": [[0, 2]]})).unwrap();
|
||||
s.execute("path.moveAnchors", &json!({"dx": 3, "dy": -4})).unwrap();
|
||||
assert!(placed(&s, a, b, quarter) && placed(&s, a, c, small));
|
||||
// A fill reaches the turned copies as it is.
|
||||
s.execute("paint.setFill", &json!({"color": "#12ab34"})).unwrap();
|
||||
assert_eq!((fill(&s, a), fill(&s, b)), ("#12ab34".to_string(), "#12ab34".to_string()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn size_takes_a_rotated_copy_of_the_same_size_and_other_shapes_stay_out() {
|
||||
let mut s = session();
|
||||
let ([a, b, c], _) = turned_kites(&mut s);
|
||||
// A quarter-turned copy is 70 × 30 by its box: it has the size of the 30 × 70 kite all the same.
|
||||
assert_eq!(start(&mut s, a, json!({"size": true})), [a, b], "not the half-size copy {c}");
|
||||
s.execute("select.globalEdit", &json!({})).unwrap();
|
||||
// A copy turned and then stretched, and one whose anchor was moved, are other shapes.
|
||||
let stretched = kite(&mut s, 0.0, 300.0, 1.0);
|
||||
rotate(&mut s, stretched, 30.0);
|
||||
s.execute("object.scale", &json!({"sx": 150, "sy": 100})).unwrap();
|
||||
let bent = kite(&mut s, 200.0, 300.0, 1.0);
|
||||
rotate(&mut s, bent, 45.0);
|
||||
s.execute("select.anchors", &json!({"id": bent.0, "anchors": [[0, 2]]})).unwrap();
|
||||
s.execute("path.moveAnchors", &json!({"dx": 1, "dy": 0})).unwrap();
|
||||
// A copy turned by half a turn and by a full turn in two steps.
|
||||
let half = kite(&mut s, 400.0, 300.0, 1.0);
|
||||
rotate(&mut s, half, 180.0);
|
||||
let full = kite(&mut s, 600.0, 300.0, 1.0);
|
||||
rotate(&mut s, full, 135.0);
|
||||
rotate(&mut s, full, 225.0);
|
||||
assert_eq!(start(&mut s, a, json!({})), [a, b, c, half, full], "not the stretched {stretched} nor the bent {bent}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_square_whose_anchors_were_turned_is_a_rotated_copy() {
|
||||
let mut s = session();
|
||||
let [a, b, ..] = squares(&mut s);
|
||||
let turn = rotate(&mut s, b, 90.0) * Affine::translate((300.0, 0.0));
|
||||
assert_eq!(start(&mut s, a, json!({})).len(), 3, "the turned square is still taken, with the small one");
|
||||
// The first anchor of the turned square lies at another corner, and that is the one that moves.
|
||||
s.execute("select.anchors", &json!({"id": a.0, "anchors": [[0, 0]]})).unwrap();
|
||||
s.execute("path.moveAnchors", &json!({"dx": 10, "dy": 30})).unwrap();
|
||||
assert!(placed(&s, a, b, turn));
|
||||
assert!(!placed(&s, a, b, Affine::translate((300.0, 0.0))));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rotated_groups_are_like_the_group_and_an_edit_inside_one_reaches_the_others_turned() {
|
||||
let mut s = session();
|
||||
let (g, [sq, dot, _]) = card(&mut s, 0.0, 1.0);
|
||||
let (copy, [csq, cdot, cbar]) = card(&mut s, 300.0, 1.0);
|
||||
let turn = rotate(&mut s, copy, 90.0) * Affine::translate((300.0, 0.0));
|
||||
// The same three objects, each turned in place: not the group turned as a whole.
|
||||
let (apart, objects) = card(&mut s, 500.0, 1.0);
|
||||
for id in objects {
|
||||
rotate(&mut s, id, 90.0);
|
||||
}
|
||||
assert_eq!(start(&mut s, g, json!({})), [g, copy], "not the group {apart} whose objects were turned one by one");
|
||||
sel(&mut s, &[dot]);
|
||||
s.execute("paint.setFill", &json!({"color": "#12ab34"})).unwrap();
|
||||
assert_eq!(fill(&s, cdot), "#12ab34");
|
||||
sel(&mut s, &[sq]);
|
||||
s.execute("object.setBounds", &json!({"height": 20, "reference": 0})).unwrap();
|
||||
assert!(placed(&s, sq, csq, turn), "the square in the turned group is halved along the group's own direction");
|
||||
assert_eq!(kids(&s, copy), [csq, cdot, cbar], "each object keeps its id");
|
||||
s.execute("select.globalEdit", &json!({})).unwrap();
|
||||
// An object inside one group takes the object at its place in the turned group, as the
|
||||
// objects of rotated copies of a group are edited together.
|
||||
assert_eq!(start(&mut s, sq, json!({})), [sq, csq]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_rotated_symbol_instance_is_taken_and_a_reflected_one_is_not() {
|
||||
let mut s = session();
|
||||
let r = rect(&mut s, 0.0, 0.0, 40.0, 40.0);
|
||||
let first = NodeId(s.execute("symbol.new", &json!({"ids": [r.0], "name": "Tile"})).unwrap()["id"].as_u64().unwrap());
|
||||
let place =
|
||||
|s: &mut Session, x: f64| NodeId(s.execute("symbol.place", &json!({"name": "Tile", "x": x, "y": 300})).unwrap()["id"].as_u64().unwrap());
|
||||
let (turned, mirrored) = (place(&mut s, 200.0), place(&mut s, 400.0));
|
||||
sel(&mut s, &[turned]);
|
||||
s.execute("object.rotate", &json!({"angle": 30, "origin": [220, 320]})).unwrap();
|
||||
sel(&mut s, &[mirrored]);
|
||||
s.execute("object.reflect", &json!({"axis": "vertical", "origin": [420, 320]})).unwrap();
|
||||
assert_eq!(start(&mut s, first, json!({})), [first, turned], "not the reflected instance {mirrored}");
|
||||
let xf = |s: &Session, id: NodeId| match node(s, id).kind {
|
||||
NodeKind::SymbolInstance { xf, .. } => xf,
|
||||
_ => panic!("not an instance"),
|
||||
};
|
||||
let was = xf(&s, turned);
|
||||
s.execute("object.move", &json!({"dx": 10, "dy": 0})).unwrap();
|
||||
// The instance turned by 30° counter-clockwise moves along its own direction.
|
||||
let moved = Affine::rotate((-30f64).to_radians()) * Point::new(10.0, 0.0);
|
||||
let (now, want) = (xf(&s, turned).as_coeffs(), (Affine::translate(moved.to_vec2()) * was).as_coeffs());
|
||||
assert!(now.iter().zip(want).all(|(p, q)| (p - q).abs() < 1e-6), "{now:?} vs {want:?}");
|
||||
}
|
||||
|
||||
@@ -6170,7 +6170,7 @@ axis Y Axis Y osa
|
||||
@plural Result: {n}|Results: {n} Rezultat: {n}|Rezultati: {n}|Rezultati: {n}
|
||||
@msg select one object odaberite jedan objekat
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them Globalno uređivanje radi na putanjama, složenim putanjama, instancama simbola i njihovim grupama
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again nisu pronađeni slični objekti (rotirane ili zrcaljene kopije se ne podudaraju); promijenite opcije globalnog uređivanja i pokušajte ponovo
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again nisu pronađeni slični objekti (zrcaljene kopije se ne podudaraju); promijenite opcije globalnog uređivanja i pokušajte ponovo
|
||||
@msg Global Edit is off Globalno uređivanje je isključeno
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out iz globalnog uređivanja može se isključiti samo objekt koji nije onaj od kojeg je počelo
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all ili raspon poput 1, 3-5, a ne {v}
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -5866,7 +5866,7 @@ digits Malayalam Malaiàlam
|
||||
@msg no segment {segment} on line {line} no hi ha el segment {segment} a la línia {line}
|
||||
@msg no selected slice in the image: select slices, or save all of them no hi ha cap tall seleccionat a la imatge: seleccioneu talls o deseu-los tots
|
||||
@msg no selection bounds no hi ha límits de selecció
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again no s’ha trobat cap objecte similar (les còpies girades o reflexades no coincideixen); canvieu les opcions d’edició global i torneu-ho a provar
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again no s’ha trobat cap objecte similar (les còpies reflexades no coincideixen); canvieu les opcions d’edició global i torneu-ho a provar
|
||||
@msg Global Edit is off L’edició global no està activa
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out només es pot excloure un objecte de l’edició global que no sigui aquell amb què va començar
|
||||
@msg no slice selected no hi ha cap tall seleccionat
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -6674,7 +6674,7 @@ axis Y Axis osa Y
|
||||
@plural Result: {n}|Results: {n} Výsledek: {n}|Výsledky: {n}|Výsledky: {n}
|
||||
@msg select one object vyberte jeden objekt
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them Globální úpravy pracují s cestami, složenými cestami, instancemi symbolů a jejich skupinami
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again nebyly nalezeny žádné podobné objekty (otočené a zrcadlené kopie se nevyhledávají); změňte možnosti globálních úprav a zkuste to znovu
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again nebyly nalezeny žádné podobné objekty (zrcadlené kopie se nevyhledávají); změňte možnosti globálních úprav a zkuste to znovu
|
||||
@msg Global Edit is off Globální úpravy nejsou zapnuté
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out z globálních úprav lze vyřadit jen jiný objekt než ten, od kterého začaly
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all nebo rozsah, například 1, 3-5, ne {v}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6266,7 +6266,7 @@ axis Y Axis Y-Achse
|
||||
@plural Result: {n}|Results: {n} Ergebnis: {n}|Ergebnisse: {n}
|
||||
@msg select one object wählen Sie ein Objekt aus
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them Globale Bearbeitung funktioniert mit Pfaden, zusammengesetzten Pfaden, Symbolinstanzen und Gruppen daraus
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again keine ähnlichen Objekte gefunden (gedrehte oder gespiegelte Kopien werden nicht erkannt); ändern Sie die Optionen für globale Bearbeitung und versuchen Sie es erneut
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again keine ähnlichen Objekte gefunden (gespiegelte Kopien werden nicht erkannt); ändern Sie die Optionen für globale Bearbeitung und versuchen Sie es erneut
|
||||
@msg Global Edit is off Globale Bearbeitung ist nicht aktiv
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out nur ein Objekt der globalen Bearbeitung außer dem, mit dem sie begonnen hat, kann ausgeschlossen werden
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all oder ein Bereich wie 1, 3-5, nicht {v}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6626,7 +6626,7 @@ axis Y Axis Άξονας Y
|
||||
@plural Result: {n}|Results: {n} Αποτέλεσμα: {n}|Αποτελέσματα: {n}
|
||||
@msg select one object επιλέξτε ένα αντικείμενο
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them Η καθολική επεξεργασία λειτουργεί σε διαδρομές, σύνθετες διαδρομές, παρουσίες συμβόλων και ομάδες τους
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again δεν βρέθηκαν παρόμοια αντικείμενα (τα περιστραμμένα ή κατοπτρισμένα αντίγραφα δεν εντοπίζονται)· αλλάξτε τις επιλογές καθολικής επεξεργασίας και δοκιμάστε ξανά
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again δεν βρέθηκαν παρόμοια αντικείμενα (τα κατοπτρισμένα αντίγραφα δεν εντοπίζονται)· αλλάξτε τις επιλογές καθολικής επεξεργασίας και δοκιμάστε ξανά
|
||||
@msg Global Edit is off Η καθολική επεξεργασία δεν είναι ενεργή
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out μπορεί να εξαιρεθεί μόνο ένα αντικείμενο της καθολικής επεξεργασίας εκτός από εκείνο με το οποίο ξεκίνησε
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all ή ένα εύρος όπως 1, 3-5, όχι {v}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6617,7 +6617,7 @@ axis Y Axis Eje Y
|
||||
@plural Result: {n}|Results: {n} Resultado: {n}|Resultados: {n}
|
||||
@msg select one object seleccione un objeto
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them La edición global funciona con trazados, trazados compuestos, instancias de símbolos y grupos de ellos
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again no se encontraron objetos similares (las copias giradas o reflejadas no coinciden); cambie las opciones de edición global e inténtelo de nuevo
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again no se encontraron objetos similares (las copias reflejadas no coinciden); cambie las opciones de edición global e inténtelo de nuevo
|
||||
@msg Global Edit is off La edición global no está activa
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out solo se puede excluir un objeto de la edición global distinto de aquel con el que empezó
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all o un intervalo como 1, 3-5, no {v}
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -6704,7 +6704,7 @@ axis Y Axis Y-akseli
|
||||
@plural Result: {n}|Results: {n} Tulos: {n}|Tulokset: {n}
|
||||
@msg select one object valitse yksi objekti
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them Yleismuokkaus toimii poluille, yhdistelmäpoluille, symbolien esiintymille ja niiden ryhmille
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again samankaltaisia objekteja ei löytynyt (kierrettyjä tai peilattuja kopioita ei tunnisteta); muuta yleismuokkauksen asetuksia ja yritä uudelleen
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again samankaltaisia objekteja ei löytynyt (peilattuja kopioita ei tunnisteta); muuta yleismuokkauksen asetuksia ja yritä uudelleen
|
||||
@msg Global Edit is off Yleismuokkaus ei ole käynnissä
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out yleismuokkauksesta voi jättää pois vain muun objektin kuin sen, josta se alkoi
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all tai alue, kuten 1, 3-5, ei {v}
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -6669,7 +6669,7 @@ axis Y Axis Axe Y
|
||||
@plural Result: {n}|Results: {n} Résultat : {n}|Résultats : {n}
|
||||
@msg select one object sélectionnez un seul objet
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them La modification globale s’applique aux tracés, aux tracés transparents, aux occurrences de symboles et aux groupes de ces objets
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again aucun objet similaire trouvé (les copies pivotées ou symétriques ne sont pas reconnues) ; modifiez les options de modification globale et réessayez
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again aucun objet similaire trouvé (les copies symétriques ne sont pas reconnues) ; modifiez les options de modification globale et réessayez
|
||||
@msg Global Edit is off La modification globale n’est pas active
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out seul un objet de la modification globale autre que celui à partir duquel elle a commencé peut être exclu
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards` : all ou une plage telle que 1, 3-5, et non {v}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -7413,7 +7413,7 @@ antiAlias Sharp शार्प
|
||||
@msg no selected slice in the image: select slices, or save all of them इमेज में कोई सिलेक्टेड स्लाइस नहीं: स्लाइस सिलेक्ट करें, या सभी स्लाइस सेव करें
|
||||
@msg no selection bounds कोई सिलेक्शन सीमा नहीं
|
||||
@msg no series {i} कोई श्रृंखला {i}
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again कोई समान ऑब्जेक्ट नहीं पाया (घूर्णित या परिलक्षित प्रतियां मिलान नहीं की जाती हैं); वैश्विक संपादन ऑप्शन्स बदलें और फिर से प्रयास करें
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again कोई समान ऑब्जेक्ट नहीं पाया (परिलक्षित प्रतियां मिलान नहीं की जाती हैं); वैश्विक संपादन ऑप्शन्स बदलें और फिर से प्रयास करें
|
||||
@msg no slice {n} in the image (see slice.list) इमेज में कोई स्लाइस {n} नहीं है (slice.list देखें)
|
||||
@msg no slice selected सिलेक्टेड कोई स्लाइस नहीं
|
||||
@msg no source art कोई स्रोत कला
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6657,7 +6657,7 @@ axis Y Axis Y tengely
|
||||
@plural Result: {n}|Results: {n} Eredmény: {n}
|
||||
@msg select one object jelöljön ki egy objektumot
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them A globális szerkesztés útvonalakon, összetett útvonalakon, szimbólumpéldányokon és ezek csoportjain működik
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again nem található hasonló objektum (az elforgatott vagy tükrözött másolatok nem számítanak egyezésnek); módosítsa a globális szerkesztés beállításait, és próbálja újra
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again nem található hasonló objektum (a tükrözött másolatok nem számítanak egyezésnek); módosítsa a globális szerkesztés beállításait, és próbálja újra
|
||||
@msg Global Edit is off A globális szerkesztés nincs bekapcsolva
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out a globális szerkesztésből csak a kiindulási objektumtól eltérő objektum zárható ki
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all vagy egy tartomány, például 1, 3-5, nem {v}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6300,7 +6300,7 @@ axis Y Axis Asse Y
|
||||
@plural Result: {n}|Results: {n} Risultato: {n}|Risultati: {n}
|
||||
@msg select one object selezionate un oggetto
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them La modifica globale funziona su tracciati, tracciati composti, istanze di simboli e gruppi di essi
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again nessun oggetto simile trovato (le copie ruotate o riflesse non vengono riconosciute); cambiate le opzioni di modifica globale e riprovate
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again nessun oggetto simile trovato (le copie riflesse non vengono riconosciute); cambiate le opzioni di modifica globale e riprovate
|
||||
@msg Global Edit is off La modifica globale non è attiva
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out si può escludere solo un oggetto della modifica globale diverso da quello da cui è partita
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all o un intervallo come 1, 3-5, non {v}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -8170,7 +8170,7 @@ axis Y Axis Y 軸
|
||||
@plural Result: {n}|Results: {n} 結果: {n}
|
||||
@msg select one object オブジェクトを 1 つ選択してください
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them グローバル編集はパス、複合パス、シンボルインスタンスとそれらのグループに使用できます
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again 類似するオブジェクトが見つかりません(回転または反転したコピーは一致しません)。グローバル編集オプションを変更してもう一度試してください
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again 類似するオブジェクトが見つかりません(反転したコピーは一致しません)。グローバル編集オプションを変更してもう一度試してください
|
||||
@msg Global Edit is off グローバル編集はオフです
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out 除外できるのは、グローバル編集を開始したオブジェクト以外のオブジェクトだけです
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all または 1, 3-5 のような範囲を指定してください ({v} ではなく)
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6625,7 +6625,7 @@ axis Y Axis Y ღერძი
|
||||
@plural Result: {n}|Results: {n} შედეგი: {n}
|
||||
@msg select one object მონიშნეთ ერთი ობიექტი
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them გლობალური რედაქტირება მუშაობს ტრაექტორიებზე, შედგენილ ტრაექტორიებზე, სიმბოლოს ეგზემპლარებსა და მათ ჯგუფებზე
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again მსგავსი ობიექტები ვერ მოიძებნა (შემობრუნებული ან არეკლილი ასლები არ ემთხვევა); შეცვალეთ გლობალური რედაქტირების პარამეტრები და სცადეთ ხელახლა
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again მსგავსი ობიექტები ვერ მოიძებნა (არეკლილი ასლები არ ემთხვევა); შეცვალეთ გლობალური რედაქტირების პარამეტრები და სცადეთ ხელახლა
|
||||
@msg Global Edit is off გლობალური რედაქტირება გამორთულია
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out გლობალური რედაქტირებიდან შეიძლება გამოირიცხოს მხოლოდ ობიექტი, რომლითაც ის არ დაწყებულა
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all ან დიაპაზონი, მაგალითად 1, 3-5, და არა {v}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6261,7 +6261,7 @@ axis Y Axis Y축
|
||||
@plural Result: {n}|Results: {n} 결과: {n}
|
||||
@msg select one object 개체 하나를 선택하십시오
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them 전체 편집은 패스, 컴파운드 패스, 심볼 인스턴스 및 이들의 그룹에서 작동합니다
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again 유사한 개체를 찾을 수 없습니다(회전하거나 반사한 복사본은 일치하지 않습니다). 전체 편집 옵션을 변경한 후 다시 시도하십시오
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again 유사한 개체를 찾을 수 없습니다(반사한 복사본은 일치하지 않습니다). 전체 편집 옵션을 변경한 후 다시 시도하십시오
|
||||
@msg Global Edit is off 전체 편집이 꺼져 있습니다
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out 전체 편집을 시작한 개체가 아닌 전체 편집의 개체만 제외할 수 있습니다
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all 또는 1, 3-5 같은 범위여야 합니다({v}이(가) 아님)
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -475,7 +475,7 @@
|
||||
@msg “{name}” › {label}: {e} „{name}” › {label}: {e}
|
||||
@msg the module doesn't have the SHA-256 `hash` gives: nothing was installed de module heeft niet de SHA-256 die `hash` opgeeft: er is niets geïnstalleerd
|
||||
@msg select one object selecteer één object
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again geen vergelijkbare objecten gevonden (gedraaide of gespiegelde kopieën worden niet herkend); wijzig de Opties voor globale bewerking en probeer het opnieuw
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again geen vergelijkbare objecten gevonden (gespiegelde kopieën worden niet herkend); wijzig de Opties voor globale bewerking en probeer het opnieuw
|
||||
@msg Global Edit is off Globale bewerking staat uit
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out alleen een ander object van de globale bewerking dan het object waarmee die begon, kan worden weggelaten
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all of een bereik zoals 1, 3-5, niet {v}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6529,7 +6529,7 @@ axis Y Axis Oś Y
|
||||
@plural Result: {n}|Results: {n} Wynik: {n}|Wyniki: {n}|Wyniki: {n}
|
||||
@msg select one object zaznacz jeden obiekt
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them Edycja globalna działa na ścieżkach, ścieżkach złożonych, wystąpieniach symboli i ich grupach
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again nie znaleziono podobnych obiektów (obrócone i odbite kopie nie są dopasowywane); zmień opcje edycji globalnej i spróbuj ponownie
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again nie znaleziono podobnych obiektów (odbite kopie nie są dopasowywane); zmień opcje edycji globalnej i spróbuj ponownie
|
||||
@msg Global Edit is off Edycja globalna jest wyłączona
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out z edycji globalnej można wykluczyć tylko obiekt inny niż ten, od którego się zaczęła
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all lub zakres, np. 1, 3-5, a nie {v}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6589,7 +6589,7 @@ axis Y Axis Eixo Y
|
||||
@plural Result: {n}|Results: {n} Resultado: {n}|Resultados: {n}
|
||||
@msg select one object selecione um objeto
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them A edição global funciona com demarcadores, demarcadores compostos, instâncias de símbolos e grupos deles
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again nenhum objeto semelhante encontrado (cópias giradas ou refletidas não são correspondidas); altere as opções de edição global e tente novamente
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again nenhum objeto semelhante encontrado (cópias refletidas não são correspondidas); altere as opções de edição global e tente novamente
|
||||
@msg Global Edit is off A edição global está desativada
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out só é possível deixar fora da edição global um objeto diferente daquele com que ela começou
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all ou um intervalo como 1, 3-5, não {v}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6285,7 +6285,7 @@ axis Y Axis Ось Y
|
||||
@plural Result: {n}|Results: {n} Результат: {n}|Результаты: {n}|Результаты: {n}
|
||||
@msg select one object выберите один объект
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them Глобальное редактирование работает с контурами, составными контурами, экземплярами символов и их группами
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again похожие объекты не найдены (повёрнутые или отражённые копии не учитываются); измените параметры глобального редактирования и повторите попытку
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again похожие объекты не найдены (отражённые копии не учитываются); измените параметры глобального редактирования и повторите попытку
|
||||
@msg Global Edit is off Глобальное редактирование выключено
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out исключить из глобального редактирования можно только объект, отличный от того, с которого оно началось
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all или диапазон, например 1, 3-5, а не {v}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6654,7 +6654,7 @@ axis Y Axis Y-axel
|
||||
@plural Result: {n}|Results: {n} Resultat: {n}|Resultat: {n}
|
||||
@msg select one object markera ett objekt
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them Global redigering fungerar på banor, sammansatta banor, symbolinstanser och grupper av dem
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again inga liknande objekt hittades (roterade eller speglade kopior matchas inte); ändra alternativen för global redigering och försök igen
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again inga liknande objekt hittades (speglade kopior matchas inte); ändra alternativen för global redigering och försök igen
|
||||
@msg Global Edit is off Global redigering är inte aktiv
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out bara ett annat objekt än det som den globala redigeringen började med kan uteslutas
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all eller ett intervall som 1, 3-5, inte {v}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6747,7 +6747,7 @@ axis Y Axis Y ekseni
|
||||
@plural Result: {n}|Results: {n} Sonuç: {n}
|
||||
@msg select one object bir nesne seçin
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them Genel düzenleme yollar, bileşik yollar, sembol örnekleri ve bunların grupları üzerinde çalışır
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again benzer nesne bulunamadı (döndürülmüş veya yansıtılmış kopyalar eşleşmez); Genel Düzenleme Seçeneklerini değiştirip yeniden deneyin
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again benzer nesne bulunamadı (yansıtılmış kopyalar eşleşmez); Genel Düzenleme Seçeneklerini değiştirip yeniden deneyin
|
||||
@msg Global Edit is off Genel düzenleme kapalı
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out yalnızca genel düzenlemenin başladığı nesne dışındaki bir nesne düzenlemenin dışında bırakılabilir
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all ya da 1, 3-5 gibi bir aralık olmalı, {v} değil
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 5 and column 25.
|
@@ -6280,7 +6280,7 @@ axis Y Axis Вісь Y
|
||||
@plural Result: {n}|Results: {n} Результат: {n}|Результати: {n}|Результати: {n}
|
||||
@msg select one object виберіть один об’єкт
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them Глобальне редагування працює з контурами, складеними контурами, екземплярами символів та їхніми групами
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again схожих об’єктів не знайдено (повернуті чи віддзеркалені копії не враховуються); змініть параметри глобального редагування та спробуйте ще раз
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again схожих об’єктів не знайдено (віддзеркалені копії не враховуються); змініть параметри глобального редагування та спробуйте ще раз
|
||||
@msg Global Edit is off Глобальне редагування вимкнено
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out виключити з глобального редагування можна лише об’єкт, відмінний від того, з якого воно почалося
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all або діапазон, наприклад 1, 3-5, а не {v}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6281,7 +6281,7 @@ axis Y Axis Trục Y
|
||||
@plural Result: {n}|Results: {n} Kết quả: {n}
|
||||
@msg select one object hãy chọn một đối tượng
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them Chỉnh sửa toàn cục hoạt động trên đường dẫn, đường dẫn phức hợp, phiên bản biểu tượng và nhóm của chúng
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again không tìm thấy đối tượng tương tự (các bản sao đã xoay hoặc lật không được tính); hãy thay đổi tùy chọn chỉnh sửa toàn cục rồi thử lại
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again không tìm thấy đối tượng tương tự (các bản sao đã lật không được tính); hãy thay đổi tùy chọn chỉnh sửa toàn cục rồi thử lại
|
||||
@msg Global Edit is off Chỉnh sửa toàn cục đang tắt
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out chỉ có thể loại khỏi chỉnh sửa toàn cục một đối tượng khác với đối tượng mà nó bắt đầu
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`: all hoặc một phạm vi như 1, 3-5, không phải {v}
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 204 and column 5.
|
@@ -6513,7 +6513,7 @@ axis Y Axis Y 轴
|
||||
@plural Result: {n}|Results: {n} 结果:{n}
|
||||
@msg select one object 请选择一个对象
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them 全局编辑适用于路径、复合路径、符号实例及其编组
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again 未找到相似对象(旋转或镜像的副本不会匹配);请更改全局编辑选项后重试
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again 未找到相似对象(镜像的副本不会匹配);请更改全局编辑选项后重试
|
||||
@msg Global Edit is off 全局编辑未开启
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out 只能从全局编辑中排除起始对象以外的对象
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`:应为 all 或 1, 3-5 这样的范围,而不是 {v}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -6320,7 +6320,7 @@ axis Y Axis Y 軸
|
||||
@plural Result: {n}|Results: {n} 結果:{n}
|
||||
@msg select one object 請選取一個物件
|
||||
@msg Global Edit works on paths, compound paths, symbol instances and groups of them 整體編輯適用於路徑、複合路徑、符號實體及其群組
|
||||
@msg no similar objects found (rotated or reflected copies are not matched); change the Global Edit Options and try again 找不到相似的物件(旋轉或鏡像的副本不會相符);請變更整體編輯選項後再試一次
|
||||
@msg no similar objects found (reflected copies are not matched); change the Global Edit Options and try again 找不到相似的物件(鏡像的副本不會相符);請變更整體編輯選項後再試一次
|
||||
@msg Global Edit is off 整體編輯未開啟
|
||||
@msg only an object of the Global Edit other than the one it started from can be left out 只能從整體編輯中排除起始物件以外的物件
|
||||
@msg `artboards`: all or a range such as 1, 3-5, not {v} `artboards`:應為 all 或 1, 3-5 這類範圍,而不是 {v}
|
||||
|
||||
|
Can't render this file because it is too large.
|
+4
-2
@@ -634,6 +634,9 @@ macOS cursor delivery (#2292) is narrowed to a native host adapter using the exi
|
||||
made to an object inside it at the object in the same place ([public source](https://helpx.adobe.com/illustrator/desktop/manage-objects/edit-objects/edit-groups-with-similar-objects.html));
|
||||
a group that holds type or an image is not taken, as Global Edit does not take images or text
|
||||
([public source](https://helpx.adobe.com/illustrator/desktop/manage-objects/edit-objects/edit-similar-objects.html));
|
||||
rotated copies of the object or group are taken too, and an edit reaches each turned by its angle
|
||||
([public source](https://helpx.adobe.com/vn_vi/illustrator/how-to/modern-logo-design.html); reflected copies are not
|
||||
taken, VectorCraft's own rule);
|
||||
with one such object or group selected with the Selection tool, the objects Start Global Edit would take are
|
||||
highlighted on the canvas before it starts (`selecting_one_object_highlights_the_similar_objects_before_global_edit_starts`);
|
||||
dynamic symbols (#4938): Symbol Options › Symbol Type (Dynamic Symbol / Static Symbol; `type` on
|
||||
@@ -679,8 +682,7 @@ macOS cursor delivery (#2292) is narrowed to a native host adapter using the exi
|
||||
painted with the texture effects; User Defined; Other Library…; `graphicStyle.libraries`,
|
||||
`graphicStyle.addFromLibrary`).
|
||||
- **Missing:** more built-in brush libraries beyond the eight shipped (and further graphic-style libraries beyond the ten shipped, and further symbol libraries beyond Basic
|
||||
Shapes, UI Frames, Map Markers, Inventory Icons, Skill Icons and Weather Icons; original, generated in code, never Adobe's); dynamic symbols' `.ai` read and write;
|
||||
Global Edit of rotated copies as matches.
|
||||
Shapes, UI Frames, Map Markers, Inventory Icons, Skill Icons and Weather Icons; original, generated in code, never Adobe's); dynamic symbols' `.ai` read and write.
|
||||
- **Estimate:** 4–14 h.
|
||||
|
||||
## G3 3D and Materials
|
||||
|
||||
+16
-4
@@ -2771,11 +2771,11 @@ nearest to the pointer.
|
||||
## Global Edit
|
||||
|
||||
Select › Start Global Edit is `select.globalEdit {appearance?, size?, artboards?, includeCanvas?}`. With one path,
|
||||
compound path or symbol instance selected, it finds the objects of the same shape (moved or scaled copies; not rotated
|
||||
ones), among those `select.all` would take and the objects in their groups, and returns `{active: true, count, ids}`,
|
||||
compound path or symbol instance selected, it finds the objects of the same shape (moved, scaled or rotated copies;
|
||||
not reflected ones), among those `select.all` would take and the objects in their groups, and returns `{active: true, count, ids}`,
|
||||
the selected object first (at most 10,000). With a group of such objects selected (nested groups and clipping paths
|
||||
included; not type or images), it finds the groups like it: as many objects, in the same order, each of the same
|
||||
shape, lying the same way relative to each other (the group moved or scaled as a whole). While Global Edit is off,
|
||||
shape, lying the same way relative to each other (the group moved, scaled or rotated as a whole). While Global Edit is off,
|
||||
the command is disabled for any other selection, including a group that holds type, an image or nothing (it is off in
|
||||
the Select menu, the Properties panel's Quick Actions do not show it, and the Control bar does not show its Global Edit
|
||||
Options). `appearance` also asks for
|
||||
@@ -2784,7 +2784,9 @@ the same fill and stroke (for groups, of each object in them), `size` for the sa
|
||||
params come from `select.globalEditOptions` (the Global Edit Options, kept for the session; it returns them with
|
||||
`count`, the objects a start would take now). The selection stays the one object. Until the next `select.globalEdit`
|
||||
(Stop Global Edit, `{active: false}`), what an edit of a selected match changed is given to the other matches, in the
|
||||
same undo step, and nothing else. A changed outline or anchors go to each match in proportion to its size. A changed
|
||||
same undo step, and nothing else. A changed outline or anchors go to each match in proportion to its size, and to a
|
||||
rotated copy turned by its angle: an anchor moved to the right on the selected object moves upward on a copy rotated
|
||||
a quarter turn counter-clockwise. A changed
|
||||
opacity or blending, and each changed setting of a fill or stroke (paint, weight, opacity, blending, effects…), are
|
||||
copied as they are to the match's fill or stroke of the same kind and rank; its other fills and strokes, and their
|
||||
unchanged settings, stay its own (a stroke weight change leaves the fills). A stroke weight set on the selected match
|
||||
@@ -2800,6 +2802,16 @@ nothing. Nothing of it is saved. Before Global Edit starts, while one object tha
|
||||
selected with the Selection tool, the canvas highlights the other objects a start would take with the current Global
|
||||
Edit Options (none while a drag is in progress, or when there are none).
|
||||
|
||||
Rotated copies are edited together as in [Design a modern geometric
|
||||
logo](https://helpx.adobe.com/vn_vi/illustrator/how-to/modern-logo-design.html), where copies of a group rotated
|
||||
around a point are edited at once from one of their objects. These rules for them are VectorCraft's own. A copy's
|
||||
angle is the one that lays each anchor and handle of the selected object on the copy's anchor and handle of the same
|
||||
order, so a square whose anchors were turned a quarter turn is a copy rotated a quarter turn. The copy is the same
|
||||
shape when, laid so, every anchor and handle lies within a millionth of the larger side of the copy's box of its own. A
|
||||
reflected copy is another shape, and so is a copy stretched along one direction. With `size`, a rotated copy has the
|
||||
same size when it is the selected object rotated without scaling: a 30 × 70 pt object and its copy rotated a quarter
|
||||
turn (70 × 30 pt by its box) have the same size.
|
||||
|
||||
`select.globalEditExclude {id}` leaves the match `id` out of the Global Edit, as a Shift-click on a highlighted match
|
||||
(or on an object inside it) with the Selection tool does: it is no longer highlighted, and later edits leave it as it
|
||||
is. It returns `{active, count, ids}`, the objects left in the Global Edit; with fewer than two left, the Global Edit
|
||||
|
||||
@@ -646,6 +646,7 @@ since 2026-10-01.
|
||||
- **Global Edit Options in the Control bar:** while Select › Start Global Edit can run, the Control bar shows a Global Edit Options dropdown that opens the same options as the Properties panel's (Match: Appearance, Size; On Artboards; Include Objects On Canvas; Result(s)); both set the same options. The dropdown is off while Global Edit is on; it sits after Recolor Artwork, ahead of the X/Y/W/H fields ([Edit similar objects globally](https://helpx.adobe.com/illustrator/desktop/manage-objects/edit-objects/edit-similar-objects.html)). Regression test: `the_control_bar_shows_the_global_edit_options` in `crates/ui-egui/src/chrome/tests.rs`.
|
||||
- **Global Edit's enabled check on large paths:** the check that decides whether Select › Start Global Edit can run on the selected path, compound path or symbol instance (which the Control bar makes every frame) measures the box of its anchors and handles instead of building and normalizing a copy of every anchor, with the same answer. On a 200,000-anchor path the check takes 0.7 ms instead of 2.2 to 3.0 ms. Regression tests: `support_*` in `crates/engine/src/cmd/globaledit.rs`.
|
||||
- **Start Global Edit is offered only for a group it can start on:** with a group selected, Select › Start Global Edit is disabled, and the Properties panel's Quick Actions and the Control bar do not offer it or its options, when the group holds type, an image or nothing, at any depth; the check walks the group's objects the same way, stopping at the first one Global Edit does not take. This is VectorCraft's own rule. Regression test: `start_global_edit_is_offered_only_for_a_group_of_supported_objects` in `crates/engine/src/tests/globaledit.rs`.
|
||||
- **Global Edit takes rotated copies:** Select › Start Global Edit on an object or group also takes its rotated copies, with the highlights before the start and the options' Results count, and an edit reaches each copy turned by its angle, as copies of a group rotated around a point are edited at once ([Design a modern geometric logo](https://helpx.adobe.com/vn_vi/illustrator/how-to/modern-logo-design.html)). Under VectorCraft's own rules, a copy's angle is the one that lays the selected object's anchors and handles on the copy's in order, each within a millionth of the larger side of the copy's box; a reflected copy is not taken; and with Size, a rotated copy has the same size when it is the object rotated without scaling. Regression tests: `start_global_edit_takes_rotated_copies_*`, `a_rotated_copy_leads_*`, `size_takes_a_rotated_copy_*`, `a_square_whose_anchors_were_turned_*`, `rotated_groups_are_like_the_group_*` and `a_rotated_symbol_instance_*` in `crates/engine/src/tests/globaledit.rs`.
|
||||
- **Control bar's inline X, Y, W and H fields fit the bar:** the Control bar shows the inline X, Y, W and H fields only when all four, their labels as drawn in the current language and the W/H link fit inside the bar's margin; otherwise it shows the Transform link alone. This is VectorCraft's own layout rule. Regression test: `the_control_bar_shows_the_inline_transform_fields_only_when_they_fit` in `crates/ui-egui/src/chrome/tests.rs`.
|
||||
- **Control bar docks to the top or the bottom, or floats:** the Control bar's panel menu, at the bar's right end, has Dock to Top and Dock to Bottom, the edge in use checked and neither while the bar floats. Dragging the bar's gripper and releasing it within 24 points of the top (under the menu bar) or the bottom of the window docks it at that edge, with a band along that edge while it moves; releasing it farther from both edges floats the bar there, with its outline under the pointer while it moves, and a floating bar's gripper moves it or docks it again (`window.control.dock {edge: "top"|"bottom"|"float"}`), as the help page describes ([Control panel overview](https://helpx.adobe.com/illustrator/desktop/get-started/learn-the-basics/control-panel-overview.html)). Escape cancels a gripper drag. The 24-point zones, the floating bar's 800-point width and first position, a release outside the window leaving the bar where it was, a window too short for a floating bar docking it at the nearer edge, the floating bar staying inside a window that shrinks, and keeping the edge and the floating position with the workspace, with older workspaces docking the bar at their edge, are VectorCraft's own rules. Regression tests: `the_control_bar_panel_menu_docks_it_to_the_top_or_the_bottom`, `dragging_the_control_bar_gripper_docks_it_at_the_nearer_edge`, `dragging_the_control_bar_gripper_away_from_both_edges_floats_it`, `floating_control_bar_moves_and_redocks_from_each_edge`, `floating_control_bar_menu_docks_to_either_edge`, `control_bar_drag_escape_restores_placement`, `control_bar_drag_release_outside_window_keeps_previous_placement`, `floating_control_bar_stays_reachable_in_tiny_and_resized_windows`, `the_control_bar_dock_command_takes_top_bottom_or_float` and `menus_stop_above_a_control_bar_docked_at_the_bottom` in `crates/ui-egui/src/chrome/tests.rs`, `saved_workspaces_restore_the_control_bar_edge` and `saved_workspaces_restore_floating_control_bar_position` in `crates/ui-egui/src/workspaces.rs`.
|
||||
- **Control bar panel menu turns groups of options on or off:** the Control bar's panel menu lists the bar's groups of options (Snapping, Anchor Points, Tool Options, Object Options, Image Options, Fill and Stroke, Opacity, Graphic Style, Character, Paragraph, Vertical Alignment, Align and Distribute, Transform, Artboard Options and Document Options) above Dock to Top and Dock to Bottom, each checked while it is on; a click turns that group off or on (`window.control.options {group, visible?}`), and a group that is off stays out of the bar even while its tool or object is selected, as the help page describes ([Control panel overview](https://helpx.adobe.com/illustrator/desktop/get-started/learn-the-basics/control-panel-overview.html)). The list of groups and what each holds, every group on to start, a group that is off leaving its room to the groups after it, and keeping the groups with the preferences and the workspace are VectorCraft's own rules. Regression tests: `the_control_bar_panel_menu_turns_each_group_on_or_off`, `the_control_bar_keeps_its_label_and_menu_with_every_group_off`, `the_control_bar_panel_menu_scrolls_in_a_short_window`, `the_control_bar_options_command_turns_a_group_on_or_off`, `groups_that_are_off_leave_their_room_to_the_later_groups`, `the_artboard_tool_s_control_bar_follows_its_two_groups` and `the_anchor_points_group_holds_convert_and_anchors` in `crates/ui-egui/src/chrome/tests.rs`, `the_image_options_group_holds_the_image_and_trace_controls` in `crates/ui-egui/src/tests/place.rs`, `the_character_and_paragraph_groups_hold_the_type_controls` in `crates/ui-egui/src/panels/paragraph/tests.rs`, `saved_workspaces_restore_the_control_bar_groups` in `crates/ui-egui/src/workspaces.rs`.
|
||||
|
||||
+1
-1
@@ -419,7 +419,7 @@ next unit in the order a right-click on a ruler lists them, from Feet back to Po
|
||||
| Actions panel: Delete Selection (bottom bar) deletes the selected set with its actions and keeps the other sets ([Actions panel overview](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/actions-panel-overview.html)) | partial | `ui.actionSet.delete`; `panels/actions.rs` tests. VectorCraft's own rules, which the overview does not cover: deleting a set asks first (a selected action is still deleted at once), Shift-click on a set's name selects a range of sets, ≡ › Delete does the same as the button, and Default Actions and the last set can be deleted. Undo does not restore a deleted set, and recorded commands cannot be selected or deleted |
|
||||
| Actions panel: ≡ › Duplicate copies the selected action or set ([Actions panel overview](https://helpx.adobe.com/illustrator/desktop/automate-visualize-data/automate-actions/actions-panel-overview.html)) | partial | `ui.actionSet.duplicate`; `panels/actions.rs` tests. VectorCraft's own rules, which the overview does not cover: the copy goes right after the original, is named after it with " copy" added and is selected, and a copied set holds copies of all its actions. Undo does not remove the copy, and recorded commands cannot be duplicated |
|
||||
| Properties panel per context (every selection type's Quick Actions) | partial | one clip group: Edit Clipping Path and Edit Contents, at the top of the panel rather than in Quick Actions (G1); the overview's additional controls ([Properties panel overview](https://helpx.adobe.com/illustrator/desktop/get-started/learn-the-basics/properties-panel-overview.html)): Blend Options (one blend selected, with any tool, #4817), Repeat Options (one radial, grid or mirror repeat selected: Object › Repeat › Options, #5181; the overview does not list it) and Merge Live Paint (a Live Paint group with more) in Quick Actions, the Width Profile list (Width tool or a variable-width stroke) and an applied effect's Delete icon in Appearance, Corner and Corner Radius for corners selected with Direct Selection; Variable Font was already there; Edit Artboards: a Transform section (reference point, X, Y, W, H, preset, orientation) above the Artboards section (#5219) |
|
||||
| Select › Start Global Edit / Stop Global Edit; Properties › Quick Actions with the Global Edit Options popover (Match: Appearance, Size; On Artboards: All Artboards or a range, Include Objects On Canvas; Result(s)); Escape stops it; the matched objects are highlighted in their layer colour while it runs; a Shift-click on a highlighted match leaves it out | partial | #3521, `select.globalEdit` / `select.globalEditOptions` / `select.globalEditExclude`, `crates/engine/src/tests/globaledit.rs`; paths, compound paths, symbol instances and groups of them (similar groups, #4939: edits inside one group reach the same object in the others; [public source](https://helpx.adobe.com/illustrator/desktop/manage-objects/edit-objects/edit-groups-with-similar-objects.html)); a group holding type or an image is not taken, as Global Edit does not take images or text; Shift-click to leave a match out ([public source](https://helpx.adobe.com/ph_fil/illustrator/how-to/global-editing-sensei.html)); the Control bar's Global Edit Options dropdown opens the same options; the matches are highlighted before the start (`selecting_one_object_highlights_the_similar_objects_before_global_edit_starts`); rotated copies remain ([public source](https://helpx.adobe.com/illustrator/desktop/manage-objects/edit-objects/edit-similar-objects.html)) |
|
||||
| Select › Start Global Edit / Stop Global Edit; Properties › Quick Actions with the Global Edit Options popover (Match: Appearance, Size; On Artboards: All Artboards or a range, Include Objects On Canvas; Result(s)); Escape stops it; the matched objects are highlighted in their layer colour while it runs; a Shift-click on a highlighted match leaves it out | partial | #3521, `select.globalEdit` / `select.globalEditOptions` / `select.globalEditExclude`, `crates/engine/src/tests/globaledit.rs`; paths, compound paths, symbol instances and groups of them (similar groups, #4939: edits inside one group reach the same object in the others; [public source](https://helpx.adobe.com/illustrator/desktop/manage-objects/edit-objects/edit-groups-with-similar-objects.html)); a group holding type or an image is not taken, as Global Edit does not take images or text; Shift-click to leave a match out ([public source](https://helpx.adobe.com/ph_fil/illustrator/how-to/global-editing-sensei.html)); the Control bar's Global Edit Options dropdown opens the same options; the matches are highlighted before the start (`selecting_one_object_highlights_the_similar_objects_before_global_edit_starts`); rotated copies are matched and take an edit turned by their angle ([public source](https://helpx.adobe.com/vn_vi/illustrator/how-to/modern-logo-design.html); `start_global_edit_takes_rotated_copies_and_an_edit_reaches_each_turned_by_its_angle`); reflected copies are not matched (VectorCraft's own rule) |
|
||||
| Contextual task bar | done | |
|
||||
| Control bar with Transform and Stroke popovers | done | |
|
||||
| Stroke panel: custom arrowheads after the built-in ones in both arrowhead menus, from the arrowheads file that the panel menu's Edit Arrowheads… opens; saving the file reloads the menus, and a stroke keeps a copy of its custom head's art | done | [Apply stroke on an object](https://helpx.adobe.com/illustrator/using/stroke-object.html) (Customize arrowheads); the file's layout (one symbol per head, pointing right, tip at the registration point, height drawn as wide as the built-in heads) is VectorCraft's own; `stroke.arrowheads.edit`, `stroke.arrowheads.list`, `stroke.arrowheads.reload`, `stroke.set` `{custom: name}`; engine `tests::arrowheads`, `stroke::tests_arrows::custom_heads_draw_their_own_art_at_the_tip` |
|
||||
|
||||
Reference in New Issue
Block a user