mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-12 13:33:19 +00:00
Merge pull request #6799 from Hassan1305/docs-6340-followup
Commands: draw_shape and object.reflect say which way they turn (#6340 follow-up)
This commit is contained in:
@@ -52,7 +52,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Reflect…",
|
||||
["Object", "Transform"],
|
||||
None,
|
||||
"{ids?: [id…] (selected first; default: the selection), axis: \"vertical\"|\"horizontal\"|deg, origin?, copy?, objects?: bool (Transform Objects, default true; false: the art stays and, with patterns, only its pattern tiles transform), patterns?: bool (Transform Patterns: pattern fills and strokes transform with the art; default: prefs transformPatternTiles), typeAreas?: bool (area type: the frame is reshaped and the text reflows at its size)}. With anchors selected with Direct Selection (and no copy), only those anchors and their handles transform, about the centre of their own box.",
|
||||
"{ids?: [id…] (selected first; default: the selection), axis: \"vertical\"|\"horizontal\"|deg (the mirror line, counter-clockwise from horizontal; 0: horizontal; omitted: vertical), origin?, copy?, objects?: bool (Transform Objects, default true; false: the art stays and, with patterns, only its pattern tiles transform), patterns?: bool (Transform Patterns: pattern fills and strokes transform with the art; default: prefs transformPatternTiles), typeAreas?: bool (area type: the frame is reshaped and the text reflows at its size)}. With anchors selected with Direct Selection (and no copy), only those anchors and their handles transform, about the centre of their own box.",
|
||||
has_selection,
|
||||
reflect
|
||||
),
|
||||
|
||||
@@ -114,3 +114,12 @@ fn keys_named(doc: &str) -> Vec<String> {
|
||||
}
|
||||
found.into_iter().map(|(k, _)| k).collect()
|
||||
}
|
||||
|
||||
/// Turn notes the key walk above doesn't reach: a numeric reflection axis and the Scatter brush's
|
||||
/// `rotation [a, b]` range, whose head isn't a plain key.
|
||||
#[test]
|
||||
fn turns_outside_plain_keys_say_which_way() {
|
||||
let doc = |id: &str| command_specs().iter().find(|c| c.id == id).map(|c| c.params).unwrap_or_default();
|
||||
assert!(doc("object.reflect").contains("|deg (the mirror line, counter-clockwise from horizontal"), "object.reflect's numeric axis");
|
||||
assert!(doc("brush.options").contains("rotation [a, b] −180..180° (counter-clockwise)"), "the Scatter brush's rotation");
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ pub fn tool_definitions() -> Vec<Value> {
|
||||
"radius1": num("Star outer radius"),
|
||||
"radius2": num("Star inner radius"),
|
||||
"points": {"type": "integer", "minimum": 3, "description": "Star points (default 5)"},
|
||||
"rotation": num("Rotation in degrees clockwise (polygon/star; 0: a corner or point straight up)"),
|
||||
"rotation": num("Rotation in degrees clockwise about the centre (rectangle/ellipse: 0 upright; polygon/star: 0 a corner or point straight up)"),
|
||||
"x1": num("Line start x"),
|
||||
"y1": num("Line start y"),
|
||||
"x2": num("Line end x"),
|
||||
|
||||
Reference in New Issue
Block a user