mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-19 17:05:55 +01:00
Save for Web: double-clicking a color-table swatch shifts that color
Double-clicking an opaque GIF or PNG-8 color-table swatch opens the
Color Picker. Its OK writes that color as the color picked wherever it
appears in the image; Cancel changes nothing. A shifted swatch shows the
original color at its upper left and the new one at its lower right,
with the lock mark. Double-clicking it opens the picker on the original
color, and OK on it takes the shift away. Unshift All Colors in the
table's menu clears shifts and web shifts.
- colorTable.shifted {"#source": "#rrggbb"} carries the shifts by
source color, in the settings, the remembered settings and presets.
A shifted color is kept when reducing, before locked colors, and wins
over Web Shift, Web Snap and Lock; a color mapped to transparent stays
transparent. Bad colors, duplicate keys and more than 256 entries are
refused. The preview marks shifted colors.
- GIF lossy compression compares pixels with the reduction's colors
before the table's edits, so a shifted or web-shifted color does not
take in the pixels of a nearby color.
- Web Shift replaces a shift by hand, Lock stays on for a shifted color,
and Delete Color drops a deleted color's shift.
Docs: docs/mcp.md, docs/target-app-parity.md.
This commit is contained in:
1 parent
c9812414ce
commit
2209a64dc2
34 files changed
+470
-28
No files matched your search
@@ -32,7 +32,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Save for Web",
|
||||
[],
|
||||
None,
|
||||
"{path?, preset?: a webExport.presets name (its settings, then these keys), format?: gif (default)|jpg|png8|png24, reduction?: perceptual|selective (default)|adaptive|web|blackWhite|gray (gif/png8, as the next five), colors?: 128 (2–256), dither?: none|diffusion (default)|pattern|noise, ditherAmount?: 100, webSnap?: 0 (0–100 %: colours that close to a web-safe one become it), lossy?: 0 (0–100, gif), colorTable?: {locked?: [\"#rrggbb\"…] (kept when reducing), transparent?: [\"#rrggbb\"…] (become transparent), webShift?: [\"#rrggbb\"…] (become web-safe), sort?: none|hue|luminance|popularity, deleted?: [\"#rrggbb\"…] (taken out of the table: their pixels take the nearest color left, and at least one color stays), customPalette?: [\"#rrggbb\"…] (a fixed palette used instead of the reduction's, at most `colors` entries; a new reduction without colorTable clears it and deleted)} (colours as the preview's colors[].source; #rrggbbaa and #rgba are refused here and in matte), transparency?: true (gif/png8/png24), matte?: white (default)|black|none|\"#rrggbb\" (what edges blend into; jpg and opaque png24: the background), interlaced?: false (gif/png8/png24), quality?: 60 (jpg: 0–100), progressive?: false (jpg), optimized?: true (jpg), embedProfile?: false (jpg: sRGB profile), width?: px | height?: px | percent?: 100 (the image size, proportional; width wins over height, height over percent), antiAlias?: none|art (default)|type, clipToArtboard?: true (the artboard; false: the art and the slices), artboard?: 0 (0-based), convertToSrgb?: true (PNG files say they are sRGB), metadata?: none|copyright (default)|contact|all (File Info written as PNG text, a GIF or JPEG comment), slices?: all (default)|selected|none (one image per slice: images/<slice name>.<ext>), output?: images (default)|html (an HTML page placing the image or slices, <stem>.html)} → {path, files: [path…], bytes (total), width, height, warnings: [] or [a note that an image couldn't be decoded and is missing from the image]}; no path → {files: [{name, dataBase64}], bytes, width, height, warnings} (names such as page.html, images/page_01.gif). A single image without HTML is written at path itself",
|
||||
"{path?, preset?: a webExport.presets name (its settings, then these keys), format?: gif (default)|jpg|png8|png24, reduction?: perceptual|selective (default)|adaptive|web|blackWhite|gray (gif/png8, as the next five), colors?: 128 (2–256), dither?: none|diffusion (default)|pattern|noise, ditherAmount?: 100, webSnap?: 0 (0–100 %: colours that close to a web-safe one become it), lossy?: 0 (0–100, gif), colorTable?: {locked?: [\"#rrggbb\"…] (kept when reducing), transparent?: [\"#rrggbb\"…] (become transparent), webShift?: [\"#rrggbb\"…] (become web-safe), sort?: none|hue|luminance|popularity, deleted?: [\"#rrggbb\"…] (taken out of the table: their pixels take the nearest color left, and at least one color stays), customPalette?: [\"#rrggbb\"…] (a fixed palette used instead of the reduction's, at most `colors` entries; a new reduction without colorTable clears it and deleted), shifted?: {\"#source\": \"#rrggbb\"…} (each source color is written as the color given, wherever it is in the image; kept when reducing as a locked color is, before the locked ones, while one palette slot is left for the reduction; at most 256; a source the table does not hold shifts nothing; a color shifted to itself is removed; a shifted color is not web-shifted, and a transparent one stays transparent)} (colours as the preview's colors[].source; #rrggbbaa and #rgba are refused here and in matte), transparency?: true (gif/png8/png24), matte?: white (default)|black|none|\"#rrggbb\" (what edges blend into; jpg and opaque png24: the background), interlaced?: false (gif/png8/png24), quality?: 60 (jpg: 0–100), progressive?: false (jpg), optimized?: true (jpg), embedProfile?: false (jpg: sRGB profile), width?: px | height?: px | percent?: 100 (the image size, proportional; width wins over height, height over percent), antiAlias?: none|art (default)|type, clipToArtboard?: true (the artboard; false: the art and the slices), artboard?: 0 (0-based), convertToSrgb?: true (PNG files say they are sRGB), metadata?: none|copyright (default)|contact|all (File Info written as PNG text, a GIF or JPEG comment), slices?: all (default)|selected|none (one image per slice: images/<slice name>.<ext>), output?: images (default)|html (an HTML page placing the image or slices, <stem>.html)} → {path, files: [path…], bytes (total), width, height, warnings: [] or [a note that an image couldn't be decoded and is missing from the image]}; no path → {files: [{name, dataBase64}], bytes, width, height, warnings} (names such as page.html, images/page_01.gif). A single image without HTML is written at path itself",
|
||||
has_doc,
|
||||
export
|
||||
),
|
||||
@@ -41,7 +41,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Save for Web Preview",
|
||||
[],
|
||||
None,
|
||||
"{…the settings of document.exportForWeb (preset?, format?…), slice?: n (1-based, from slice.list; default the whole image), kbps?: 56.6 (connection speed for the download time), image?: false (also the optimised file as dataBase64)} what Save writes for the whole image (or one slice) → {format, width, height, bytes (exactly the file's size), seconds (to download at kbps), kbps, colors?: [{color: \"#rrggbb\", source: \"#rrggbb\" (the colour the reduction made, as colorTable lists it), transparent, locked, webShifted, webSafe}] (gif/png8: the colour table in file order), mappedToTransparent?: [\"#rrggbb\"…], slices: images an export writes, warnings (as document.exportForWeb's), dataBase64?}",
|
||||
"{…the settings of document.exportForWeb (preset?, format?…), slice?: n (1-based, from slice.list; default the whole image), kbps?: 56.6 (connection speed for the download time), image?: false (also the optimised file as dataBase64)} what Save writes for the whole image (or one slice) → {format, width, height, bytes (exactly the file's size), seconds (to download at kbps), kbps, colors?: [{color: \"#rrggbb\", source: \"#rrggbb\" (the colour the reduction made, as colorTable lists it), transparent, locked, webShifted, shifted (by colorTable.shifted; also locked), webSafe}] (gif/png8: the colour table in file order), mappedToTransparent?: [\"#rrggbb\"…], slices: images an export writes, warnings (as document.exportForWeb's), dataBase64?}",
|
||||
has_doc,
|
||||
preview
|
||||
),
|
||||
@@ -331,8 +331,14 @@ pub struct ColorTable {
|
||||
/// A fixed palette (a Custom table) used instead of the reduction's own: the colors of the
|
||||
/// table when the first color was deleted. Empty: the reduction makes the palette.
|
||||
pub custom_palette: Vec<String>,
|
||||
/// Colors shifted by hand: each source color (`#rrggbb`) and the color it is written as. A
|
||||
/// shifted color is locked, and a source the table does not hold shifts nothing.
|
||||
pub shifted: std::collections::BTreeMap<String, String>,
|
||||
}
|
||||
|
||||
/// A color shifted by hand: (source, color written).
|
||||
type Shift = ([u8; 3], [u8; 3]);
|
||||
|
||||
/// The most colours a colour table list holds.
|
||||
const MAX_TABLE: usize = 256;
|
||||
|
||||
@@ -352,6 +358,21 @@ impl ColorTable {
|
||||
list.iter().map(|h| Self::rgb(h).ok_or_else(|| format!("colorTable.{what}: `{h}` is not a colour such as \"#ff8800\""))).collect()
|
||||
}
|
||||
|
||||
/// The colors shifted by hand as (source, color written). An error names a value that is not a
|
||||
/// color such as `#ff8800`, two keys that name one color, or more than 256 entries.
|
||||
fn shifts(&self) -> std::result::Result<Vec<Shift>, String> {
|
||||
// One entry past the limit is enough for `colors` to refuse a longer map.
|
||||
let (keys, values): (Vec<String>, Vec<String>) = self.shifted.iter().take(MAX_TABLE + 1).map(|(k, v)| (k.clone(), v.clone())).unzip();
|
||||
let sources = Self::colors(&keys, "shifted")?;
|
||||
let to = Self::colors(&values, "shifted")?;
|
||||
for (i, (s, k)) in sources.iter().zip(&keys).enumerate() {
|
||||
if sources[..i].contains(s) {
|
||||
return Err(format!("colorTable.shifted: `{k}` names a color another key names"));
|
||||
}
|
||||
}
|
||||
Ok(sources.into_iter().zip(to).collect())
|
||||
}
|
||||
|
||||
/// `h` as RGB; `None` when it is not a color such as `#ff8800`.
|
||||
fn rgb(h: &str) -> Option<[u8; 3]> {
|
||||
vectorcraft_color::Color::from_hex(h).filter(|_| !super::hex_with_alpha(h)).map(|c| {
|
||||
@@ -487,13 +508,18 @@ impl WebSettings {
|
||||
{
|
||||
ColorTable::colors(list, what)?;
|
||||
}
|
||||
// A deleted color is no longer locked, transparent or web-shifted.
|
||||
// A deleted color is no longer locked, transparent, web-shifted or shifted.
|
||||
let deleted = ColorTable::colors(&table.deleted, "deleted")?;
|
||||
if !deleted.is_empty() {
|
||||
for list in [&mut table.locked, &mut table.transparent, &mut table.web_shift] {
|
||||
list.retain(|h| ColorTable::rgb(h).is_none_or(|c| !deleted.contains(&c)));
|
||||
}
|
||||
}
|
||||
// Shifts are kept as `#rrggbb` in lowercase; a color shifted to itself is not shifted, and
|
||||
// a color shifted by hand is not web-shifted.
|
||||
let shifts: Vec<Shift> = table.shifts()?.into_iter().filter(|(s, to)| s != to && !deleted.contains(s)).collect();
|
||||
table.web_shift.retain(|h| ColorTable::rgb(h).is_none_or(|c| !shifts.iter().any(|(s, _)| *s == c)));
|
||||
table.shifted = shifts.into_iter().map(|(s, to)| (hex(s), hex(to))).collect();
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
@@ -640,6 +666,8 @@ pub struct TableColor {
|
||||
pub transparent: bool,
|
||||
pub locked: bool,
|
||||
pub web_shifted: bool,
|
||||
/// Shifted by hand (`colorTable.shifted`): written as `color` instead of `source`.
|
||||
pub shifted: bool,
|
||||
}
|
||||
|
||||
/// An optimised image file.
|
||||
@@ -759,6 +787,11 @@ fn palette_image(rgba: &[u8], w: u32, h: u32, s: &WebSettings, matte: Option<[u8
|
||||
let locked = ColorTable::colors(&table.locked, "locked")?;
|
||||
let to_clear = ColorTable::colors(&table.transparent, "transparent")?;
|
||||
let shift = ColorTable::colors(&table.web_shift, "webShift")?;
|
||||
let by_hand = table.shifts()?;
|
||||
let shifted_to = |src: &[u8; 3]| by_hand.iter().find(|(s, _)| s == src).map(|(_, to)| *to);
|
||||
// A color shifted by hand is kept when the colors are reduced, as a locked one is, and takes
|
||||
// one of the slots kept for them before the locked colors do.
|
||||
let kept: Vec<[u8; 3]> = by_hand.iter().map(|(s, _)| *s).chain(locked.iter().copied()).collect();
|
||||
let o = PaletteOptions {
|
||||
colors: s.colors,
|
||||
reduction: s.reduction,
|
||||
@@ -767,7 +800,7 @@ fn palette_image(rgba: &[u8], w: u32, h: u32, s: &WebSettings, matte: Option<[u8
|
||||
transparency: s.transparency,
|
||||
matte,
|
||||
};
|
||||
let mut ix = reduced(rgba, w, h, s, &o, &locked)?;
|
||||
let mut ix = reduced(rgba, w, h, s, &o, &kept)?;
|
||||
// Map to transparent works on the colours the reduction made.
|
||||
let before = ix.palette.clone();
|
||||
let clear = ix.transparent.map(usize::from);
|
||||
@@ -781,11 +814,23 @@ fn palette_image(rgba: &[u8], w: u32, h: u32, s: &WebSettings, matte: Option<[u8
|
||||
*slot = *c;
|
||||
}
|
||||
}
|
||||
// Web snap, then the colours shifted by hand (locked colours stay as they are).
|
||||
// Lossy compares the pixels with the colors the reduction made, so that a shifted color does
|
||||
// not take in the pixels of another color.
|
||||
if s.format == WebFormat::Gif {
|
||||
web::lossy(&mut ix, rgba, s.lossy);
|
||||
}
|
||||
// The colors shifted by hand, then web shift and web snap (locked colors stay as they are).
|
||||
let clear = ix.transparent.map(usize::from);
|
||||
for (i, c) in ix.palette.iter_mut().enumerate() {
|
||||
let src = sources.get(i).copied().unwrap_or(*c);
|
||||
if Some(i) == clear || locked.contains(&src) {
|
||||
if Some(i) == clear {
|
||||
continue;
|
||||
}
|
||||
if let Some(to) = shifted_to(&src) {
|
||||
*c = to;
|
||||
continue;
|
||||
}
|
||||
if locked.contains(&src) {
|
||||
continue;
|
||||
}
|
||||
if shift.contains(&src) {
|
||||
@@ -794,9 +839,6 @@ fn palette_image(rgba: &[u8], w: u32, h: u32, s: &WebSettings, matte: Option<[u8
|
||||
*c = snapped;
|
||||
}
|
||||
}
|
||||
if s.format == WebFormat::Gif {
|
||||
web::lossy(&mut ix, rgba, s.lossy);
|
||||
}
|
||||
let order = web::sort(&mut ix, table.sort);
|
||||
let sources: Vec<[u8; 3]> = order.iter().map(|&i| sources.get(i).copied().unwrap_or_default()).collect();
|
||||
let colors = ix
|
||||
@@ -804,12 +846,17 @@ fn palette_image(rgba: &[u8], w: u32, h: u32, s: &WebSettings, matte: Option<[u8
|
||||
.iter()
|
||||
.zip(&sources)
|
||||
.enumerate()
|
||||
.map(|(i, (c, src))| TableColor {
|
||||
color: *c,
|
||||
source: *src,
|
||||
transparent: ix.transparent == u8::try_from(i).ok(),
|
||||
locked: locked.contains(src),
|
||||
web_shifted: shift.contains(src),
|
||||
.map(|(i, (c, src))| {
|
||||
let transparent = ix.transparent == u8::try_from(i).ok();
|
||||
let shifted = !transparent && shifted_to(src).is_some();
|
||||
TableColor {
|
||||
color: *c,
|
||||
source: *src,
|
||||
transparent,
|
||||
locked: locked.contains(src) || shifted,
|
||||
web_shifted: shift.contains(src) && !shifted,
|
||||
shifted,
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
Ok(PaletteImage { ix, colors, mapped })
|
||||
@@ -1116,7 +1163,7 @@ fn preview(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
.map(|c| {
|
||||
json!({
|
||||
"color": hex(c.color), "source": hex(c.source), "transparent": c.transparent, "locked": c.locked,
|
||||
"webShifted": c.web_shifted, "webSafe": quantize::web_safe(c.color) == c.color,
|
||||
"webShifted": c.web_shifted, "shifted": c.shifted, "webSafe": quantize::web_safe(c.color) == c.color,
|
||||
})
|
||||
})
|
||||
.collect();
|
||||
|
||||
@@ -539,6 +539,106 @@ fn colour_table_delete_maps_pixels_to_the_nearest_color_left() {
|
||||
assert_eq!(sources(&preview(&mut s, json!({"preset": "No near red"}))), ["#0000ff", "#ff0000"]);
|
||||
}
|
||||
|
||||
/// A color shifted by hand (`colorTable.shifted`) is written as the color picked wherever it is in
|
||||
/// the image, the other colors stay, the table shows it as shifted and locked, and the preview is
|
||||
/// the file.
|
||||
#[test]
|
||||
fn colour_table_shift_writes_the_picked_color_wherever_the_source_is() {
|
||||
let mut s = session(30.0, 10.0);
|
||||
rect(&mut s, [0.0, 0.0, 10.0, 10.0], "#ff0000");
|
||||
rect(&mut s, [10.0, 0.0, 10.0, 10.0], "#0000ff");
|
||||
rect(&mut s, [20.0, 0.0, 10.0, 10.0], "#00ff00");
|
||||
let preview = |s: &mut Session, p: Value| run(s, "document.exportForWeb.preview", p);
|
||||
let entry = |v: &Value, source: &str| v["colors"].as_array().unwrap().iter().find(|c| c["source"] == source).cloned().unwrap_or(Value::Null);
|
||||
for format in ["gif", "png8"] {
|
||||
let p = json!({"format": format, "dither": "none", "colorTable": {"shifted": {"#0000FF": "#FF8800"}}});
|
||||
let v = preview(&mut s, p.clone());
|
||||
let c = entry(&v, "#0000ff");
|
||||
assert_eq!(
|
||||
(c["color"].as_str(), c["shifted"].as_bool(), c["locked"].as_bool(), c["webShifted"].as_bool()),
|
||||
(Some("#ff8800"), Some(true), Some(true), Some(false)),
|
||||
"{format}: {v}"
|
||||
);
|
||||
assert_eq!((entry(&v, "#ff0000")["shifted"].as_bool(), entry(&v, "#ff0000")["color"].as_str()), (Some(false), Some("#ff0000")));
|
||||
let file = one(&mut s, p);
|
||||
assert_eq!(v["bytes"].as_u64(), Some(file.len() as u64), "{format}: the preview is the file");
|
||||
let img = pixels(&file);
|
||||
assert_eq!(
|
||||
(img.get_pixel(5, 5).0, img.get_pixel(12, 2).0, img.get_pixel(18, 8).0, img.get_pixel(25, 5).0),
|
||||
([255, 0, 0, 255], [255, 136, 0, 255], [255, 136, 0, 255], [0, 255, 0, 255]),
|
||||
"{format}"
|
||||
);
|
||||
assert_eq!(distinct(&img), 3, "{format}");
|
||||
}
|
||||
// A shifted color is kept when the colors are reduced, as a locked one is.
|
||||
let two = preview(&mut s, json!({"colors": 2, "dither": "none", "colorTable": {"shifted": {"#00ff00": "#123456"}}}));
|
||||
assert_eq!(entry(&two, "#00ff00")["color"], "#123456", "{two}");
|
||||
// With one slot to keep, the shifted color takes it before a locked one.
|
||||
let p = json!({"colors": 2, "dither": "none", "colorTable": {"locked": ["#ff0000"], "shifted": {"#0000ff": "#123456"}}});
|
||||
let first = preview(&mut s, p);
|
||||
assert_eq!(entry(&first, "#0000ff")["color"], "#123456", "{first}");
|
||||
// A source the table does not hold shifts nothing, and the shift stays with the settings.
|
||||
let base = preview(&mut s, json!({"dither": "none"}));
|
||||
let absent = preview(&mut s, json!({"dither": "none", "colorTable": {"shifted": {"#123456": "#000000"}}}));
|
||||
assert_eq!(absent["colors"], base["colors"]);
|
||||
// Two colors may be shifted to one color and keep their own sources.
|
||||
let same = preview(&mut s, json!({"dither": "none", "colorTable": {"shifted": {"#ff0000": "#123456", "#0000ff": "#123456"}}}));
|
||||
assert_eq!((entry(&same, "#ff0000")["color"].as_str(), entry(&same, "#0000ff")["color"].as_str()), (Some("#123456"), Some("#123456")));
|
||||
assert_eq!(entry(&same, "#00ff00")["shifted"], false);
|
||||
// A shift by hand wins over web shift, web snap and a lock; transparency wins over it.
|
||||
let p =
|
||||
json!({"dither": "none", "webSnap": 100, "colorTable": {"shifted": {"#0000ff": "#fe0101"}, "webShift": ["#0000ff"], "locked": ["#0000ff"]}});
|
||||
let c = entry(&preview(&mut s, p), "#0000ff");
|
||||
assert_eq!((c["color"].as_str(), c["webShifted"].as_bool(), c["locked"].as_bool()), (Some("#fe0101"), Some(false), Some(true)));
|
||||
let clear = json!({"dither": "none", "colorTable": {"shifted": {"#0000ff": "#fe0101"}, "transparent": ["#0000ff"]}});
|
||||
let v = preview(&mut s, clear.clone());
|
||||
assert!(v["colors"].as_array().unwrap().iter().all(|c| c["shifted"] == false), "{v}");
|
||||
assert_eq!(pixels(&one(&mut s, clear)).get_pixel(15, 5).0[3], 0);
|
||||
// The settings keep the shifts in lowercase, drop a color shifted to itself, a deleted one and
|
||||
// the web shift of a color shifted by hand.
|
||||
let table = json!({"shifted": {"#0000FF": "#FE0101", "#FF0000": "#ff0000", "#00ff00": "#000000"}, "webShift": ["#0000ff", "#00ff00"], "deleted": ["#00ff00"]});
|
||||
let r = run(&mut s, "webExport.settings", json!({ "colorTable": table }));
|
||||
let t = &r["settings"]["colorTable"];
|
||||
assert_eq!((&t["shifted"], &t["webShift"]), (&json!({"#0000ff": "#fe0101"}), &json!([])));
|
||||
// Another reduction keeps the shifts; a saved preset keeps them.
|
||||
let r = run(&mut s, "webExport.settings", json!({"reduction": "adaptive"}));
|
||||
assert_eq!(r["settings"]["colorTable"]["shifted"], json!({"#0000ff": "#fe0101"}));
|
||||
run(&mut s, "webExport.presets.save", json!({"name": "Blue to red", "dither": "none", "colorTable": {"shifted": {"#0000ff": "#fe0101"}}}));
|
||||
assert_eq!(entry(&preview(&mut s, json!({"preset": "Blue to red"})), "#0000ff")["color"], "#fe0101");
|
||||
// Bad shifts are refused and change nothing.
|
||||
let many: serde_json::Map<String, Value> = (0..257).map(|i| (format!("#{i:06x}"), json!("#000000"))).collect();
|
||||
for bad in [
|
||||
json!({"nope": "#000000"}),
|
||||
json!({"#ff0000": "nope"}),
|
||||
json!({"#ff0000": "#ff000080"}),
|
||||
json!({"#ff000080": "#000000"}),
|
||||
json!({"#ff0000": "#000000", "#FF0000": "#ffffff"}),
|
||||
json!({"#f00": "#000000", "#ff0000": "#ffffff"}),
|
||||
Value::Object(many),
|
||||
] {
|
||||
let p = json!({"colorTable": {"shifted": bad}});
|
||||
assert!(s.execute("document.exportForWeb", &p).is_err(), "{p}");
|
||||
assert!(s.execute("document.exportForWeb.preview", &p).is_err(), "{p}");
|
||||
assert!(s.execute("webExport.settings", &p).is_err(), "{p}");
|
||||
}
|
||||
assert_eq!(run(&mut s, "webExport.settings", json!({}))["settings"]["colorTable"]["shifted"], json!({"#0000ff": "#fe0101"}));
|
||||
// Settings saved before shifts existed still read.
|
||||
let old: cmd::webexport::WebSettings = serde_json::from_value(json!({"colorTable": {"locked": ["#ff0000"]}})).unwrap();
|
||||
assert!(old.color_table.shifted.is_empty());
|
||||
}
|
||||
|
||||
/// Lossy GIF compression compares the pixels with the colors the reduction made, so a color shifted
|
||||
/// near another one does not take in that color's pixels.
|
||||
#[test]
|
||||
fn lossy_does_not_spread_a_shifted_color_into_another() {
|
||||
let mut s = session(30.0, 10.0);
|
||||
rect(&mut s, [0.0, 0.0, 10.0, 10.0], "#0000ff");
|
||||
rect(&mut s, [10.0, 0.0, 20.0, 10.0], "#c80000");
|
||||
let p = json!({"format": "gif", "dither": "none", "lossy": 100, "colorTable": {"shifted": {"#0000ff": "#be0000"}}});
|
||||
let img = pixels(&one(&mut s, p));
|
||||
assert_eq!((img.get_pixel(5, 5).0, img.get_pixel(20, 5).0, img.get_pixel(29, 5).0), ([190, 0, 0, 255], [200, 0, 0, 255], [200, 0, 0, 255]));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn presets_and_remembered_settings() {
|
||||
let mut s = two_colours();
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
//! as the web image Save writes, beside the original (Original, Optimized, 2-Up and 4-Up views,
|
||||
//! each with its file size and download time), and the settings: format (GIF, JPEG, PNG-8,
|
||||
//! PNG-24), colour reduction, colours, dither, transparency and matte, interlacing, web snap,
|
||||
//! lossy, JPEG quality, the colour table (lock, map to transparent, web shift, sort, Delete Color
|
||||
//! and Restore Generated Table), image size and anti-aliasing, Clip to Artboard, sRGB, metadata,
|
||||
//! lossy, JPEG quality, the colour table (lock, map to transparent, web shift, sort, Delete Color,
|
||||
//! Restore Generated Table, a double-click that shifts a color to one picked in the Color Picker,
|
||||
//! and Unshift All Colors), image size and anti-aliasing, Clip to Artboard, sRGB, metadata,
|
||||
//! slices and HTML output, and presets.
|
||||
//!
|
||||
//! Fields are the `document.exportForWeb` settings (`webExport.settings` gives them; set one with
|
||||
@@ -11,7 +12,8 @@
|
||||
//! `optimized`, `2up`, `4up`), `__zoom` (`fit` or a percentage), `__kbps` (connection speed),
|
||||
//! `__color` (the colour table's selected colour, by source: the one Lock, Transparent and Web
|
||||
//! Shift edit, and where a Shift-click range starts), `__colors` (every selected color, by source,
|
||||
//! which Delete Color deletes; when it is empty, `__color` alone), `__presetName` (shown while saving a
|
||||
//! which Delete Color deletes; when it is empty, `__color` alone), `__editColor` (a source color:
|
||||
//! the Color Picker opens on it, as a double-click on its swatch opens it), `__presetName` (shown while saving a
|
||||
//! preset) and `__hasSlices`. Optimize to File Size… (`__optimizeOpen: true`) shows `__optimizeK` (the desired size in K),
|
||||
//! `__optimizeStart` (`current`, `auto`) and with slices `__optimizeUse` (`allSlices`,
|
||||
//! `eachSlice`, `currentSlice`); `__optimizeGo: true` runs `webExport.optimizeToFileSize` and
|
||||
@@ -533,6 +535,7 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool {
|
||||
{
|
||||
app.status(e);
|
||||
}
|
||||
take_shift(d);
|
||||
let settings = settings_of(app, d);
|
||||
let mut browser = false;
|
||||
ui.horizontal_top(|ui| {
|
||||
@@ -550,6 +553,12 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool {
|
||||
if browser && let Err(e) = app.run("file.saveForWeb.browser", params(d)) {
|
||||
app.status(e);
|
||||
}
|
||||
// A double-clicked swatch (or an agent's `__editColor`) opens the Color Picker last, over the
|
||||
// dialog as it now is.
|
||||
if let Some(source) = d.fields.remove("__editColor").and_then(|v| v.as_str().map(String::from)) {
|
||||
let start = d.fields.remove("__editStart").and_then(|v| v.as_str().map(String::from)).unwrap_or_else(|| source.clone());
|
||||
edit_color(d, &source, &start);
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
@@ -1057,7 +1066,9 @@ fn matte_row(ui: &mut egui::Ui, d: &mut Dialog) {
|
||||
/// ones with a square, web-safe ones with a diamond, transparent ones over the grid), the buttons
|
||||
/// that edit the selected colour, Delete Color and the table's menu, plus the sort order. A click
|
||||
/// selects one color, a Shift-click the colors from the anchor, and a Ctrl-click
|
||||
/// (Command-click on macOS) adds or removes one. Returns an error for a deletion that would leave
|
||||
/// (Command-click on macOS) adds or removes one; a double-click on an opaque color asks for the
|
||||
/// Color Picker (`__editColor`), and a color shifted by hand shows its source color at the upper
|
||||
/// left and its new color at the lower right. Returns an error for a deletion that would leave
|
||||
/// no color.
|
||||
fn color_table(ui: &mut egui::Ui, d: &mut Dialog, s: Option<&WebSettings>) -> Result<(), String> {
|
||||
let t = Tokens::get(ui.ctx());
|
||||
@@ -1086,15 +1097,20 @@ fn color_table(ui: &mut egui::Ui, d: &mut Dialog, s: Option<&WebSettings>) -> Re
|
||||
.colors
|
||||
.iter()
|
||||
.map(|c| (*c, false))
|
||||
.chain(shot.mapped.iter().map(|c| (TableColor { color: *c, source: *c, transparent: true, locked: false, web_shifted: false }, true)))
|
||||
.chain(
|
||||
shot.mapped
|
||||
.iter()
|
||||
.map(|c| (TableColor { color: *c, source: *c, transparent: true, locked: false, web_shifted: false, shifted: false }, true)),
|
||||
)
|
||||
.collect();
|
||||
const CELL: f32 = 15.0;
|
||||
let per_row = ((SIDE_W - 8.0) / (CELL + 2.0)).floor().max(1.0) as usize;
|
||||
let lines = rows.len().div_ceil(per_row).max(1);
|
||||
let (area, resp) = ui.allocate_exact_size(egui::vec2(SIDE_W - 8.0, lines as f32 * (CELL + 2.0)), egui::Sense::click());
|
||||
let (area, _) = ui.allocate_exact_size(egui::vec2(SIDE_W - 8.0, lines as f32 * (CELL + 2.0)), egui::Sense::hover());
|
||||
// The colors that can be selected, in table order (for Shift-click ranges).
|
||||
let order: Vec<String> = rows.iter().filter(|(c, mapped)| !c.transparent || *mapped).map(|(c, _)| hex(c.source)).collect();
|
||||
let mut clicked = None;
|
||||
let mut edit = None;
|
||||
let p = ui.painter();
|
||||
for (i, (c, mapped)) in rows.iter().enumerate() {
|
||||
let r = egui::Rect::from_min_size(
|
||||
@@ -1113,6 +1129,15 @@ fn color_table(ui: &mut egui::Ui, d: &mut Dialog, s: Option<&WebSettings>) -> Re
|
||||
}
|
||||
} else {
|
||||
p.rect_filled(r, 0.0, fill);
|
||||
if c.shifted {
|
||||
// Shifted by hand: the source color at the upper left, the new one at the lower right.
|
||||
let [red, g, b] = c.source;
|
||||
p.add(egui::Shape::convex_polygon(
|
||||
vec![r.left_top(), r.right_top(), r.left_bottom()],
|
||||
egui::Color32::from_rgb(red, g, b),
|
||||
egui::Stroke::NONE,
|
||||
));
|
||||
}
|
||||
}
|
||||
let mark = if c.color.iter().map(|v| u32::from(*v)).sum::<u32>() > 380 { egui::Color32::BLACK } else { egui::Color32::WHITE };
|
||||
if c.locked {
|
||||
@@ -1130,14 +1155,28 @@ fn color_table(ui: &mut egui::Ui, d: &mut Dialog, s: Option<&WebSettings>) -> Re
|
||||
let pickable = !c.transparent || *mapped;
|
||||
let ringed = pickable && picked.iter().any(|h| h.eq_ignore_ascii_case(&hex(c.source)));
|
||||
p.rect_stroke(r, 0.0, egui::Stroke::new(if ringed { 2.0 } else { 1.0 }, if ringed { t.accent } else { t.border }), egui::StrokeKind::Outside);
|
||||
if pickable && resp.clicked() && resp.interact_pointer_pos().is_some_and(|pos| r.contains(pos)) {
|
||||
if !pickable {
|
||||
continue;
|
||||
}
|
||||
let resp = ui.interact(r, swatch_id(&hex(c.source)), egui::Sense::click());
|
||||
if resp.clicked() {
|
||||
clicked = Some(hex(c.source));
|
||||
}
|
||||
// A double-click edits an opaque color: the picker opens on the color as shown, or on the
|
||||
// source color for a color already shifted by hand.
|
||||
if resp.double_clicked() && !c.transparent {
|
||||
edit = Some((hex(c.source), hex(if c.shifted { c.source } else { c.color })));
|
||||
}
|
||||
}
|
||||
if let Some(c) = clicked {
|
||||
let m = ui.input(|i| i.modifiers);
|
||||
pick(d, &order, &c, m.shift, m.command);
|
||||
}
|
||||
if let Some((source, start)) = edit {
|
||||
d.fields.insert("__editColor".into(), json!(source));
|
||||
d.fields.insert("__editStart".into(), json!(start));
|
||||
}
|
||||
let shifted = |c: &str| table.shifted.keys().any(|k| k.eq_ignore_ascii_case(c));
|
||||
ui.add_space(4.0);
|
||||
let on = |list: &[String]| list.iter().any(|h| h.eq_ignore_ascii_case(&selected));
|
||||
ui.horizontal(|ui| {
|
||||
@@ -1152,15 +1191,22 @@ fn color_table(ui: &mut egui::Ui, d: &mut Dialog, s: Option<&WebSettings>) -> Re
|
||||
"webShift" => &table.web_shift,
|
||||
_ => &table.locked,
|
||||
};
|
||||
let is_on = on(current);
|
||||
if widgets::flat_button(ui, if is_on { on_label } else { off_label }, 88.0).clicked() {
|
||||
// A color shifted by hand stays locked until it is unshifted.
|
||||
let fixed = list == "locked" && shifted(&selected);
|
||||
let is_on = on(current) || fixed;
|
||||
let label = if is_on { on_label } else { off_label };
|
||||
if ui.add_enabled(!fixed, |ui: &mut egui::Ui| widgets::flat_button(ui, label, 88.0)).clicked() {
|
||||
toggle(d, list, &selected, !is_on);
|
||||
// Web Shift replaces a shift by hand.
|
||||
if list == "webShift" && !is_on {
|
||||
unshift(d, &selected);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
// Delete Color (the button and the table's menu) and Restore Generated Table.
|
||||
let (mut delete, mut restore) = (false, false);
|
||||
let (mut delete, mut restore, mut unshift_all) = (false, false, false);
|
||||
ui.horizontal(|ui| {
|
||||
delete |= widgets::icon_button_enabled(ui, "trash-2", tl!("Delete Color"), false, !picked.is_empty(), 24.0).clicked();
|
||||
let menu = widgets::icon_button(ui, "menu", tl!("Color Table"), false, 24.0);
|
||||
@@ -1174,6 +1220,10 @@ fn color_table(ui: &mut egui::Ui, d: &mut Dialog, s: Option<&WebSettings>) -> Re
|
||||
restore = true;
|
||||
ui.close();
|
||||
}
|
||||
if widgets::menu_item(ui, tl!("Unshift All Colors"), !table.shifted.is_empty() || !table.web_shift.is_empty(), false) {
|
||||
unshift_all = true;
|
||||
ui.close();
|
||||
}
|
||||
});
|
||||
});
|
||||
let sort = table.sort;
|
||||
@@ -1188,6 +1238,9 @@ fn color_table(ui: &mut egui::Ui, d: &mut Dialog, s: Option<&WebSettings>) -> Re
|
||||
if restore {
|
||||
restore_table(d);
|
||||
}
|
||||
if unshift_all {
|
||||
unshift_all_colors(d);
|
||||
}
|
||||
if delete {
|
||||
let palette: Vec<String> =
|
||||
shot.colors.iter().filter(|c| !c.transparent).map(|c| hex(c.source)).chain(shot.mapped.iter().map(|c| hex(*c))).collect();
|
||||
@@ -1285,6 +1338,9 @@ pub(super) fn delete_colors(d: &mut Dialog, palette: &[String]) -> Result<(), St
|
||||
}
|
||||
}
|
||||
}
|
||||
for c in &picked {
|
||||
unshift(d, c);
|
||||
}
|
||||
set_table(d, "customPalette", json!(custom));
|
||||
set_table(d, "deleted", json!(deleted));
|
||||
d.fields.remove("__colors");
|
||||
@@ -1299,6 +1355,71 @@ pub(super) fn restore_table(d: &mut Dialog) {
|
||||
set_table(d, "customPalette", json!([]));
|
||||
}
|
||||
|
||||
/// The id of the color table's swatch for the source color `source` (`#rrggbb`).
|
||||
pub(super) fn swatch_id(source: &str) -> egui::Id {
|
||||
egui::Id::unique(("sfw-swatch", source.to_ascii_lowercase()))
|
||||
}
|
||||
|
||||
/// The field of the Color Picker's OK over Save for Web: the color the edited swatch shifts to.
|
||||
const SHIFT_TO: &str = "__shiftTo";
|
||||
|
||||
/// The Color Picker over the dialog for the color table's source color `source`, on `start`; its
|
||||
/// OK shifts the color ([`shift_color`]) and its Cancel leaves the table as it was. Nothing opens
|
||||
/// when either is not a color.
|
||||
pub(super) fn edit_color(d: &mut Dialog, source: &str, start: &str) {
|
||||
let (Some(_), Some(c)) = (vectorcraft_color::Color::from_hex(source), vectorcraft_color::Color::from_hex(start)) else { return };
|
||||
d.fields.insert("__shiftSource".into(), json!(source));
|
||||
*d = super::color_picker::over_effect(d, SHIFT_TO, c);
|
||||
}
|
||||
|
||||
/// Back from the Color Picker: its OK's color shifts the color it was opened for.
|
||||
fn take_shift(d: &mut Dialog) {
|
||||
let source = d.fields.remove("__shiftSource");
|
||||
if let (Some(to), Some(source)) = (d.fields.remove(SHIFT_TO), source)
|
||||
&& let (Some(to), Some(source)) = (to.as_str(), source.as_str())
|
||||
{
|
||||
shift_color(d, source, to);
|
||||
}
|
||||
}
|
||||
|
||||
/// Shift the source color `source` to `to` (`colorTable.shifted`), wherever it is in the image; it
|
||||
/// is no longer web-shifted. Picking the source color itself takes the shift away. The color
|
||||
/// becomes the selection. Nothing changes when either is not a color.
|
||||
pub(super) fn shift_color(d: &mut Dialog, source: &str, to: &str) {
|
||||
let hex = |h: &str| vectorcraft_color::Color::from_hex(h).map(|c| c.to_hex());
|
||||
let (Some(source), Some(to)) = (hex(source), hex(to)) else { return };
|
||||
unshift(d, &source);
|
||||
if to != source {
|
||||
let mut map = shifts(d);
|
||||
map.insert(source.clone(), json!(to));
|
||||
set_table(d, "shifted", Value::Object(map));
|
||||
}
|
||||
toggle(d, "webShift", &source, false);
|
||||
d.fields.insert("__colors".into(), json!([source]));
|
||||
d.fields.insert("__color".into(), json!(source));
|
||||
}
|
||||
|
||||
/// The `colorTable.shifted` field.
|
||||
fn shifts(d: &Dialog) -> Map<String, Value> {
|
||||
d.fields.get("colorTable").and_then(|t| t.get("shifted")).and_then(Value::as_object).cloned().unwrap_or_default()
|
||||
}
|
||||
|
||||
/// Take the shift by hand of the source color `source` away.
|
||||
pub(super) fn unshift(d: &mut Dialog, source: &str) {
|
||||
let mut map = shifts(d);
|
||||
let before = map.len();
|
||||
map.retain(|k, _| !k.eq_ignore_ascii_case(source));
|
||||
if map.len() != before {
|
||||
set_table(d, "shifted", Value::Object(map));
|
||||
}
|
||||
}
|
||||
|
||||
/// Unshift All Colors: no color is shifted by hand or web-shifted.
|
||||
pub(super) fn unshift_all_colors(d: &mut Dialog) {
|
||||
set_table(d, "shifted", json!({}));
|
||||
set_table(d, "webShift", json!([]));
|
||||
}
|
||||
|
||||
/// Add `color` to the colour table's `list`, or take it out.
|
||||
pub(super) fn toggle(d: &mut Dialog, list: &str, color: &str, add: bool) {
|
||||
let mut v: Vec<Value> = d.fields.get("colorTable").and_then(|t| t.get(list)).and_then(Value::as_array).cloned().unwrap_or_default();
|
||||
|
||||
@@ -783,6 +783,107 @@ fn colour_table_selection_and_delete_color() {
|
||||
assert_eq!((&d.fields["colorTable"]["deleted"], &d.fields["colorTable"]["customPalette"]), (&json!([]), &json!([])));
|
||||
}
|
||||
|
||||
/// A shift by hand replaces a web shift and selects the color; a shift to the color itself takes it
|
||||
/// away; Unshift All Colors clears both kinds; Delete Color takes a deleted color's shift away.
|
||||
#[test]
|
||||
fn colour_table_shift_unshift_and_unshift_all() {
|
||||
let mut d = Dialog::new(save_for_web::KIND, json!({}));
|
||||
save_for_web::toggle(&mut d, "webShift", "#123456", true);
|
||||
save_for_web::shift_color(&mut d, "#123456", "#FF8800");
|
||||
assert_eq!(d.fields["colorTable"], json!({"webShift": [], "shifted": {"#123456": "#ff8800"}}));
|
||||
assert_eq!(save_for_web::selection(&d), ["#123456"]);
|
||||
// Not a color: nothing changes.
|
||||
let before = d.fields.clone();
|
||||
save_for_web::shift_color(&mut d, "nope", "#000000");
|
||||
save_for_web::shift_color(&mut d, "#123456", "nope");
|
||||
assert_eq!(d.fields, before);
|
||||
save_for_web::shift_color(&mut d, "#ABCDEF", "#00ff00");
|
||||
save_for_web::shift_color(&mut d, "#123456", "#123456");
|
||||
assert_eq!(d.fields["colorTable"]["shifted"], json!({"#abcdef": "#00ff00"}));
|
||||
save_for_web::toggle(&mut d, "webShift", "#222222", true);
|
||||
save_for_web::unshift_all_colors(&mut d);
|
||||
assert_eq!((&d.fields["colorTable"]["shifted"], &d.fields["colorTable"]["webShift"]), (&json!({}), &json!([])));
|
||||
let order: Vec<String> = ["#000000", "#222222"].map(String::from).to_vec();
|
||||
save_for_web::shift_color(&mut d, "#222222", "#ffffff");
|
||||
save_for_web::delete_colors(&mut d, &order).unwrap();
|
||||
assert_eq!((&d.fields["colorTable"]["shifted"], &d.fields["colorTable"]["deleted"]), (&json!({}), &json!(["#222222"])));
|
||||
}
|
||||
|
||||
/// One frame of `app` in `ctx`, 50 ms after the last.
|
||||
fn tick(app: &mut VectorcraftApp, ctx: &egui::Context, events: Vec<egui::Event>) {
|
||||
let time = ctx.input(|i| i.time) + 0.05;
|
||||
let screen_rect = Some(egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1400.0, 1000.0)));
|
||||
let mut out = ctx.run_ui(egui::RawInput { screen_rect, events, time: Some(time), ..Default::default() }, |ui| show(app, ui.ctx()));
|
||||
out.textures_delta.clear();
|
||||
}
|
||||
|
||||
/// Double-click the color table's swatch of the source color `source`.
|
||||
fn double_click_swatch(app: &mut VectorcraftApp, ctx: &egui::Context, source: &str) {
|
||||
for _ in 0..3 {
|
||||
tick(app, ctx, vec![]);
|
||||
}
|
||||
let pos = ctx.read_response(save_for_web::swatch_id(source)).unwrap_or_else(|| panic!("no swatch for {source}")).rect.center();
|
||||
let button = |pressed| egui::Event::PointerButton { pos, button: egui::PointerButton::Primary, pressed, modifiers: egui::Modifiers::NONE };
|
||||
tick(app, ctx, vec![egui::Event::PointerMoved(pos), button(true)]);
|
||||
tick(app, ctx, vec![button(false)]);
|
||||
tick(app, ctx, vec![button(true)]);
|
||||
tick(app, ctx, vec![button(false)]);
|
||||
tick(app, ctx, vec![]);
|
||||
}
|
||||
|
||||
/// The color the open Color Picker shows.
|
||||
fn picker_color(app: &VectorcraftApp) -> Option<String> {
|
||||
let d = app.ui.dialog.as_ref()?;
|
||||
assert_eq!(d.kind, "colorPicker", "the Color Picker is open");
|
||||
d.fields.get("color").and_then(vectorcraft_engine::cmd::color_value).map(|c| c.to_hex())
|
||||
}
|
||||
|
||||
/// A double-click on a swatch opens the Color Picker on its color. Cancel changes nothing; OK
|
||||
/// shifts the color in the table and the saved file. A double-click on a shifted swatch opens the
|
||||
/// picker on the source color, and Web Shift replaces the shift by hand.
|
||||
#[test]
|
||||
fn double_clicking_a_swatch_shifts_its_color() {
|
||||
let dir = vectorcraft_testkit::temp_dir("sfw-shift-color");
|
||||
let (mut app, _) = app(&dir, false);
|
||||
app.run("shape.rectangle", json!({"x": 40, "y": 0, "width": 20, "height": 40})).unwrap();
|
||||
app.run("paint.setFill", json!({"color": "#0000ff"})).unwrap();
|
||||
app.run("file.saveForWeb", json!({})).unwrap();
|
||||
for (k, v) in [("format", json!("gif")), ("antiAlias", json!("none")), ("dither", json!("none"))] {
|
||||
set(&mut app, k, v);
|
||||
}
|
||||
let ctx = egui::Context::default();
|
||||
crate::theme::install_fonts(&ctx);
|
||||
let shifted = |app: &VectorcraftApp| app.ui.dialog.as_ref().map(|d| d.fields["colorTable"]["shifted"].clone());
|
||||
double_click_swatch(&mut app, &ctx, "#0000ff");
|
||||
assert_eq!(picker_color(&app).as_deref(), Some("#0000ff"));
|
||||
crate::dialogs::cancel(&mut app);
|
||||
tick(&mut app, &ctx, vec![]);
|
||||
assert_eq!((kind(&app), shifted(&app)), (Some(save_for_web::KIND), Some(json!({}))), "Cancel shifts nothing");
|
||||
double_click_swatch(&mut app, &ctx, "#0000ff");
|
||||
set(&mut app, "color", json!("#00ff00"));
|
||||
confirm(&mut app).unwrap();
|
||||
tick(&mut app, &ctx, vec![]);
|
||||
assert_eq!((kind(&app), shifted(&app)), (Some(save_for_web::KIND), Some(json!({"#0000ff": "#00ff00"}))), "OK shifts the color");
|
||||
// The shifted swatch opens on its source color.
|
||||
double_click_swatch(&mut app, &ctx, "#0000ff");
|
||||
assert_eq!(picker_color(&app).as_deref(), Some("#0000ff"));
|
||||
crate::dialogs::cancel(&mut app);
|
||||
// Web Shift replaces the shift by hand.
|
||||
click_text(&mut app, "Web Shift");
|
||||
let t = app.ui.dialog.as_ref().unwrap().fields["colorTable"].clone();
|
||||
assert_eq!((&t["shifted"], &t["webShift"]), (&json!({}), &json!(["#0000ff"])));
|
||||
// Shifted again, the color reaches the saved file and is remembered.
|
||||
double_click_swatch(&mut app, &ctx, "#0000ff");
|
||||
set(&mut app, "color", json!("#00ff00"));
|
||||
confirm(&mut app).unwrap();
|
||||
tick(&mut app, &ctx, vec![]);
|
||||
let r = confirm(&mut app).unwrap();
|
||||
let image = image::open(r["path"].as_str().unwrap()).unwrap().to_rgba8();
|
||||
assert_eq!((image.get_pixel(50, 20).0, image.get_pixel(20, 14).0), ([0, 255, 0, 255], [204, 51, 0, 255]));
|
||||
let remembered = app.session.last_web_settings().color_table;
|
||||
assert_eq!((remembered.shifted.get("#0000ff").map(String::as_str), remembered.web_shift.len()), (Some("#00ff00"), 0));
|
||||
}
|
||||
|
||||
/// Click the dialog's text `label` with the pointer (frames a quarter second apart).
|
||||
fn click_text(app: &mut VectorcraftApp, label: &str) {
|
||||
let ctx = egui::Context::default();
|
||||
|
||||
@@ -770,6 +770,7 @@ font-technology Variable Променливи
|
||||
Delete Brush Изтриване на четка
|
||||
Delete Color Изтриване на цвят
|
||||
Restore Generated Table Възстановяване на генерираната таблица
|
||||
Unshift All Colors Преместване назад на всички цветове
|
||||
Delete Character Style Изтриване на стил за знаци
|
||||
Delete Empty Artboards Изтриване на празни работни области
|
||||
Delete Freeform Point Изтриване на свободна точка
|
||||
@@ -4586,6 +4587,7 @@ axis Both И двете
|
||||
@msg choose a location for the package изберете местоположение за пакета
|
||||
@msg clipboard is empty клипбордът е празен
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: поне един цвят трябва да остане в цветовата таблица
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` назовава цвят, който друг ключ също назовава
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` не е цвят като "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: най-много {MAX_TABLE} цвята
|
||||
@msg command `{0}` is not available right now: {1} команда `{0}` не е налична в момента: {1}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3439,6 +3439,7 @@ theme Appearance Izgled
|
||||
Delete Brush Izbriši četkicu
|
||||
Delete Color Izbriši boju
|
||||
Restore Generated Table Vrati generisanu tabelu
|
||||
Unshift All Colors Poništi pomak svih boja
|
||||
Delete Symbol Izbriši simbol
|
||||
Delete the selected symbol? Izbrisati odabrani simbol?
|
||||
Delete the selected symbols? Izbrisati odabrane simbole?
|
||||
@@ -4989,6 +4990,7 @@ imageTrace Outline Obris
|
||||
@msg choose a location for the package odaberite lokaciju za paket
|
||||
@msg clipboard is empty međuspremnik je prazan
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: barem jedna boja mora ostati u tabeli boja
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` imenuje boju koju imenuje i drugi ključ
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` nije boja poput "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: najviše {MAX_TABLE} boja
|
||||
@msg command `{0}` is not available right now: {1} naredba `{0}` trenutno nije dostupna: {1}
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -1128,6 +1128,7 @@ antiAlias Sharp Nítid
|
||||
Delete Brush Suprimeix el pinzell
|
||||
Delete Color Suprimeix el color
|
||||
Restore Generated Table Restaura la taula generada
|
||||
Unshift All Colors Desfés el desplaçament de tots els colors
|
||||
Delete Character Style Suprimeix l’estil de caràcter
|
||||
Delete Data Set Suprimeix el conjunt de dades
|
||||
Delete Data Sets Suprimeix els conjunts de dades
|
||||
@@ -5757,6 +5758,7 @@ digits Malayalam Malaiàlam
|
||||
@msg clipboard is empty el porta-retalls és buit
|
||||
@msg closing needs three anchors el tancament necessita tres punts d’ancoratge
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: almenys un color ha de quedar a la taula de colors
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` indica un color que també indica una altra clau
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` no és un color com "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: com a màxim {MAX_TABLE} colors
|
||||
@msg column docks a set as a dock column, with no anchor or icon column acobla un conjunt com a columna d’acoblament, sense àncora ni icona
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3537,6 +3537,7 @@ theme Appearance Motiv
|
||||
Delete Brush Odstranit štětec
|
||||
Delete Color Odstranit barvu
|
||||
Restore Generated Table Obnovit vygenerovanou tabulku
|
||||
Unshift All Colors Zrušit posun všech barev
|
||||
Delete Symbol Odstranit symbol
|
||||
Delete the selected symbol? Odstranit vybraný symbol?
|
||||
Delete the selected symbols? Odstranit vybrané symboly?
|
||||
@@ -5249,6 +5250,7 @@ liquify-list-end {0}, {1} {0} a {1}
|
||||
@msg choose a location for the package zvolte umístění balíčku
|
||||
@msg clipboard is empty schránka je prázdná
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: v tabulce barev musí zůstat alespoň jedna barva
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` označuje barvu, kterou označuje i jiný klíč
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` není barva jako "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: nejvýše {MAX_TABLE} barev
|
||||
@msg command `{0}` is not available right now: {1} příkaz `{0}` nyní není k dispozici: {1}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5961,6 +5961,7 @@ theme Appearance Udseende
|
||||
Delete Brush Slet pensel
|
||||
Delete Color Slet farve
|
||||
Restore Generated Table Gendan genereret tabel
|
||||
Unshift All Colors Fjern skift af alle farver
|
||||
Delete Symbol Slet symbol
|
||||
Delete the selected symbol? Vil du slette det markerede symbol?
|
||||
Delete the selected symbols? Vil du slette de markerede symboler?
|
||||
@@ -7449,6 +7450,7 @@ imageTrace Outline Kontur
|
||||
@msg choose a location for the package vælg en placering til pakken
|
||||
@msg clipboard is empty udklipsholderen er tom
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: mindst én farve skal blive i farvetabellen
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` angiver en farve, som en anden nøgle også angiver
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` er ikke en farve som "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: højst {MAX_TABLE} farver
|
||||
@msg command `{0}` is not available right now: {1} kommandoen `{0}` er ikke tilgængelig lige nu: {1}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -773,6 +773,7 @@ font-technology Variable Variabel
|
||||
Delete Brush Pinsel löschen
|
||||
Delete Color Farbe löschen
|
||||
Restore Generated Table Generierte Tabelle wiederherstellen
|
||||
Unshift All Colors Verschiebung aller Farben aufheben
|
||||
Delete Character Style Zeichenformat löschen
|
||||
Delete Empty Artboards Leere Zeichenflächen löschen
|
||||
Delete Freeform Point Freiformpunkt löschen
|
||||
@@ -4850,6 +4851,7 @@ liquify-list-end {0}, {1} {0} und {1}
|
||||
@msg choose a location for the package wählen Sie einen Speicherort für das Paket
|
||||
@msg clipboard is empty die Zwischenablage ist leer
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: Mindestens eine Farbe muss in der Farbtabelle bleiben
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` bezeichnet eine Farbe, die auch ein anderer Schlüssel bezeichnet
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` ist keine Farbe wie "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: höchstens {MAX_TABLE} Farben
|
||||
@msg command `{0}` is not available right now: {1} der Befehl `{0}` ist derzeit nicht verfügbar: {1}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -751,6 +751,7 @@ font-technology Variable Μεταβλητές
|
||||
Delete Brush Διαγραφή πινέλου
|
||||
Delete Color Διαγραφή χρώματος
|
||||
Restore Generated Table Επαναφορά του παραγόμενου πίνακα
|
||||
Unshift All Colors Αναίρεση μετατόπισης όλων των χρωμάτων
|
||||
Delete Character Style Διαγραφή στυλ χαρακτήρων
|
||||
Delete Empty Artboards Διαγραφή κενών πινάκων σχεδίασης
|
||||
Delete Freeform Point Διαγραφή ελεύθερου σημείου
|
||||
@@ -4908,6 +4909,7 @@ digits Malayalam Μαλαγιάλαμ
|
||||
@msg choose a location for the package επιλέξτε τοποθεσία συσκευασίας
|
||||
@msg clipboard is empty το πρόχειρο είναι κενό
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: τουλάχιστον ένα χρώμα πρέπει να παραμείνει στον πίνακα χρωμάτων
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: το `{k}` ορίζει ένα χρώμα που ορίζει και άλλο κλειδί
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: το `{h}` δεν είναι έγκυρο χρώμα, όπως το "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: επιτρέπονται το πολύ {MAX_TABLE} χρώματα
|
||||
@msg command `{0}` is not available right now: {1} η εντολή `{0}` δεν είναι διαθέσιμη αυτήν τη στιγμή: {1}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -792,6 +792,7 @@ font-technology Variable Variables
|
||||
Delete Brush Eliminar pincel
|
||||
Delete Color Eliminar color
|
||||
Restore Generated Table Restaurar tabla generada
|
||||
Unshift All Colors Deshacer cambio de todos los colores
|
||||
Delete Character Style Eliminar estilo de carácter
|
||||
Delete Empty Artboards Eliminar mesas de trabajo vacías
|
||||
Delete Freeform Point Eliminar punto libre
|
||||
@@ -4954,6 +4955,7 @@ liquify-list-end {0}, {1} {0}, {1}
|
||||
@msg choose a location for the package elige una ubicación para el paquete
|
||||
@msg clipboard is empty el portapapeles está vacío
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: al menos un color debe quedar en la tabla de colores
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` indica un color que también indica otra clave
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` no es un color como "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: como máximo {MAX_TABLE} colores
|
||||
@msg command `{0}` is not available right now: {1} el comando `{0}` no está disponible ahora: {1}
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -3476,6 +3476,7 @@ theme Appearance Ulkoasu
|
||||
Delete Brush Poista sivellin
|
||||
Delete Color Poista väri
|
||||
Restore Generated Table Palauta luotu taulukko
|
||||
Unshift All Colors Peru kaikkien värien siirto
|
||||
Delete Symbol Poista symboli
|
||||
Delete the selected symbol? Poistetaanko valittu symboli?
|
||||
Delete the selected symbols? Poistetaanko valitut symbolit?
|
||||
@@ -5178,6 +5179,7 @@ liquify-list-end {0}, {1} {0} ja {1}
|
||||
@msg choose a location for the package valitse paketin sijainti
|
||||
@msg clipboard is empty leikepöytä on tyhjä
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: väritaulukkoon on jäätävä vähintään yksi väri
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` nimeää värin, jonka myös toinen avain nimeää
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` ei ole väri, kuten "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: enintään {MAX_TABLE} väriä
|
||||
@msg command `{0}` is not available right now: {1} komento `{0}` ei ole nyt käytettävissä: {1}
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -794,6 +794,7 @@ font-technology Variable Variables
|
||||
Delete Brush Supprimer la forme
|
||||
Delete Color Supprimer la couleur
|
||||
Restore Generated Table Restaurer la table générée
|
||||
Unshift All Colors Annuler le décalage de toutes les couleurs
|
||||
Delete Character Style Supprimer le style de caractère
|
||||
Delete Empty Artboards Supprimer les plans de travail vides
|
||||
Delete Freeform Point Supprimer le point libre
|
||||
@@ -4916,6 +4917,7 @@ liquify-list-end {0}, {1} {0} et {1}
|
||||
@msg choose a location for the package choisissez un emplacement pour l’assemblage
|
||||
@msg clipboard is empty le presse-papiers est vide
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: au moins une couleur doit rester dans la table des couleurs
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` désigne une couleur qu’une autre clé désigne aussi
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what} : `{h}` n’est pas une couleur comme "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what} : {MAX_TABLE} couleurs au maximum
|
||||
@msg command `{0}` is not available right now: {1} la commande `{0}` n’est pas disponible pour le moment : {1}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -905,6 +905,7 @@
|
||||
Delete Brush બ્રશ કાઢી નાખો
|
||||
Delete Color રંગ કાઢી નાખો
|
||||
Restore Generated Table જનરેટ થયેલું ટેબલ પુનઃસ્થાપિત કરો
|
||||
Unshift All Colors બધા રંગોનું શિફ્ટ રદ કરો
|
||||
Delete Character Style અક્ષર સ્ટાઇલ કાઢી નાખો
|
||||
Delete Data Set ડેટા સેટ કાઢી નાખો
|
||||
Delete Data Sets ડેટા સેટ્સ કાઢી નાખો
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 72 and column 5.
|
@@ -1291,6 +1291,7 @@ antiAlias Sharp शार्प
|
||||
Delete Brush ब्रश हटाएँ
|
||||
Delete Color रंग हटाएँ
|
||||
Restore Generated Table जनरेट की गई तालिका पुनर्स्थापित करें
|
||||
Unshift All Colors सभी रंग अनशिफ़्ट करें
|
||||
Delete Character Style कैरेक्टर स्टाइल हटाएँ
|
||||
Delete Data Set डेटा सेट हटाएँ
|
||||
Delete Data Sets डेटा सेट्स हटाएँ
|
||||
@@ -6862,6 +6863,7 @@ antiAlias Sharp शार्प
|
||||
@msg colorMode must be rgb or cmyk, not `{m}` colorMode को rgb या cmyk होना चाहिए, `{m}` नहीं
|
||||
@msg colorModel must be {own} (the document's mode), grayscale or bitmap colorModel को {own} (डॉक्यूमेंट का मोड), grayscale या bitmap होना चाहिए
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: रंग तालिका में कम से कम एक रंग रहना चाहिए
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` वही रंग बताता है जो कोई दूसरी कुंजी भी बताती है
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}`, "#ff8800" जैसा रंग नहीं है
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: अधिकतम {MAX_TABLE} रंग
|
||||
@msg colour groups can't go into colour groups रंग समूह रंग समूहों में नहीं जा सकते हैं
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -1020,6 +1020,7 @@ font-technology Variable Változó
|
||||
Delete Brush Ecset törlése
|
||||
Delete Color Szín törlése
|
||||
Restore Generated Table Előállított tábla visszaállítása
|
||||
Unshift All Colors Az összes szín eltolásának visszavonása
|
||||
Delete Character Style Karakterstílus törlése
|
||||
Delete Data Set Adatkészlet törlése
|
||||
Delete Empty Artboards Üres rajztáblák törlése
|
||||
@@ -5352,6 +5353,7 @@ imageTrace Outline Körvonal
|
||||
@msg clipboard is empty a vágólap üres
|
||||
@msg closing needs three anchors a lezáráshoz három horgonypont kell
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: legalább egy színnek a színtáblában kell maradnia
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: a(z) `{k}` olyan színt nevez meg, amelyet egy másik kulcs is megnevez
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` nem szín (például "#ff8800")
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: legfeljebb {MAX_TABLE} szín
|
||||
@msg column must be true or a number from 1 a column értéke true vagy 1-től kezdődő szám lehet
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3213,6 +3213,7 @@ theme Appearance Tampilan
|
||||
Delete Brush Hapus kuas
|
||||
Delete Color Hapus warna
|
||||
Restore Generated Table Pulihkan tabel yang dibuat
|
||||
Unshift All Colors Batalkan pergeseran semua warna
|
||||
Delete Symbol Hapus simbol
|
||||
Delete the selected symbol? Hapus simbol yang dipilih?
|
||||
Delete the selected symbols? Hapus simbol yang dipilih?
|
||||
@@ -4700,6 +4701,7 @@ imageTrace Outline Kontur
|
||||
@msg choose a location for the package pilih lokasi untuk paket
|
||||
@msg clipboard is empty papan klip kosong
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: setidaknya satu warna harus tetap ada di tabel warna
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` menyebut warna yang juga disebut kunci lain
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` bukan warna seperti "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: maksimal {MAX_TABLE} warna
|
||||
@msg command `{0}` is not available right now: {1} perintah `{0}` tidak tersedia saat ini: {1}
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2511 and column 5.
|
@@ -794,6 +794,7 @@ font-technology Variable Variabili
|
||||
Delete Brush Elimina pennello
|
||||
Delete Color Elimina colore
|
||||
Restore Generated Table Ripristina tabella generata
|
||||
Unshift All Colors Annulla spostamento di tutti i colori
|
||||
Delete Character Style Elimina stile carattere
|
||||
Delete Empty Artboards Elimina tavole da disegno vuote
|
||||
Delete Freeform Point Elimina punto libero
|
||||
@@ -4984,6 +4985,7 @@ liquify-list-end {0}, {1} {0} e {1}
|
||||
@msg choose a location for the package scegli una posizione per il pacchetto
|
||||
@msg clipboard is empty gli appunti sono vuoti
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: almeno un colore deve restare nella tabella colori
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` indica un colore indicato anche da un’altra chiave
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` non è un colore come "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: al massimo {MAX_TABLE} colori
|
||||
@msg command `{0}` is not available right now: {1} il comando `{0}` non è disponibile in questo momento: {1}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -1481,6 +1481,7 @@ antiAlias Sharp シャープ
|
||||
Delete Brush ブラシを削除
|
||||
Delete Color カラーを削除
|
||||
Restore Generated Table 生成されたテーブルを復元
|
||||
Unshift All Colors すべてのカラーのシフトを戻す
|
||||
Delete Character Style 文字スタイルを削除
|
||||
Delete Empty Artboards 空のアートボードを削除
|
||||
Delete Freeform Point フリーフォームポイントを削除
|
||||
@@ -4970,6 +4971,7 @@ swatch Bright Violet ビビッドバイオレット
|
||||
@msg paste unavailable 貼り付けを使用できません
|
||||
@msg Save for Web: the image is empty Web 用に保存: 画像が空です
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: カラーテーブルには少なくとも 1 つのカラーを残す必要があります
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` は別のキーと同じカラーを指しています
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` は「#ff8800」のような形式のカラーではありません
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: 指定できるカラーは {MAX_TABLE} 色までです
|
||||
@msg no artboard {i} (0-based; the document has {_1}) アートボード {i} はありません (番号は 0 始まり、このドキュメントには {_1} 個あります)
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -5303,6 +5303,7 @@ theme Appearance იერსახე
|
||||
Delete Brush ფუნჯის წაშლა
|
||||
Delete Color ფერის წაშლა
|
||||
Restore Generated Table გენერირებული ცხრილის აღდგენა
|
||||
Unshift All Colors ყველა ფერის წანაცვლების მოხსნა
|
||||
Delete Symbol სიმბოლოს წაშლა
|
||||
Delete the selected symbol? წაიშალოს მონიშნული სიმბოლო?
|
||||
Delete the selected symbols? წაიშალოს მონიშნული სიმბოლოები?
|
||||
@@ -6767,6 +6768,7 @@ font-technology Variable ცვლადი
|
||||
@msg choose a location for the package აირჩიეთ შეფუთვის მდებარეობა
|
||||
@msg clipboard is empty გაცვლის ბუფერი ცარიელია
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: ფერების ცხრილში ერთი ფერი მაინც უნდა დარჩეს
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` ასახელებს ფერს, რომელსაც სხვა გასაღებიც ასახელებს
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` ფერი არ არის, მაგალითად "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: არაუმეტეს {MAX_TABLE} ფერი
|
||||
@msg command `{0}` is not available right now: {1} ბრძანება `{0}` ახლა ხელმისაწვდომი არ არის: {1}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -1471,6 +1471,7 @@ antiAlias Sharp 날카롭게
|
||||
Delete Brush 브러시 삭제
|
||||
Delete Color 색상 삭제
|
||||
Restore Generated Table 생성된 표 복원
|
||||
Unshift All Colors 모든 색상 이동 취소
|
||||
Delete Character Style 문자 스타일 삭제
|
||||
Delete Empty Artboards 빈 아트보드 삭제
|
||||
Delete Freeform Point 자유 형태 포인트 삭제
|
||||
@@ -4897,6 +4898,7 @@ theme Appearance 외관
|
||||
@msg paste unavailable 붙여넣을 수 없습니다
|
||||
@msg Save for Web: the image is empty 웹용으로 저장: 이미지가 비어 있습니다
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: 색상 표에 색상이 하나 이상 남아 있어야 합니다
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}`이(가) 다른 키와 같은 색상을 가리킵니다
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}`은(는) "#ff8800" 같은 색상이 아닙니다
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: 색상은 최대 {MAX_TABLE}개입니다
|
||||
@msg no artboard {i} (0-based; the document has {_1}) 아트보드 {i}이(가) 없습니다(0부터 시작, 문서의 아트보드 수: {_1})
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3835,6 +3835,7 @@ theme Appearance Vormgeving
|
||||
Delete Brush Penseel verwijderen
|
||||
Delete Color Kleur verwijderen
|
||||
Restore Generated Table Gegenereerde tabel herstellen
|
||||
Unshift All Colors Verschuiving van alle kleuren ongedaan maken
|
||||
Delete Symbol Symbool verwijderen
|
||||
Delete the selected symbol? Het geselecteerde symbool verwijderen?
|
||||
Delete the selected symbols? De geselecteerde symbolen verwijderen?
|
||||
@@ -5324,6 +5325,7 @@ imageTrace Outline Contour
|
||||
@msg choose a location for the package kies een locatie voor het pakket
|
||||
@msg clipboard is empty het klembord is leeg
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: er moet ten minste één kleur in de kleurentabel blijven
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` noemt een kleur die ook een andere sleutel noemt
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` is geen kleur zoals "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: maximaal {MAX_TABLE} kleuren
|
||||
@msg command `{0}` is not available right now: {1} opdracht `{0}` is nu niet beschikbaar: {1}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -3416,6 +3416,7 @@ theme Appearance Wygląd
|
||||
Delete Brush Usuń pędzel
|
||||
Delete Color Usuń kolor
|
||||
Restore Generated Table Przywróć wygenerowaną tablicę
|
||||
Unshift All Colors Cofnij przesunięcie wszystkich kolorów
|
||||
Delete Symbol Usuń symbol
|
||||
Delete the selected symbol? Usunąć zaznaczony symbol?
|
||||
Delete the selected symbols? Usunąć zaznaczone symbole?
|
||||
@@ -5072,6 +5073,7 @@ liquify-list-end {0}, {1} {0} i {1}
|
||||
@msg choose a location for the package wybierz lokalizację pakietu
|
||||
@msg clipboard is empty schowek jest pusty
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: w tablicy kolorów musi zostać co najmniej jeden kolor
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` wskazuje kolor, który wskazuje też inny klucz
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` nie jest kolorem w rodzaju "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: maksymalnie {MAX_TABLE} kolorów
|
||||
@msg command `{0}` is not available right now: {1} polecenie `{0}` jest teraz niedostępne: {1}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -706,6 +706,7 @@ antiAlias Sharp Nítido
|
||||
Delete Brush Excluir Pincel
|
||||
Delete Color Excluir Cor
|
||||
Restore Generated Table Restaurar Tabela Gerada
|
||||
Unshift All Colors Desfazer Mudança de Todas as Cores
|
||||
Delete Character Style Excluir Estilo de Caractere
|
||||
Delete Empty Artboards Excluir Mesas de Trabalho Vazias
|
||||
Delete Freeform Point Excluir Ponto Livre
|
||||
@@ -4259,6 +4260,7 @@ axis Both Ambos
|
||||
@msg choose a location for the package escolha um local para o pacote
|
||||
@msg clipboard is empty a área de transferência está vazia
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: pelo menos uma cor deve permanecer na tabela de cores
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` indica uma cor que outra chave também indica
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` não é uma cor como "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: no máximo {MAX_TABLE} cores
|
||||
@msg command `{0}` is not available right now: {1} o comando `{0}` não está disponível agora: {1}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -790,6 +790,7 @@ font-technology Variable Вариативные
|
||||
Delete Brush Удалить кисть
|
||||
Delete Color Удалить цвет
|
||||
Restore Generated Table Восстановить созданную таблицу
|
||||
Unshift All Colors Отменить сдвиг всех цветов
|
||||
Delete Character Style Удалить стиль символа
|
||||
Delete Empty Artboards Удалить пустые монтажные области
|
||||
Delete Freeform Point Удалить произвольную точку
|
||||
@@ -4978,6 +4979,7 @@ liquify-list-end {0}, {1} {0} и {1}
|
||||
@msg choose a location for the package выберите расположение для пакета
|
||||
@msg clipboard is empty буфер обмена пуст
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: в цветовой таблице должен остаться хотя бы один цвет
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` обозначает цвет, который обозначает и другой ключ
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` не является цветом, например "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: не более {MAX_TABLE} цветов
|
||||
@msg command `{0}` is not available right now: {1} команда `{0}` сейчас недоступна: {1}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -779,6 +779,7 @@ font-technology Variable Variabla
|
||||
Delete Brush Radera pensel
|
||||
Delete Color Radera färg
|
||||
Restore Generated Table Återställ genererad tabell
|
||||
Unshift All Colors Ta bort förskjutning av alla färger
|
||||
Delete Character Style Radera teckenstil
|
||||
Delete Empty Artboards Radera tomma ritytor
|
||||
Delete Freeform Point Radera fri punkt
|
||||
@@ -4851,6 +4852,7 @@ liquify-list-end {0}, {1} {0} och {1}
|
||||
@msg choose a location for the package välj en plats för paketet
|
||||
@msg clipboard is empty urklippet är tomt
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: minst en färg måste finnas kvar i färgtabellen
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` anger en färg som även en annan nyckel anger
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` är inte en färg som "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: högst {MAX_TABLE} färger
|
||||
@msg command `{0}` is not available right now: {1} kommandot `{0}` är inte tillgängligt just nu: {1}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -771,6 +771,7 @@ font-technology Variable Değişken
|
||||
Delete Brush Fırçayı Sil
|
||||
Delete Color Rengi Sil
|
||||
Restore Generated Table Oluşturulan Tabloyu Geri Yükle
|
||||
Unshift All Colors Tüm Renklerin Kaydırmasını Kaldır
|
||||
Delete Character Style Karakter Stilini Sil
|
||||
Delete Empty Artboards Boş Çalışma Yüzeylerini Sil
|
||||
Delete Freeform Point Serbest Biçim Noktasını Sil
|
||||
@@ -4664,6 +4665,7 @@ liquify-list-end {0}, {1} {0} ve {1}
|
||||
@msg choose a location for the package paket için bir yer seçin
|
||||
@msg clipboard is empty pano boş
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: renk tablosunda en az bir renk kalmalı
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` başka bir anahtarın da belirttiği bir rengi belirtiyor
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}`, "#ff8800" gibi bir renk değil
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: en fazla {MAX_TABLE} renginde
|
||||
@msg command `{0}` is not available right now: {1} `{0}` komutu şu anda kullanılamıyor: {1}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -788,6 +788,7 @@ font-technology Variable Варіативні
|
||||
Delete Brush Видалити пензель
|
||||
Delete Color Видалити колір
|
||||
Restore Generated Table Відновити створену таблицю
|
||||
Unshift All Colors Скасувати зсув усіх кольорів
|
||||
Delete Character Style Видалити стиль символу
|
||||
Delete Empty Artboards Видалити порожні монтажні області
|
||||
Delete Freeform Point Видалити довільну точку
|
||||
@@ -4968,6 +4969,7 @@ liquify-list-end {0}, {1} {0} і {1}
|
||||
@msg choose a location for the package виберіть розташування для пакета
|
||||
@msg clipboard is empty буфер обміну порожній
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: у колірній таблиці має залишитися принаймні один колір
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` позначає колір, який позначає й інший ключ
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` не є кольором, наприклад "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: не більше {MAX_TABLE} кольорів
|
||||
@msg command `{0}` is not available right now: {1} команда `{0}` зараз недоступна: {1}
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -917,6 +917,7 @@ font-technology Variable Biến thiên
|
||||
Delete Brush Xóa cọ
|
||||
Delete Color Xóa màu
|
||||
Restore Generated Table Khôi phục bảng đã tạo
|
||||
Unshift All Colors Bỏ dịch chuyển tất cả màu
|
||||
Delete Character Style Xóa kiểu ký tự
|
||||
Delete Data Set Xóa tập dữ liệu
|
||||
Delete Design Xóa thiết kế
|
||||
@@ -5010,6 +5011,7 @@ theme Appearance Giao diện
|
||||
@msg clipboard is empty khay nhớ tạm trống
|
||||
@msg closing needs three anchors đóng đường dẫn cần ba điểm neo
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted: phải giữ lại ít nhất một màu trong bảng màu
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted: `{k}` chỉ một màu mà khóa khác cũng chỉ
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}: `{h}` không phải là màu như "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}: tối đa {MAX_TABLE} màu
|
||||
@msg column must be true or a number from 1 column phải là true hoặc số từ 1
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 205 and column 5.
|
@@ -736,6 +736,7 @@ antiAlias Sharp 锐利
|
||||
Delete Brush 删除画笔
|
||||
Delete Color 删除颜色
|
||||
Restore Generated Table 恢复生成的颜色表
|
||||
Unshift All Colors 取消偏移所有颜色
|
||||
Delete Character Style 删除字符样式
|
||||
Delete Empty Artboards 删除空白画板
|
||||
Delete Freeform Point 删除自由点
|
||||
@@ -4662,6 +4663,7 @@ imageTrace Outline 轮廓
|
||||
@msg paste unavailable 无法粘贴
|
||||
@msg Save for Web: the image is empty 存储为 Web 所用格式:图像为空
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted:颜色表中至少要保留一种颜色
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted:`{k}` 与另一个键指的是同一种颜色
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}:`{h}` 不是颜色,例如 "#ff8800"
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}:最多 {MAX_TABLE} 种颜色
|
||||
@msg no artboard {i} (0-based; the document has {_1}) 没有画板 {i} (从 0 开始计数;文档有 {_1} 个)
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -756,6 +756,7 @@ font-technology Variable 可變
|
||||
Delete Brush 刪除筆刷
|
||||
Delete Color 刪除顏色
|
||||
Restore Generated Table 還原產生的色彩表
|
||||
Unshift All Colors 取消位移所有顏色
|
||||
Delete Character Style 刪除字元樣式
|
||||
Delete Empty Artboards 刪除空白工作區域
|
||||
Delete Freeform Point 刪除任意形狀錨點
|
||||
@@ -2195,6 +2196,7 @@ file-filter Templates 範本
|
||||
@msg paste unavailable 無法貼上
|
||||
@msg Save for Web: the image is empty 儲存為網頁用:影像是空的
|
||||
@msg colorTable.deleted: at least one color has to stay in the color table colorTable.deleted:色彩表中至少要保留一種顏色
|
||||
@msg colorTable.shifted: `{k}` names a color another key names colorTable.shifted:`{k}` 與另一個鍵指的是同一種顏色
|
||||
@msg colorTable.{what}: `{h}` is not a colour such as "#ff8800" colorTable.{what}:`{h}` 不是像 "#ff8800" 這樣的顏色
|
||||
@msg colorTable.{what}: at most {MAX_TABLE} colours colorTable.{what}:最多 {MAX_TABLE} 種顏色
|
||||
@msg no artboard {i} (0-based; the document has {_1}) 沒有工作區域 {i} (從 0 起算;文件有 {_1} 個)
|
||||
|
||||
|
Can't render this file because it is too large.
|
+19
-2
@@ -9018,7 +9018,7 @@ File → Export → Save for Web (Legacy) writes optimised web images: `document
|
||||
…}` renders the artboard (`clipToArtboard`, the default; `artboard` picks one) or the visible art and the slices, at
|
||||
`width`, `height` or `percent`, and encodes it with the format's settings: for GIF and PNG-8 `reduction`, `colors`,
|
||||
`dither`, `ditherAmount`, `transparency`, `matte`, `interlaced`, `webSnap`, `lossy` (GIF) and `colorTable {locked,
|
||||
transparent, webShift, sort, deleted, customPalette}`; for JPEG `quality`, `progressive`, `optimized`, `embedProfile` and `matte`; for PNG-24
|
||||
transparent, webShift, sort, deleted, customPalette, shifted}`; for JPEG `quality`, `progressive`, `optimized`, `embedProfile` and `matte`; for PNG-24
|
||||
`transparency`, `matte` and `interlaced`. `metadata` (none, copyright, contact, all) writes File Info as PNG text or a
|
||||
GIF/JPEG comment; `convertToSrgb` marks PNGs as sRGB. `<stem>` is the name of `path` without its extension, or
|
||||
without `path` the document's title with the characters Windows does not allow in a file name as `-` and a `-` after
|
||||
@@ -9031,7 +9031,7 @@ couldn't be decoded and is missing from the image; the files are written all the
|
||||
|
||||
`document.exportForWeb.preview` returns what Save writes for the same settings without writing it: `bytes` (the exact
|
||||
file size), `seconds` to download at `kbps` (default 56.6), the size, and for palette formats the colour table
|
||||
(`colors: [{color, source, transparent, locked, webShifted, webSafe}]`). The colour table's lists name colours by
|
||||
(`colors: [{color, source, transparent, locked, webShifted, shifted, webSafe}]`). The colour table's lists name colours by
|
||||
`source` (the colour the reduction made), so a colour keeps its edits when it is web-shifted or snapped. `slice: n`
|
||||
previews one slice; `image: true` adds the file; `warnings` holds the export's warnings.
|
||||
|
||||
@@ -9050,6 +9050,23 @@ clicked). The trash button and Delete Color in the table's menu delete the selec
|
||||
Table in that menu clears `deleted` and `customPalette`, and the table reads Custom while either is set. Choosing
|
||||
another reduction in the dialog also clears them.
|
||||
|
||||
Shifting a color is `colorTable.shifted: {"#source": "#rrggbb"…}`, by `source`: every pixel of that color is
|
||||
written as the color given, in the preview and the file. The color is kept when the colors are reduced, as a
|
||||
locked one is: the shifted and locked colors take the palette's slots first, shifted ones before locked ones, and at
|
||||
least one slot is left for the reduction, so with `colors: 2` and transparent pixels none is kept and a color left out
|
||||
shifts nothing. As with a locked color, a kept source stays in the palette when the art no longer has it, and the
|
||||
pixels nearest to it are written in the new color. The preview marks it `shifted` and `locked`. A shift by hand wins over `webShift`, `webSnap` and
|
||||
`locked`; a color mapped to transparent stays transparent. Two colors may be shifted to the same color. A source the
|
||||
table does not hold shifts nothing, and the shift stays with the settings for when it comes back; another reduction
|
||||
keeps it. The settings store the map in lowercase, drop a color shifted to itself or deleted, and drop the `webShift`
|
||||
of a color shifted by hand. More than 256 entries, a key or value that is not a color such as `#ff8800` (`#rrggbbaa`
|
||||
included), and two keys that name one color are errors. Presets and `webExport.settings` keep the map. In the dialog a double-click on an
|
||||
opaque swatch opens the Color Picker on the color shown (on the source color for a color already shifted; an agent
|
||||
sets `__editColor: "#source"`). Its OK shifts the color (picking the source color takes the shift away), and Cancel
|
||||
leaves the table as it was. A shifted swatch shows the source color at its upper left and the new color at its lower
|
||||
right, with the lock mark, and Lock stays on until the color is unshifted. Web Shift replaces a shift by hand, and
|
||||
Unshift All Colors in the table's menu clears `shifted` and `webShift`. Only Web Colors in the picker starts off.
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"document.exportForWeb.preview","params":{"format":"png8","colorTable":{"deleted":["#ff0000"],"customPalette":["#0000ff","#00ff00","#ff0000"]}}}}
|
||||
```
|
||||
|
||||
@@ -894,6 +894,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- Save for Web: Optimize to File Size… opens rows for a desired file size in K, Start With (Current Settings, Auto Select GIF/JPEG) and, with slices, Use (Total of All Slices, Each Slice, Current Slice); OK takes the settings whose files fit and shows the size found, or says that no setting tried fits ([the help page](https://help.adobe.com/archive/en_US/illustrator/cs4/illustrator_cs4_help.pdf#page=395)). The search lowers JPEG quality or palette colors (GIF then lossy) and encodes at most 32 trial settings; Auto Select chooses GIF for transparent art or art of at most 256 colors and JPEG otherwise. The slices share one setting, so every Use choice changes all of them (`webExport.optimizeToFileSize`). Scores and estimates are unchanged.
|
||||
- Save for Web: while Alt (Option on macOS) is held, the dialog's Cancel button reads Reset, which puts the remembered settings back on the document's active artboard and leaves the dialog open (`ui.dialogReset`).
|
||||
- Save for Web: the color table's trash button and Delete Color in its menu remove the selected GIF or PNG-8 colors, and their pixels take the nearest color left in the palette ([the help page](https://help.adobe.com/archive/en_US/illustrator/cs4/illustrator_cs4_help.pdf#page=404)). Click selects one color, Shift-click a range and Ctrl-click (Command-click on macOS) adds or removes one ([the help page](https://help.adobe.com/archive/en_US/illustrator/cs3/illustrator_cs3_help.pdf#page=398)). After the first deletion the table is a fixed Custom palette, so deleted colors stay out when the preview updates. These rules are VectorCraft's own: a deleted color is no longer locked, transparent or web-shifted; deleting every opaque color is refused; Restore Generated Table in the menu, or another reduction, goes back to the generated palette; presets and the remembered settings keep the edit (`colorTable.deleted`, `colorTable.customPalette`). Fixed palettes can also use all 256 entries when nothing is transparent. Scores and estimates are unchanged.
|
||||
- Save for Web: double-clicking a GIF or PNG-8 color-table swatch opens the Color Picker, and its OK changes that color to the one picked everywhere it appears in the image. The swatch then shows the original color in its upper-left half and the new one in its lower-right half, with the lock mark, and the color stays through a lower color count. Double-clicking a changed swatch opens the picker on the original color, and OK on it changes the color back; Unshift All Colors in the table's menu undoes every change, web shifts included ([the help page](https://help.adobe.com/archive/en_US/illustrator/cs3/illustrator_cs3_help.pdf#page=383)). These rules are VectorCraft's own: Cancel changes nothing; a changed color wins over Web Shift, Web Snap and Lock, and pressing Web Shift replaces it; a color mapped to transparent stays transparent; two colors may change to the same color; a changed color takes a kept palette slot before a locked one, and one slot always stays for the reduction; the change is kept by source color when the reduction changes and applies only while that source is in the table; presets and the remembered settings keep it; the picker opens with Only Web Colors off (`colorTable.shifted`). GIF lossy compression now compares pixels with the reduction's colors, so a changed color does not take in another color's pixels. Scores and estimates are unchanged.
|
||||
- Export for Screens, Save for Web (slice images, and files named after the document's title) and the Libraries panel name files with the characters Windows does not allow written as `-` and with a `-` after a Windows device name such as `CON`, on every platform (`document.exportForScreens`, `document.exportForWeb`, `library.create`).
|
||||
- Variables (data merge): text, visibility and image variables bound to objects (an object may carry several), dataset rows applied in one undo step (`variable.*`, `dataset.*`) from a Variables panel and Window › Variables, with dialogs to define, bind and edit, Make Text/Visibility/Image Dynamic, Capture/Update Data Set, CSV import/export (`dataset.import` / `dataset.export`), and a row in italics when an edit leaves the art not matching it; an image dataset value is a file path and apply keeps the object's bounds; bindings let go of deleted art and locked art is left alone except by visibility values; every command, like the rest, is drivable over MCP and the CLI.
|
||||
- Export for Screens numbers distinct row files whose names collide, compared without case, as `-2`, `-3`… instead of leaving them out; identical rows still write one file. It puts row folders that differ only in case into one folder (`document.exportForScreens`).
|
||||
|
||||
Reference in new issue
Block a user