mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-22 10:23:16 +01:00
Swatch libraries: colors a pattern brings skip the library's other names
A global or spot color that a library pattern's art brings under a
numbered name no longer takes a name the library gives another swatch.
Before, adding a pattern whose art uses "Ink" to a document with another
"Ink" brought the color as "Ink 2" even when the library has its own
"Ink 2"; adding that library swatch next then came in as "Ink 2 2". The
brought color now takes the next free name the library does not use
("Ink 3"), and every paint linked to it follows the new name, so adding
the library's "Ink 2" next adds it under its own name and adding both
again adds nothing.
A color the pattern's art brings or takes is the color a library tint
or gradient links to only when it has the library color's paint and its
process, global or spot kind, as for the other lookups in the same add.
The test a_numbered_copy_named_like_another_library_color_is_found now
makes the blue "Ink 2" itself, as an earlier version's pattern add left
it, since a pattern add no longer gives that name.
This commit is contained in:
1 parent
a71de2dd7a
commit
ff26d5e4a3
4 files changed
+106
-18
No files matched your search
@@ -49,7 +49,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Add to Swatches",
|
||||
["Window", "Swatch Libraries"],
|
||||
None,
|
||||
"{library: id or name, names?: [swatch or colour group names in the library] (default: all of it; a group comes as a colour group, a single swatch ungrouped), apply?: \"fill\"|\"stroke\" (also apply the first one to the selection and the defaults, as paint.setFill / paint.setStroke), focus?: true (with apply: false keeps the active proxy)} copy library swatches into the document as one undo step. A swatch the document already has (same name and paint, and for a color the same process, global or spot kind, or a numbered copy of that name with the same color when the name has another color there) isn't added again; a name taken by another swatch gets a number (\"Clay 1 2\"); a tint or gradient whose global or spot color comes in under a numbered name, or is in the document as such a numbered copy, links to that copy; a global or spot color it links to that the document lacks comes in with it. A pattern swatch brings its pattern, as pasting art painted with it does: the same pattern the document has is used, also when its art links to the document's own color of a name, and a name another pattern or swatch has gets a number; a global or spot color its art links to whose name the document gives another color comes in numbered, and the pattern links to it → {library, added: [names in the document, the colors patterns, tints and gradients brought included], existing: [names already there], applied?: name}",
|
||||
"{library: id or name, names?: [swatch or colour group names in the library] (default: all of it; a group comes as a colour group, a single swatch ungrouped), apply?: \"fill\"|\"stroke\" (also apply the first one to the selection and the defaults, as paint.setFill / paint.setStroke), focus?: true (with apply: false keeps the active proxy)} copy library swatches into the document as one undo step. A swatch the document already has (same name and paint, and for a color the same process, global or spot kind, or a numbered copy of that name with the same color when the name has another color there) isn't added again; a name taken by another swatch gets a number (\"Clay 1 2\"); a tint or gradient whose global or spot color comes in under a numbered name, or is in the document as such a numbered copy, links to that copy; a global or spot color it links to that the document lacks comes in with it. A pattern swatch brings its pattern, as pasting art painted with it does: the same pattern the document has is used, also when its art links to the document's own color of a name, and a name another pattern or swatch has gets a number; a global or spot color its art links to whose name the document gives another color comes in numbered, skipping the names of the library's other swatches, and the pattern links to it → {library, added: [names in the document, the colors patterns, tints and gradients brought included], existing: [names already there], applied?: name}",
|
||||
has_doc,
|
||||
add
|
||||
),
|
||||
@@ -1023,6 +1023,30 @@ fn free_copy_in(taken: &mut HashSet<String>, base: &str, reserved: impl Fn(&str)
|
||||
name
|
||||
}
|
||||
|
||||
/// Rename each swatch of `d` that `colors` lists (library name, document name) under a numbered
|
||||
/// name that `reserved` says the library gives another swatch, to a free numbered name of its own
|
||||
/// ([`free_copy_in`]), and link every paint linked to it to the new name. A later add then finds
|
||||
/// the library's swatch of that name under its own name.
|
||||
fn rename_brought(d: &mut vectorcraft_doc::Document, colors: &mut patternlib::SwatchNames, reserved: impl Fn(&str) -> bool) {
|
||||
let mut taken = taken_names(d);
|
||||
for (from, to) in colors.iter_mut() {
|
||||
if from == to || !reserved(to) {
|
||||
continue;
|
||||
}
|
||||
let new = free_copy_in(&mut taken, from, &reserved);
|
||||
let Some(w) = d.swatches_iter_mut().find(|w| w.name == *to) else { continue };
|
||||
w.name = new.clone();
|
||||
map_swatch_links(d, &mut |_, link, _| {
|
||||
let hit = link.as_deref() == Some(to.as_str());
|
||||
if hit {
|
||||
*link = Some(new.clone());
|
||||
}
|
||||
hit
|
||||
});
|
||||
*to = new;
|
||||
}
|
||||
}
|
||||
|
||||
/// Link the swatches of `d` that `pending` names (document name, library swatch) to their colors
|
||||
/// under the names `links` gives them, for each whose colors `links` names now. Those leave
|
||||
/// `pending` and are returned.
|
||||
@@ -1363,11 +1387,14 @@ fn add(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
let waited = |n: &&str| !links.contains_key(*n) && brings.contains(*n);
|
||||
// A global or spot color the pattern brought, or took from the document under
|
||||
// a numbered name: library name → document name. A color this call picks is
|
||||
// added under its own name instead of the one the pattern took.
|
||||
// added under its own name instead of the one the pattern took. A library global
|
||||
// or spot color is only a document color of its paint and kind, as for `base_of`.
|
||||
let colors_of = |d: &vectorcraft_doc::Document, colors: &[(String, String)], took: &[(String, String)]| {
|
||||
let mut out: HashMap<String, String> = HashMap::new();
|
||||
for (from, to) in colors.iter().chain(took.iter().filter(|(from, _)| !picked_names.contains(from.as_str()))) {
|
||||
if d.swatch(to).is_some_and(|x| x.global || x.spot) {
|
||||
let library = lib_by_name.get(from.as_str()).filter(|b| b.global || b.spot);
|
||||
let fits = |x: &Swatch| (x.global || x.spot) && library.is_none_or(|b| x.paint == b.paint && same_kind(x, b));
|
||||
if d.swatch(to).is_some_and(fits) {
|
||||
out.entry(from.clone()).or_insert_with(|| to.clone());
|
||||
}
|
||||
}
|
||||
@@ -1377,7 +1404,8 @@ fn add(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
let mut learned = vec![];
|
||||
if pending.iter().any(|(_, w)| linked_names(&w.paint).iter().any(waited)) {
|
||||
let mut probe = d.clone();
|
||||
let (_, colors, took) = patternlib::import(&mut probe, src, pattern)?;
|
||||
let (_, mut colors, took) = patternlib::import(&mut probe, src, pattern)?;
|
||||
rename_brought(&mut probe, &mut colors, |n| lib_by_name.contains_key(n));
|
||||
for (from, to) in colors_of(&probe, &colors, &took) {
|
||||
if let std::collections::hash_map::Entry::Vacant(e) = links.entry(from.clone()) {
|
||||
e.insert(to);
|
||||
@@ -1387,7 +1415,10 @@ fn add(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
}
|
||||
let settled = settle(d, &mut pending, &links);
|
||||
let had = taken_names(d);
|
||||
let (target, colors, took) = patternlib::import(d, src, pattern)?;
|
||||
let (target, mut colors, took) = patternlib::import(d, src, pattern)?;
|
||||
// A color the art brought under a numbered name the library gives another
|
||||
// swatch takes a free one instead.
|
||||
rename_brought(d, &mut colors, |n| lib_by_name.contains_key(n));
|
||||
// Those colors are the ones the library's tints of them link to, unless the
|
||||
// document already has one for them. A name the copy gave that the import
|
||||
// into the document did not give is replaced, and the tints linked to it are
|
||||
|
||||
@@ -959,25 +959,18 @@ fn a_tint_linked_to_a_copy_the_library_names_is_not_another_colors_tint() {
|
||||
}
|
||||
|
||||
/// A numbered copy of a color's name that the library also has as a swatch of another color is
|
||||
/// still the copy of the color: adding the color after a pattern brought it under that name adds
|
||||
/// no other copy.
|
||||
/// still the copy of the color: adding the color to a document that has such a copy (as a pattern
|
||||
/// added by an earlier version left it) adds no other copy.
|
||||
#[test]
|
||||
fn a_numbered_copy_named_like_another_library_color_is_found() {
|
||||
let mut s = session();
|
||||
run(&mut s, "swatch.new", json!({"name": "Ink", "color": "#0000ff", "global": true}));
|
||||
run(&mut s, "swatch.new", json!({"name": "Ink 2", "color": "#00ff00", "global": true}));
|
||||
let dot = run(&mut s, "shape.rectangle", json!({"x": 0, "y": 0, "width": 6, "height": 6}))["id"].clone();
|
||||
run(&mut s, "paint.setFill", json!({"swatch": "Ink", "ids": [dot]}));
|
||||
run(&mut s, "paint.setStroke", json!({"none": true, "ids": [dot]}));
|
||||
run(&mut s, "select.set", json!({"ids": [dot]}));
|
||||
run(&mut s, "object.pattern.make", json!({"name": "Tiles", "width": 8, "height": 8}));
|
||||
run(&mut s, "object.pattern.done", json!({}));
|
||||
let b64 = run(&mut s, "document.serialize", json!({}))["dataBase64"].as_str().unwrap().to_string();
|
||||
let id = run(&mut s, "swatch.library.load", json!({"dataBase64": b64, "name": "Tiles.vectorcraft"}))["library"].clone();
|
||||
let id = run(&mut s, "swatch.library.load", json!({"dataBase64": b64, "name": "Inks.vectorcraft"}))["library"].clone();
|
||||
run(&mut s, "file.new", json!({"width": 100, "height": 100}));
|
||||
run(&mut s, "swatch.new", json!({"name": "Ink", "color": "#ff0000", "global": true}));
|
||||
run(&mut s, "swatch.library.add", json!({"library": id, "names": ["Tiles"]}));
|
||||
assert_eq!(named_after(&s, "Ink"), ["Ink", "Ink 2"]);
|
||||
run(&mut s, "swatch.new", json!({"name": "Ink 2", "color": "#0000ff", "global": true}));
|
||||
let r = run(&mut s, "swatch.library.add", json!({"library": id, "names": ["Ink"]}));
|
||||
assert_eq!((&r["added"], &r["existing"]), (&json!([]), &json!(["Ink 2"])), "{r}");
|
||||
}
|
||||
@@ -1183,6 +1176,69 @@ fn a_library_spot_tint_is_not_a_process_tint_a_pattern_brought() {
|
||||
assert!(doc(&s).swatch(&base).is_some_and(|w| w.spot), "{r}");
|
||||
}
|
||||
|
||||
/// A library tint of a spot color added with a pattern whose art the document holds linked to its
|
||||
/// process color of the spot color's name and paint (as pasting with Merge leaves it) links to a
|
||||
/// spot color, not to that process color, in either pick order.
|
||||
#[test]
|
||||
fn a_library_spot_tint_is_not_linked_to_the_process_color_a_merged_pattern_takes() {
|
||||
let mut s = session();
|
||||
run(&mut s, "swatch.new", json!({"name": "Ink", "color": "#0000ff", "spot": true}));
|
||||
run(&mut s, "swatch.new", json!({"name": "Ink half", "swatch": "Ink", "tint": 50}));
|
||||
let dot = run(&mut s, "shape.rectangle", json!({"x": 0, "y": 0, "width": 6, "height": 6}))["id"].clone();
|
||||
run(&mut s, "paint.setFill", json!({"swatch": "Ink", "ids": [dot]}));
|
||||
run(&mut s, "paint.setStroke", json!({"none": true, "ids": [dot]}));
|
||||
run(&mut s, "select.set", json!({"ids": [dot]}));
|
||||
run(&mut s, "object.pattern.make", json!({"name": "Tiles", "width": 8, "height": 8}));
|
||||
run(&mut s, "object.pattern.done", json!({}));
|
||||
let b64 = run(&mut s, "document.serialize", json!({}))["dataBase64"].as_str().unwrap().to_string();
|
||||
let id = run(&mut s, "swatch.library.load", json!({"dataBase64": b64, "name": "Tiles.vectorcraft"}))["library"].clone();
|
||||
let r = run(&mut s, "shape.rectangle", json!({"x": 0, "y": 0, "width": 40, "height": 40}))["id"].clone();
|
||||
run(&mut s, "paint.setFill", json!({"swatch": "Tiles", "ids": [r]}));
|
||||
run(&mut s, "select.set", json!({"ids": [r]}));
|
||||
run(&mut s, "edit.copy", json!({}));
|
||||
for names in [json!(["Ink half", "Tiles"]), json!(["Tiles", "Ink half"])] {
|
||||
run(&mut s, "file.new", json!({"width": 100, "height": 100}));
|
||||
run(&mut s, "swatch.new", json!({"name": "Ink", "color": "#0000ff", "global": true}));
|
||||
run(&mut s, "edit.paste", json!({"swatchConflict": "merge"}));
|
||||
// The paste merged the spot color into the document's process color of its name.
|
||||
assert_eq!(named_after(&s, "Ink"), ["Ink"], "{names}");
|
||||
assert!(doc(&s).swatch("Ink").is_some_and(|w| w.global && !w.spot), "{names}");
|
||||
run(&mut s, "swatch.delete", json!({"names": ["Tiles"]}));
|
||||
let r = run(&mut s, "swatch.library.add", json!({"library": id, "names": names}));
|
||||
let base = tint_base(&s, "Ink half").unwrap_or_default();
|
||||
assert!(doc(&s).swatch(&base).is_some_and(|w| w.spot), "{names}: {r}");
|
||||
}
|
||||
}
|
||||
|
||||
/// A color a library pattern's art brings under a numbered name does not take a name the library
|
||||
/// gives another swatch: adding that swatch next adds it under its own name, and adding the two
|
||||
/// again adds nothing.
|
||||
#[test]
|
||||
fn a_color_a_pattern_brings_skips_the_librarys_numbered_names() {
|
||||
let mut s = session();
|
||||
run(&mut s, "swatch.new", json!({"name": "Ink", "color": "#0000ff", "global": true}));
|
||||
run(&mut s, "swatch.new", json!({"name": "Ink 2", "color": "#00ff00", "global": true}));
|
||||
let dot = run(&mut s, "shape.rectangle", json!({"x": 0, "y": 0, "width": 6, "height": 6}))["id"].clone();
|
||||
run(&mut s, "paint.setFill", json!({"swatch": "Ink", "ids": [dot]}));
|
||||
run(&mut s, "paint.setStroke", json!({"none": true, "ids": [dot]}));
|
||||
run(&mut s, "select.set", json!({"ids": [dot]}));
|
||||
run(&mut s, "object.pattern.make", json!({"name": "Tiles", "width": 8, "height": 8}));
|
||||
run(&mut s, "object.pattern.done", json!({}));
|
||||
let b64 = run(&mut s, "document.serialize", json!({}))["dataBase64"].as_str().unwrap().to_string();
|
||||
let id = run(&mut s, "swatch.library.load", json!({"dataBase64": b64, "name": "Tiles.vectorcraft"}))["library"].clone();
|
||||
run(&mut s, "file.new", json!({"width": 100, "height": 100}));
|
||||
run(&mut s, "swatch.new", json!({"name": "Ink", "color": "#ff0000", "global": true}));
|
||||
let first = run(&mut s, "swatch.library.add", json!({"library": id, "names": ["Tiles"]}));
|
||||
let brought =
|
||||
first["added"].as_array().and_then(|a| a.iter().filter_map(|n| n.as_str()).find(|n| n.starts_with("Ink"))).unwrap_or_default().to_string();
|
||||
assert!(brought != "Ink 2" && is_global(&s, &brought, "#0000ff"), "{first}");
|
||||
let r = run(&mut s, "swatch.library.add", json!({"library": id, "names": ["Ink 2"]}));
|
||||
assert_eq!(r["added"], json!(["Ink 2"]), "{r}");
|
||||
assert!(is_global(&s, "Ink 2", "#00ff00"), "{r}");
|
||||
let again = run(&mut s, "swatch.library.add", json!({"library": id, "names": ["Tiles", "Ink", "Ink 2"]}));
|
||||
assert_eq!((&again["added"], &again["existing"]), (&json!([]), &json!(["Tiles", brought, "Ink 2"])), "{again}");
|
||||
}
|
||||
|
||||
/// A library tint added without its global color to a document that has no swatch of the color's
|
||||
/// name brings the color along under its own name.
|
||||
#[test]
|
||||
|
||||
+2
-1
@@ -5802,7 +5802,8 @@ From a document, such as a `.ai` or `.eps` swatch library, it reads the colors,
|
||||
in the document's order and color groups; `swatch.library.add` brings a pattern swatch's pattern, with its tile and
|
||||
art, into the document as a pattern swatch under the library swatch's name and in its color group. A global or spot
|
||||
color the pattern's art links to keeps the library's color: when the document gives its name another color, it comes
|
||||
in under a numbered name ("Ink 2") and the pattern links to that. A library color whose name the document gives
|
||||
in under a numbered name ("Ink 2") and the pattern links to that. That numbered name skips the names the library
|
||||
gives its other swatches. A library color whose name the document gives
|
||||
another color is the document's numbered copy of the same color when it has one, so adding the pattern and its color
|
||||
again adds nothing. A pattern the document already holds with its art linked to the document's own color of that name
|
||||
is used as it is. A library tint or gradient whose global or spot color comes in under a numbered name, or is in the
|
||||
|
||||
@@ -2237,7 +2237,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
A symbol instance written as its art, and a blend, mesh, repeat, placed document, intertwine or envelope written as a group of its art, likewise still wraps area type by its bounds when the file is opened, as it did before saving, not by the members of that art: the group starts with the same unpainted rectangle, which takes the object's lock and visibility, and the group keeps the object's name and transparency without options of its own. Area type in that art is above the rectangle, so the rectangle does not wrap it. The rectangle takes its place in the object limit before the art; without room for it, the options are left out with the limit's warning. An object without finite bounds keeps the options on its group. This is VectorCraft's own round-trip rule (`crates/eps/src/ai_editing/tests.rs` `live_art_written_as_a_group_keeps_wrapping_by_its_bounds`, `wrap_bounds_of_live_art_fit_the_object_limit_and_leave_area_type_in_the_art_unwrapped`, `live_art_without_bounds_keeps_its_text_wrap_on_the_group`).
|
||||
In a `.ai` or EPS opened from its editing data, type has its text object's opacity, blend mode and knockout shape flag, whether it is made from the file's text document or taken from the page, and type made from the text document takes its text object's lock. Where such type has transparency and comes in with other art (the rest of its look, or page type and strokes that go with it), a group of them has it. Where the page draws its type, or the strokes around it, with transparency that is neither its text object's nor its text object's combined with that of the objects around it, the page's type and strokes keep their own instead (`crates/eps/src/import/tests_native.rs`). Where the page draws type of no text object over text objects made from the text document, with their words in any case, that type is theirs as the page draws it and is left out; the page's other type of no text object goes only to text objects whose type the text document can't make, or else is left out with a warning.
|
||||
`.ai` editing-data import restores the document's listed graphic styles in panel order and links objects that use a listed style; unsupported appearances keep their drawn look (`crates/eps/src/import/ai/tests.rs`).
|
||||
Swatches › Open Swatch Library › Other Library… lists `.ai` and `.eps` files in its Swatch Libraries filter and loads another document's swatches ([importing swatches from another document](https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=134)): its colors, tints, gradients and pattern swatches, in its order and color groups. Adding a pattern swatch from such a library brings the pattern with its tile and art as a pattern swatch, under the library swatch's name and in its color group. A document with no swatches, and a `.ai` or EPS whose swatches are only the default ones, are refused with a message (`cmd::fileio::tests_aiimport::a_swatch_library_in_a_ai_file_lists_and_adds_its_pattern_swatches`, `a_pattern_from_a_ai_library_keeps_a_color_the_library_lacks`, `swatch_library_documents_without_swatches_or_damaged_are_refused`, `cmd::fileio::tests::the_swatch_library_filter_lists_ai_and_eps_files`). As VectorCraft's own rule, a global or spot color whose name the document gives another color, added from a library on its own, with a tint or with a pattern's art, comes in under a numbered name, and adding it again uses that numbered copy; a library tint or gradient links to it, and brings its color when the document lacks it. Use Library Item adds a library pattern's colors the same way (`tests::swatchlib::adding_a_library_pattern_and_its_color_again_reuses_the_numbered_color`, `a_library_tint_follows_its_color_to_its_numbered_name`, `a_library_tint_added_alone_brings_its_color_beside_a_namesake`, `a_library_tint_picked_before_its_color_follows_it_to_its_numbered_name`, `a_library_gradient_is_not_the_one_a_merged_pattern_brought`, `tests::library::a_pattern_item_keeps_its_global_color_when_the_document_has_that_name_in_another_color`).
|
||||
Swatches › Open Swatch Library › Other Library… lists `.ai` and `.eps` files in its Swatch Libraries filter and loads another document's swatches ([importing swatches from another document](https://help.adobe.com/archive/en_US/illustrator/cs5/illustrator_cs5_help.pdf#page=134)): its colors, tints, gradients and pattern swatches, in its order and color groups. Adding a pattern swatch from such a library brings the pattern with its tile and art as a pattern swatch, under the library swatch's name and in its color group. A document with no swatches, and a `.ai` or EPS whose swatches are only the default ones, are refused with a message (`cmd::fileio::tests_aiimport::a_swatch_library_in_a_ai_file_lists_and_adds_its_pattern_swatches`, `a_pattern_from_a_ai_library_keeps_a_color_the_library_lacks`, `swatch_library_documents_without_swatches_or_damaged_are_refused`, `cmd::fileio::tests::the_swatch_library_filter_lists_ai_and_eps_files`). As VectorCraft's own rule, a global or spot color whose name the document gives another color, added from a library on its own, with a tint or with a pattern's art, comes in under a numbered name that skips the names of the library's other swatches, and adding it again uses that numbered copy; a library tint or gradient links to it, and brings its color when the document lacks it. Use Library Item adds a library pattern's colors the same way (`tests::swatchlib::adding_a_library_pattern_and_its_color_again_reuses_the_numbered_color`, `a_library_tint_follows_its_color_to_its_numbered_name`, `a_library_tint_added_alone_brings_its_color_beside_a_namesake`, `a_library_tint_picked_before_its_color_follows_it_to_its_numbered_name`, `a_library_gradient_is_not_the_one_a_merged_pattern_brought`, `a_color_a_pattern_brings_skips_the_librarys_numbered_names`, `tests::library::a_pattern_item_keeps_its_global_color_when_the_document_has_that_name_in_another_color`).
|
||||
A `.ai` or EPS graphic style library, whose editing data holds the styles and their list but no layers, opens with those styles in list order. Other Library… loads another document's graphic styles ([Apply graphic styles](https://helpx.adobe.com/illustrator/desktop/special-effects-styles/apply-graphic-styles/apply-graphic-styles.html)) and lists such a library's styles in a library panel. A `.ai` or EPS read as its PDF part or page because its layers can't be used also gets the styles of its list in place of the default ones (`crates/eps/src/import/tests_native.rs`, `cmd::fileio::tests_aiimport::a_graphic_style_library_in_a_ai_file_without_layers_loads_its_styles`).
|
||||
A `.ai` or EPS symbol library, whose editing data holds symbol definitions and their list but no layers, opens with those symbols in list order, each with its registration point. Other Library… in the Symbols panel's Symbol Libraries Menu imports the symbols of the file you pick ([Create or import symbol libraries](https://helpx.adobe.com/illustrator/desktop/manage-objects/traces-mockups-symbols/create-or-import-symbol-libraries.html)) and lists such a library's symbols in a library panel. A `.ai` or EPS read as its PDF part or page because its layers can't be used also gets the symbols defined before its layers (`crates/eps/src/import/tests_native.rs`, `crates/eps/src/import/ai/tests.rs`, `cmd::fileio::tests_aiimport::a_symbol_library_in_a_ai_file_without_layers_loads_its_symbols`).
|
||||
In a large canvas `.ai` or EPS ([Large canvas FAQ](https://helpx.adobe.com/illustrator/desktop/add-and-import-files/start-a-new-file/large-canvas-faq.html)), or a `.ai` whose page is in larger units, opened from its editing data, VectorCraft reads the symbol definitions in the same units as the layers. When the file opens at its full size, each symbol's art, strokes and effects are scaled with the layers, and each instance keeps its own scale and rotation and draws where and as large as before. A new instance comes in at the symbol's full size, the size of an instance at 100% in the file. A symbol library from such a file comes in at the same size, and opacity masks on the layers that don't move with their object are scaled with the layers too. Editing data that VectorCraft wrote keeps its symbols and those masks at their own size, as its `.ai` save writes them (`tests_native::a_large_canvas_eps_keeps_its_symbols_at_the_pages_size`, `a_large_canvas_ai_keeps_its_symbols_at_the_pages_size`, `a_large_canvas_ai_vectorcraft_wrote_keeps_its_symbols_at_their_own_size`, `a_symbol_library_in_larger_units_comes_in_at_the_pages_size`, `build::candidate_tests::scaling_the_symbols_keeps_their_instances_in_place`, `scaling_a_read_document_scales_unlinked_opacity_masks`).
|
||||
|
||||
Reference in new issue
Block a user