mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-25 20:01:07 +01:00
Merge main and preserve Brush Key Color canvas picking
This commit is contained in:
commit
f6fd818cc9
115 files changed
+6153
-795
No files matched your search
Generated
+9
@@ -1224,6 +1224,14 @@ dependencies = [
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "craft-plotter"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/storytold/craft-libs?rev=9101c4fc226f5f111b5a890a6c5c19bf3991fd76#9101c4fc226f5f111b5a890a6c5c19bf3991fd76"
|
||||
dependencies = [
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "craft-print"
|
||||
version = "0.1.0"
|
||||
@@ -6720,6 +6728,7 @@ version = "0.24.1"
|
||||
dependencies = [
|
||||
"craft-dxf",
|
||||
"craft-image-codecs 0.1.0 (git+https://github.com/storytold/craft-libs?rev=a499742a9389f47d10cdc61e4cdbf4e5f07f48cd)",
|
||||
"craft-plotter",
|
||||
"image",
|
||||
"kurbo 0.13.1",
|
||||
"serde_json",
|
||||
|
||||
@@ -32,6 +32,7 @@ craft-mime = { git = "https://github.com/storytold/craft-libs", rev = "a499742a9
|
||||
# EPS container, previews, ASCII85 and DSC comments (craft-libs#778).
|
||||
craft-eps = { git = "https://github.com/storytold/craft-libs", rev = "a499742a9389f47d10cdc61e4cdbf4e5f07f48cd" }
|
||||
# DXF tags, reader and writer (craft-libs#778, #926, #927).
|
||||
craft-plotter = { git = "https://github.com/storytold/craft-libs", rev = "9101c4fc226f5f111b5a890a6c5c19bf3991fd76" }
|
||||
craft-dxf = { git = "https://github.com/storytold/craft-libs", rev = "a499742a9389f47d10cdc61e4cdbf4e5f07f48cd" }
|
||||
# WMF, EMF and EMF+ reader (craft-libs#778).
|
||||
craft-metafile = { git = "https://github.com/storytold/craft-libs", rev = "a499742a9389f47d10cdc61e4cdbf4e5f07f48cd" }
|
||||
|
||||
@@ -10,6 +10,7 @@ workspace = true
|
||||
|
||||
[dependencies]
|
||||
craft-dxf = { workspace = true }
|
||||
craft-plotter = { workspace = true }
|
||||
vectorcraft-geom = { workspace = true }
|
||||
vectorcraft-color = { workspace = true }
|
||||
vectorcraft-doc = { workspace = true }
|
||||
|
||||
+2
-428
@@ -1,428 +1,2 @@
|
||||
//! The bytes of an HP-GL file as instructions: two-letter mnemonics and the parameters that follow
|
||||
//! them, read one at a time as the plot asks for them. Printer escape sequences (PCL, HP RTL, the
|
||||
//! HP-GL device-control escapes) and PJL lines around and between the instructions are skipped,
|
||||
//! with the data their escapes carry.
|
||||
|
||||
/// The end-of-text character, the default label terminator.
|
||||
pub(super) const ETX: u8 = 3;
|
||||
const ESC: u8 = 0x1b;
|
||||
|
||||
/// The most digits of a number that count: longer ones are read as their first digits.
|
||||
const MAX_DIGITS: usize = 18;
|
||||
|
||||
/// What the bytes being read hold.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
enum Mode {
|
||||
/// HP-GL instructions.
|
||||
Hpgl,
|
||||
/// PCL or HP RTL: escape sequences and their data, nothing to draw.
|
||||
Pcl,
|
||||
/// After a Universal Exit Language: PJL lines until a language starts.
|
||||
Pjl,
|
||||
}
|
||||
|
||||
/// One item of a PE (Polyline Encoded) instruction.
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub(super) enum PeItem {
|
||||
/// Select pen.
|
||||
Pen(i64),
|
||||
/// Rectangle mode: the following coordinates come in fours.
|
||||
Rect,
|
||||
/// A coordinate pair, after a pen-up flag (`up`) and an absolute flag (`absolute`).
|
||||
Point { x: f64, y: f64, up: bool, absolute: bool },
|
||||
}
|
||||
|
||||
/// The state of one PE instruction being read.
|
||||
#[derive(Clone, Copy, Debug, Default)]
|
||||
pub(super) struct Pe {
|
||||
seven_bit: bool,
|
||||
fraction_bits: u32,
|
||||
up: bool,
|
||||
absolute: bool,
|
||||
}
|
||||
|
||||
pub(super) struct Lexer<'a> {
|
||||
b: &'a [u8],
|
||||
at: usize,
|
||||
mode: Mode,
|
||||
/// The file holds HP RTL or PCL raster image data.
|
||||
pub raster: bool,
|
||||
}
|
||||
|
||||
/// Is `c` a byte that separates numeric parameters (or white space between instructions)?
|
||||
fn separator(c: u8) -> bool {
|
||||
matches!(c, b' ' | b',' | b'\t' | b'\r' | b'\n' | 0)
|
||||
}
|
||||
|
||||
impl<'a> Lexer<'a> {
|
||||
pub fn new(b: &'a [u8]) -> Self {
|
||||
Self { b, at: 0, mode: Mode::Hpgl, raster: false }
|
||||
}
|
||||
|
||||
fn peek(&self) -> Option<u8> {
|
||||
self.b.get(self.at).copied()
|
||||
}
|
||||
|
||||
/// Whether everything has been read.
|
||||
pub fn done(&self) -> bool {
|
||||
self.at >= self.b.len()
|
||||
}
|
||||
|
||||
/// How many bytes have been read.
|
||||
pub fn pos(&self) -> usize {
|
||||
self.at
|
||||
}
|
||||
|
||||
/// The next instruction's mnemonic, in upper case; `strict`: only white space, semicolons and
|
||||
/// escape sequences may come before it (anything else gives `None`, as the end does).
|
||||
pub fn op(&mut self, strict: bool) -> Option<[u8; 2]> {
|
||||
loop {
|
||||
let c = self.peek()?;
|
||||
if c == ESC {
|
||||
self.escape();
|
||||
continue;
|
||||
}
|
||||
match self.mode {
|
||||
Mode::Pcl => {
|
||||
self.at += 1;
|
||||
continue;
|
||||
}
|
||||
Mode::Pjl => {
|
||||
if separator(c) {
|
||||
self.at += 1;
|
||||
} else if c == b'@' {
|
||||
self.pjl_line();
|
||||
} else {
|
||||
self.mode = Mode::Hpgl;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
Mode::Hpgl => {}
|
||||
}
|
||||
let next = self.b.get(self.at + 1).copied();
|
||||
if c.is_ascii_alphabetic()
|
||||
&& let Some(n) = next.filter(u8::is_ascii_alphabetic)
|
||||
{
|
||||
self.at += 2;
|
||||
return Some([c.to_ascii_uppercase(), n.to_ascii_uppercase()]);
|
||||
}
|
||||
if strict && !(separator(c) || c == b';' || c < 0x20) {
|
||||
return None;
|
||||
}
|
||||
self.at += 1;
|
||||
}
|
||||
}
|
||||
|
||||
/// One `@PJL` line: an `ENTER LANGUAGE` command picks what follows.
|
||||
fn pjl_line(&mut self) {
|
||||
let rest = &self.b[self.at..];
|
||||
let end = rest.iter().position(|&c| c == b'\n').map_or(rest.len(), |n| n + 1);
|
||||
// A command names its language within its first 256 bytes; longer lines aren't copied.
|
||||
let line = String::from_utf8_lossy(&rest[..end.min(256)]).to_ascii_uppercase();
|
||||
if let Some(lang) = line.split_once("LANGUAGE").map(|(_, l)| l.trim_start_matches([' ', '=']).trim()) {
|
||||
self.mode = if lang.starts_with("HPGL") { Mode::Hpgl } else { Mode::Pcl };
|
||||
}
|
||||
self.at += end;
|
||||
}
|
||||
|
||||
/// An escape sequence at the current byte, with the data it carries.
|
||||
fn escape(&mut self) {
|
||||
self.at += 1;
|
||||
let Some(c) = self.peek() else { return };
|
||||
self.at += 1;
|
||||
match c {
|
||||
// Universal Exit Language (`ESC%-12345X`) and the language switches (`ESC%#B` to HP-GL,
|
||||
// `ESC%#A` to PCL or HP RTL).
|
||||
b'%' => {
|
||||
let (_, end) = self.value();
|
||||
match end {
|
||||
Some(b'X') => self.mode = Mode::Pjl,
|
||||
Some(b'B') => self.mode = Mode::Hpgl,
|
||||
Some(b'A') => self.mode = Mode::Pcl,
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
// Reset: PCL follows, until a language switch.
|
||||
b'E' => self.mode = Mode::Pcl,
|
||||
// HP-GL device control: `ESC.` and a letter, with parameters up to a colon.
|
||||
b'.' => {
|
||||
let Some(kind) = self.peek() else { return };
|
||||
self.at += 1;
|
||||
if !b"()YZBEJKLORUX".contains(&kind) {
|
||||
let rest = &self.b[self.at..self.b.len().min(self.at + 80)];
|
||||
if let Some(n) = rest.iter().position(|&c| c == b':')
|
||||
&& rest[..n].iter().all(|c| c.is_ascii_digit() || matches!(c, b';' | b' ' | b','))
|
||||
{
|
||||
self.at += n + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Parameterized PCL: a group character, then values each ending in a letter (upper case
|
||||
// ends the sequence); `W`, `*b…V` (raster data by plane) and `&p…X` (transparent print
|
||||
// data) are followed by that many bytes of data. Without a group character (`ESC(8U`,
|
||||
// `ESC)0N`), one value and the letter ending it.
|
||||
0x21..=0x2f => {
|
||||
let Some(group) = self.peek().filter(|g| (0x60..=0x7e).contains(g)) else {
|
||||
self.value();
|
||||
return;
|
||||
};
|
||||
self.at += 1;
|
||||
loop {
|
||||
let (v, end) = self.value();
|
||||
let Some(end) = end else { return };
|
||||
let upper = end.to_ascii_uppercase();
|
||||
if upper == b'W' || (c, group, upper) == (b'*', b'b', b'V') || (c, group, upper) == (b'&', b'p', b'X') {
|
||||
let n = v.max(0.0).min((self.b.len() - self.at) as f64) as usize;
|
||||
if (c, group) == (b'*', b'b') && n > 0 {
|
||||
self.raster = true;
|
||||
}
|
||||
self.at += n;
|
||||
}
|
||||
if (c, group, end) == (b'*', b'r', b'A') {
|
||||
self.raster = true;
|
||||
}
|
||||
if !end.is_ascii_lowercase() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
// A two-character escape.
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
/// A PCL value (`[+-]digits[.digits]`, any part missing) and the character that ends it; `None`
|
||||
/// when that is not a letter or `@` (which is then left unread).
|
||||
fn value(&mut self) -> (f64, Option<u8>) {
|
||||
let v = self.number_here().unwrap_or(0.0);
|
||||
match self.peek() {
|
||||
Some(c) if c.is_ascii_alphabetic() || c == b'@' => {
|
||||
self.at += 1;
|
||||
(v, Some(c))
|
||||
}
|
||||
_ => (v, None),
|
||||
}
|
||||
}
|
||||
|
||||
/// A number starting at the current byte (`[+-]digits[.digits]`), `None` when it has no digit
|
||||
/// (its sign and point are read all the same).
|
||||
fn number_here(&mut self) -> Option<f64> {
|
||||
let mut neg = false;
|
||||
if let Some(c @ (b'+' | b'-')) = self.peek() {
|
||||
neg = c == b'-';
|
||||
self.at += 1;
|
||||
}
|
||||
let (mut v, mut digits, mut scale) = (0.0f64, 0usize, 1.0f64);
|
||||
let mut point = false;
|
||||
while let Some(c) = self.peek() {
|
||||
if c.is_ascii_digit() {
|
||||
if digits < MAX_DIGITS {
|
||||
if point {
|
||||
scale /= 10.0;
|
||||
v += f64::from(c - b'0') * scale;
|
||||
} else {
|
||||
v = v * 10.0 + f64::from(c - b'0');
|
||||
}
|
||||
} else if !point {
|
||||
// Past the digits that count, an integer part keeps its size.
|
||||
v *= 10.0;
|
||||
}
|
||||
digits += 1;
|
||||
} else if c == b'.' && !point {
|
||||
point = true;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
self.at += 1;
|
||||
}
|
||||
let v = v.min(f64::MAX);
|
||||
(digits > 0).then_some(if neg { -v } else { v })
|
||||
}
|
||||
|
||||
/// The next numeric parameter of the instruction being read, or `None` at its end (a semicolon
|
||||
/// ending it is read).
|
||||
pub fn number(&mut self) -> Option<f64> {
|
||||
loop {
|
||||
let c = self.peek()?;
|
||||
if separator(c) {
|
||||
self.at += 1;
|
||||
} else if c.is_ascii_digit() || matches!(c, b'+' | b'-' | b'.') {
|
||||
if let Some(v) = self.number_here() {
|
||||
return Some(v);
|
||||
}
|
||||
} else {
|
||||
if c == b';' {
|
||||
self.at += 1;
|
||||
}
|
||||
return None;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Up to `out.len()` numeric parameters into `out` (the rest are read and dropped) → how many.
|
||||
pub fn numbers(&mut self, out: &mut [f64]) -> usize {
|
||||
let mut n = 0;
|
||||
while let Some(v) = self.number() {
|
||||
if let Some(slot) = out.get_mut(n) {
|
||||
*slot = v;
|
||||
}
|
||||
n += 1;
|
||||
}
|
||||
n.min(out.len())
|
||||
}
|
||||
|
||||
/// Read and drop the parameters of the instruction being read: numbers and quoted strings.
|
||||
pub fn params(&mut self) {
|
||||
loop {
|
||||
while self.number().is_some() {}
|
||||
if self.peek() != Some(b'"') {
|
||||
return;
|
||||
}
|
||||
self.quoted();
|
||||
}
|
||||
}
|
||||
|
||||
/// Read and drop numeric parameters → whether a semicolon ended them (an instruction the reader
|
||||
/// doesn't know, written out in full).
|
||||
pub fn closed_params(&mut self) -> bool {
|
||||
while self.number().is_some() {}
|
||||
self.at > 0 && self.b.get(self.at - 1) == Some(&b';')
|
||||
}
|
||||
|
||||
/// A comment (CO): its quoted string or nothing, then the terminator or the end → whether it
|
||||
/// is one.
|
||||
pub fn comment(&mut self) -> bool {
|
||||
while self.peek().is_some_and(separator) {
|
||||
self.at += 1;
|
||||
}
|
||||
match self.peek() {
|
||||
Some(b'"') => self.quoted(),
|
||||
Some(b';') => {
|
||||
self.at += 1;
|
||||
true
|
||||
}
|
||||
None => true,
|
||||
Some(_) => false,
|
||||
}
|
||||
}
|
||||
|
||||
/// The text of a label, up to and including `terminator` (or the end).
|
||||
pub fn label(&mut self, terminator: u8) {
|
||||
let rest = &self.b[self.at..];
|
||||
self.at += rest.iter().position(|&c| c == terminator).map_or(rest.len(), |n| n + 1);
|
||||
}
|
||||
|
||||
/// A quoted string (CO): the parameters up to its closing quote, then the terminator → whether
|
||||
/// there was one.
|
||||
pub fn quoted(&mut self) -> bool {
|
||||
while self.peek().is_some_and(separator) {
|
||||
self.at += 1;
|
||||
}
|
||||
let found = self.peek() == Some(b'"');
|
||||
if found {
|
||||
self.at += 1;
|
||||
let rest = &self.b[self.at..];
|
||||
self.at += rest.iter().position(|&c| c == b'"').map_or(rest.len(), |n| n + 1);
|
||||
}
|
||||
if self.peek() == Some(b';') {
|
||||
self.at += 1;
|
||||
}
|
||||
found
|
||||
}
|
||||
|
||||
/// The character right after the mnemonic (DT, SM), `None` when it is a semicolon or the end
|
||||
/// (the semicolon is read).
|
||||
pub fn char(&mut self) -> Option<u8> {
|
||||
let c = self.peek()?;
|
||||
self.at += 1;
|
||||
(c != b';').then_some(c)
|
||||
}
|
||||
|
||||
/// The next item of a PE instruction, `None` at its end (its semicolon is read).
|
||||
pub fn pe(&mut self, st: &mut Pe) -> Option<PeItem> {
|
||||
loop {
|
||||
let raw = self.peek()?;
|
||||
let c = raw & 0x7f;
|
||||
// Spaces, deletes, control characters and bytes 128 to 160 and 255 are ignored.
|
||||
if raw <= 32 || raw == 127 || (128..=160).contains(&raw) || raw == 255 {
|
||||
self.at += 1;
|
||||
continue;
|
||||
}
|
||||
match c {
|
||||
b';' => {
|
||||
self.at += 1;
|
||||
return None;
|
||||
}
|
||||
// Flags keep their meaning with the eighth bit set; digits are 63 and up (191 and up).
|
||||
b':' | b'<' | b'>' | b'=' | b'7' | b'9' if raw < 63 || (0xb7..191).contains(&raw) => {
|
||||
self.at += 1;
|
||||
match c {
|
||||
b':' => return self.pe_value(st).map(PeItem::Pen).or_else(|| self.end_pe()),
|
||||
b'<' => st.up = true,
|
||||
b'>' => match self.pe_value(st) {
|
||||
Some(n) => st.fraction_bits = n.clamp(0, 52) as u32,
|
||||
None => return self.end_pe(),
|
||||
},
|
||||
b'=' => st.absolute = true,
|
||||
b'7' => st.seven_bit = true,
|
||||
_ => return Some(PeItem::Rect),
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
let scale = 0.5f64.powi(st.fraction_bits as i32);
|
||||
let (Some(x), Some(y)) = (self.pe_value(st), self.pe_value(st)) else { return self.end_pe() };
|
||||
let item = PeItem::Point { x: x as f64 * scale, y: y as f64 * scale, up: st.up, absolute: st.absolute };
|
||||
(st.up, st.absolute) = (false, false);
|
||||
return Some(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The rest of a PE instruction that can't be decoded: see [`Lexer::skip_pe`].
|
||||
fn end_pe(&mut self) -> Option<PeItem> {
|
||||
self.skip_pe();
|
||||
None
|
||||
}
|
||||
|
||||
/// The data of a PE instruction, up to and including its semicolon, unread: its data is never
|
||||
/// read as instructions.
|
||||
pub fn skip_pe(&mut self) {
|
||||
let rest = &self.b[self.at..];
|
||||
self.at += rest.iter().position(|&c| c == b';').map_or(rest.len(), |n| n + 1);
|
||||
}
|
||||
|
||||
/// One encoded PE number, `None` when the instruction ends inside it (or a byte that is no
|
||||
/// digit comes first, which is read).
|
||||
fn pe_value(&mut self, st: &Pe) -> Option<i64> {
|
||||
let (base, low, high): (u64, std::ops::RangeInclusive<u8>, std::ops::RangeInclusive<u8>) =
|
||||
if st.seven_bit { (32, 63..=94, 95..=126) } else { (64, 63..=126, 191..=254) };
|
||||
let (mut v, mut place) = (0u64, 1u64);
|
||||
loop {
|
||||
let raw = self.peek()?;
|
||||
let c = if st.seven_bit { raw & 0x7f } else { raw };
|
||||
if raw <= 32 || raw == 127 || (128..=160).contains(&raw) || raw == 255 {
|
||||
self.at += 1;
|
||||
continue;
|
||||
}
|
||||
if c == b';' {
|
||||
return None;
|
||||
}
|
||||
self.at += 1;
|
||||
let (digit, last) = if low.contains(&c) {
|
||||
(u64::from(c - 63), false)
|
||||
} else if high.contains(&c) {
|
||||
(u64::from(c - high.start()), true)
|
||||
} else {
|
||||
return None;
|
||||
};
|
||||
v = v.saturating_add(digit.saturating_mul(place));
|
||||
place = place.saturating_mul(base);
|
||||
if last {
|
||||
// The low bit is the sign.
|
||||
let n = i64::try_from(v >> 1).unwrap_or(i64::MAX);
|
||||
return Some(if v & 1 == 1 { -n } else { n });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//! Shared HP-GL byte lexer; drawing interpretation remains local.
|
||||
pub(super) use craft_plotter::hpgl::lex::{ETX, Lexer, Pe, PeItem};
|
||||
@@ -294,13 +294,19 @@ impl GuideOptions {
|
||||
}
|
||||
}
|
||||
|
||||
/// The share of the way to its target (black or white, cool or warm, gray or full color) that the
|
||||
/// variation at `step` goes: 0 at the center, the options' reach at the outermost steps.
|
||||
pub fn step_fraction(opts: &GuideOptions, step: i32) -> f32 {
|
||||
(step.unsigned_abs() as f32 / opts.steps.max(1) as f32).min(1.0) * opts.reach()
|
||||
}
|
||||
|
||||
/// Variation of `c` at `step` (−steps..=steps: negative towards shades/cool/muted, positive towards
|
||||
/// tints/warm/vivid; 0 is `c` itself), in `c`'s model.
|
||||
pub fn variation(c: Color, opts: &GuideOptions, step: i32) -> Color {
|
||||
if step == 0 {
|
||||
return c;
|
||||
}
|
||||
let f = (step.unsigned_abs() as f32 / opts.steps.max(1) as f32).min(1.0) * opts.reach();
|
||||
let f = step_fraction(opts, step);
|
||||
let v = match opts.variation {
|
||||
Variation::TintsShades => c.lerp(if step < 0 { &Color::BLACK } else { &Color::WHITE }, f),
|
||||
Variation::WarmCool => {
|
||||
|
||||
@@ -2174,6 +2174,70 @@ pub fn blend_steps(keys: &[Arc<Node>], spec: &BlendSpec) -> Vec<usize> {
|
||||
StepCount::default().blend(keys, spec, Rail::new(keys, spec).as_ref()).0
|
||||
}
|
||||
|
||||
/// Does each pair of `keys` blended with `spec` ask for the same number of steps
|
||||
/// ([`blend_step_count`]) when each coordinate it counts from moves by up to `length` points and,
|
||||
/// for Smooth Color, the difference between keys of different colors by up to `color` (0 to 1)?
|
||||
/// False when a count sits that close to where it changes, and for Smooth Color by distance when
|
||||
/// the keys are at most `4 × length` wide or high. Specified Steps always asks for the same number.
|
||||
pub fn blend_steps_settled(keys: &[Arc<Node>], spec: &BlendSpec, length: f64, color: f64) -> bool {
|
||||
let rail = Rail::new(keys, spec);
|
||||
keys.windows(2).enumerate().all(|(i, w)| {
|
||||
let [a, b] = w else { return true };
|
||||
match spec.spacing {
|
||||
BlendSpacing::Steps(_) => true,
|
||||
// The count is `len / d` rounded, which grows with `len`.
|
||||
BlendSpacing::Distance(d) => {
|
||||
let len = rail.as_ref().map_or_else(|| center_of(a).distance(center_of(b)), |r| r.len(i));
|
||||
let count = |len: f64| blend_step_count(a, b, BlendSpacing::Distance(d), len);
|
||||
count(len - length) == count(len + length)
|
||||
}
|
||||
BlendSpacing::SmoothColor => smooth_color_settled(a, b, length, color),
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/// [`blend_steps_settled`] for one pair of Smooth Color keys. Each count [`blend_step_count`]
|
||||
/// takes grows with what it counts from (the color difference, the keys' reach, the distance
|
||||
/// between their edges in key sizes), so the pair is settled when the least and the most of
|
||||
/// these ask for the same count.
|
||||
fn smooth_color_settled(a: &Node, b: &Node, length: f64, color: f64) -> bool {
|
||||
let bounds = a.visual_bounds().zip(b.visual_bounds());
|
||||
let by_level = |d: f64| level_steps(d.max(0.0)) as usize;
|
||||
match (color_distance(a, b), bounds) {
|
||||
// Colors that differ, but by too little to count, or by little more: moving them may cross
|
||||
// where they stop counting as the same. (The same colors stay the same.)
|
||||
(Some(d), _) if d > 0.0 && d * 255.0 <= 1e-3 + color * 255.0 => false,
|
||||
(Some(d), Some((ba, bb))) if d * 255.0 > 1e-3 => {
|
||||
let (ca, cb) = (ba.center(), bb.center());
|
||||
let reach =
|
||||
[(ca.x - cb.x).abs(), (ca.y - cb.y).abs(), ba.width(), ba.height(), bb.width(), bb.height()].into_iter().fold(0.0f64, f64::max);
|
||||
// The centers and sizes move by up to twice `length`.
|
||||
let by_density = |r: f64| (8.0 * r.max(0.0) + 0.5).floor().clamp(1.0, 254.0) as usize;
|
||||
let least = by_level(d - color).min(by_density(reach - 2.0 * length));
|
||||
let most = by_level(d + color).min(by_density(reach + 2.0 * length));
|
||||
reach.is_finite() && least == most
|
||||
}
|
||||
(Some(d), None) if d * 255.0 > 1e-3 => by_level(d - color) == by_level(d + color),
|
||||
(_, Some((ba, bb))) => {
|
||||
let (w, h) = ((ba.width() + bb.width()) / 2.0, (ba.height() + bb.height()) / 2.0);
|
||||
if w <= 4.0 * length || h <= 4.0 * length {
|
||||
return false;
|
||||
}
|
||||
let dx = (ba.x0 - bb.x0).abs().max((ba.x1 - bb.x1).abs());
|
||||
let dy = (ba.y0 - bb.y0).abs().max((ba.y1 - bb.y1).abs());
|
||||
// Each edge moves by up to `length`: the distances between them by up to twice that,
|
||||
// and the mean sizes too.
|
||||
let q = |dx: f64, dy: f64, w: f64, h: f64| (dx.max(0.0) / w).max(dy.max(0.0) / h);
|
||||
let count = |q: f64| ((q + 0.5).floor() - 1.0).clamp(1.0, 1000.0) as usize;
|
||||
let m = 2.0 * length;
|
||||
let least = q(dx - m, dy - m, w + m, h + m);
|
||||
let most = q(dx + m, dy + m, w - m, h - m);
|
||||
least.is_finite() && most.is_finite() && count(least) == count(most)
|
||||
}
|
||||
(_, None) => true,
|
||||
}
|
||||
}
|
||||
|
||||
/// Evaluate a blend: the keys and generated steps in paint order. The steps keep to
|
||||
/// [`MAX_BLEND_STEPS`] in all ([`blend_steps`]).
|
||||
pub fn blend_expand(keys: &[Arc<Node>], spec: &BlendSpec) -> Vec<Node> {
|
||||
@@ -3535,4 +3599,46 @@ mod tests {
|
||||
let (keys, spec) = blend_parts(&outer).unwrap();
|
||||
assert_eq!(blend_steps(keys, spec), vec![99]);
|
||||
}
|
||||
|
||||
/// A count is settled when moving the lengths by 0.01 pt and the colors by 0.001 can't change
|
||||
/// it: Specified Steps always; Specified Distance unless the spine's length is a half step from
|
||||
/// where its count changes; Smooth Color unless the colors differ by too little to count, the
|
||||
/// color difference or the keys' reach sits where its count changes, or keys of the same color
|
||||
/// are at most four times 0.01 pt wide.
|
||||
#[test]
|
||||
fn steps_settle_unless_rounding_can_change_their_count() {
|
||||
let (length, color) = (0.01, 0.001);
|
||||
let settled = |a: Node, b: Node, spacing: BlendSpacing| {
|
||||
let spec = BlendSpec { spacing, ..Default::default() };
|
||||
blend_steps_settled(&[Arc::new(a), Arc::new(b)], &spec, length, color)
|
||||
};
|
||||
let filled = |x: f64, size: f64, c: Color| smooth_key((x, 0.0), (size, size), Paint::solid(c), Paint::None, 0.0);
|
||||
let gray = |x: f64| filled(x, 10.0, Color::rgb(0.5, 0.5, 0.5));
|
||||
|
||||
// The keys' centers are 100 pt apart: 100 / 25 is 4, and 100 / (100 / 3.5) is 3.5.
|
||||
assert!(settled(gray(0.0), gray(100.0), BlendSpacing::Steps(3)));
|
||||
assert!(settled(gray(0.0), gray(100.0), BlendSpacing::Distance(25.0)));
|
||||
assert!(!settled(gray(0.0), gray(100.0), BlendSpacing::Distance(100.0 / 3.5)));
|
||||
|
||||
// Smooth Color between colors that differ: by a 2,000th of a step, by 51 steps of 255
|
||||
// (settled) and by 51.5 (where the count changes).
|
||||
let red = |x: f64, r: f32| filled(x, 10.0, Color::rgb(r, 0.0, 0.0));
|
||||
assert!(!settled(red(0.0, 0.0), red(100.0, 0.0005), BlendSpacing::SmoothColor));
|
||||
assert!(settled(red(0.0, 0.0), red(100.0, 51.0 / 255.0), BlendSpacing::SmoothColor));
|
||||
assert!(!settled(red(0.0, 0.0), red(100.0, 51.5 / 255.0), BlendSpacing::SmoothColor));
|
||||
// Black to white is counted by the keys' reach, eight steps a point: 10 pt is settled,
|
||||
// 10.0625 pt (80.5 steps) is not.
|
||||
let near = |size: f64| settled(filled(0.0, size, Color::BLACK), filled(5.0, size, Color::WHITE), BlendSpacing::SmoothColor);
|
||||
assert!(near(10.0));
|
||||
assert!(!near(10.0625));
|
||||
// Keys without bounds are counted by their colors alone.
|
||||
let bare = |r: f32| Node::path(NodeId(1), PathData::default(), Appearance::basic(Paint::solid(Color::rgb(r, 0.0, 0.0)), Paint::None, 0.0));
|
||||
assert!(settled(bare(0.0), bare(51.0 / 255.0), BlendSpacing::SmoothColor));
|
||||
assert!(!settled(bare(0.0), bare(51.5 / 255.0), BlendSpacing::SmoothColor));
|
||||
// Keys of the same color are counted by distance in key sizes; keys 0.04 pt wide or less
|
||||
// are never settled.
|
||||
assert!(settled(gray(0.0), gray(100.0), BlendSpacing::SmoothColor));
|
||||
assert!(!settled(filled(0.0, 0.04, Color::rgb(0.5, 0.5, 0.5)), filled(100.0, 0.04, Color::rgb(0.5, 0.5, 0.5)), BlendSpacing::SmoothColor));
|
||||
assert!(settled(filled(0.0, 0.05, Color::rgb(0.5, 0.5, 0.5)), filled(100.0, 0.05, Color::rgb(0.5, 0.5, 0.5)), BlendSpacing::SmoothColor));
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Export Document",
|
||||
[],
|
||||
None,
|
||||
"{path?, format?: svg|svgz|pdf|ai|png|jpg|webp|gif|png8|txt|dxf|eps|emf|wmf|hpgl|tiff|bmp|tga|psd|vectorcraft|template (default: from the path's extension, else png; png8 writes an indexed .png; ait, a .ait template, is written by file.saveAsTemplate; an exporter plug-in's format is plugin.<plug-in id>, which an extension only it lists picks too), params?: {…} (an exporter plug-in's parameters; missing ones take their defaults, see plugin.info), selectedOnly?: false (the selected objects alone, in the layers and groups that hold them; an object of a blend, envelope, repeat or intertwine on its own), includeArtboardFill?: true (raster, PDF, SVG and EPS draw each exported artboard's background color behind its art, a transparent background too; false leaves it out), artboard?: 0, artboards?: [i…], rect?: [x, y, width, height] (raster formats: that area of the page in points, y down, instead of an artboard; not with artboard, artboards, range or useArtboards), range?: \"1-3, 5\" | \"all\" (1-based; PDF and .ai write one page per artboard, default all; SVG writes one file per artboard, {stem}-{artboard}.svg; raster formats write one artboard), useArtboards?: true (raster: one file per chosen artboard, default all, {stem}-{artboard}.{ext}; pdf/ai: every page) | false (pdf/ai/raster: the bounds of the visible art; pdf/ai: of the layers the file draws, without editing data, with a warning, and ai refuses pdfCompatible: false; SVG has it as an SVG option), ppi?: number (raster formats: pixels per inch, stored in the file; wins over scale; without either, the document's raster effects resolution), scale?: number (pixels per point), background?: transparent|white|black|\"#rrggbb\" (jpg: white when transparent; #rrggbbaa and #rgba are refused here and in matte), antiAlias?: none|art (default)|type (text snapped to pixels), interlaced?: false (png, Adam7), embedIcc?: true (png: an sRGB chunk marks the colours as sRGB), quality?: 90 (jpg: 0–100), colorModel?: rgb|cmyk|gray (jpg), method?: baseline|optimized|progressive, scans?: 3 (3–5, progressive), embedIcc?: true, imageMap?: none|client|server (an HTML or NCSA map of the objects with a URL, written as <stem>.html / <stem>.map), colors?: 256 (gif/png8: 2–256), reduction?: perceptual|selective (default)|adaptive|web|blackWhite|gray, dither?: none|diffusion (default)|pattern|noise, ditherAmount?: 100, transparency?: true, matte?: white|\"#rrggbb\"|none, interlaced?, lossless?: true (webp: lossy WebP isn't available yet: written lossless, with a warning), encoding?: utf8|utf16 (txt: the stories in stacking order, back to front, a thread once; utf16 with a byte order mark), lineEndings?: lf|crlf, selectionOnly?: false, svg?: {styling, outlineText, images, objectIds, decimals, minify, responsive, useArtboards, preserveEditing, metadata, fewerTspans, hiddenLayers, encoding, profile, embedFonts, variableData} (see document.formats), …the SVG options given flat instead, …the PDF options of document.exportPdf, …the DXF options of document.exportDxf (useArtboards: one drawing per artboard), …the EPS options of document.exportEps (useArtboards: one file per artboard, {stem}_{artboard}.eps, after a central {stem}.eps of the whole document when there are two or more and art shows; else the visible art), …emf and wmf write one picture of the artboard (useArtboards: true one file per chosen artboard, false the bounds of the visible art; EMF keeps curves, clipping, transparent images and gradients as images clipped to their shape; WMF flattens curves into polygons behind a placeable header; what a format leaves out comes back in warnings), …hpgl writes a plot of the artboard as pen moves for plotters and cutters (each visible path once along its line in plotter units; useArtboards: true one file per chosen artboard, false the bounds of the art it plots, without placed images, unpainted paths and art at 0% opacity), hpglVersion?: hpgl (default: IN, SP, PU, PD) | hpgl2 (also NP and PC pen colors, each pen's paths as one encoded polyline PE), curveTolerance?: 0.1 (points, 0.01 to 10), pens?: [\"#rrggbb\"…] (pen 1 first, up to 255; each path takes the nearest; default a pen per color in the order the art first draws in it, numbered alike in every file), origin?: bottomLeft (default) | center, sortPaths?: false (each pen's next path the nearest), insideFirst?: false (a path after the pen's paths that lie inside it), colorModel?: rgb|cmyk|gray (tiff: rgb keeps transparency as an alpha channel), lzw?: true, byteOrder?: little|big, embedIcc?: true, colorModel?: rgb|gray (bmp), depth?: 24 (bmp: 1 black and white, 4|8 a palette by reduction and dither, 16, 24, 32 with alpha), fileFormat?: windows|os2 (1, 4, 8 or 24 bits), rle?: false (4 and 8 bits, windows), flipRows?: false (top-down rows), depth?: 24 (tga: 16 one-bit alpha, 24, 32 with alpha), colorModel?: rgb|cmyk|gray (psd), layers?: true (each top-level layer a pixel layer with its opacity and blend mod
Line truncated
|
||||
"{path?, format?: svg|svgz|pdf|ai|png|jpg|webp|gif|png8|txt|dxf|eps|emf|wmf|hpgl|tiff|bmp|tga|psd|vectorcraft|template (default: from the path's extension, else png; png8 writes an indexed .png; ait, a .ait template, is written by file.saveAsTemplate; an exporter plug-in's format is plugin.<plug-in id>, which an extension only it lists picks too), params?: {…} (an exporter plug-in's parameters; missing ones take their defaults, see plugin.info), selectedOnly?: false (the selected objects alone, in the layers and groups that hold them; an object of a blend, envelope, repeat or intertwine on its own), includeArtboardFill?: true (raster, PDF, SVG and EPS draw each exported artboard's background color behind its art, a transparent background too; false leaves it out), artboard?: 0, artboards?: [i…], rect?: [x, y, width, height] (raster formats: that area of the page in points, y down, instead of an artboard; not with artboard, artboards, range or useArtboards), range?: \"1-3, 5\" | \"all\" (1-based; PDF and .ai write one page per artboard, default all; SVG writes one file per artboard, {stem}-{artboard}.svg; raster formats write one artboard), useArtboards?: true (raster: one file per chosen artboard, default all, {stem}-{artboard}.{ext}; pdf/ai: every page) | false (pdf/ai/raster: the bounds of the visible art; pdf/ai: of the layers the file draws, without editing data, with a warning, and ai refuses pdfCompatible: false; SVG has it as an SVG option), ppi?: number (raster formats: pixels per inch, stored in the file; wins over scale; without either, the document's raster effects resolution), scale?: number (pixels per point), background?: transparent|white|black|\"#rrggbb\" (jpg: white when transparent; #rrggbbaa and #rgba are refused here and in matte), antiAlias?: none|art (default)|type (text snapped to pixels), interlaced?: false (png, Adam7), embedIcc?: true (png: an sRGB chunk marks the colours as sRGB), quality?: 90 (jpg: 0–100), colorModel?: rgb|cmyk|gray (jpg), method?: baseline|optimized|progressive, scans?: 3 (3–5, progressive), embedIcc?: true, imageMap?: none|client|server (an HTML or NCSA map of the objects with a URL, written as <stem>.html / <stem>.map), colors?: 256 (gif/png8: 2–256), reduction?: perceptual|selective (default)|adaptive|web|blackWhite|gray, dither?: none|diffusion (default)|pattern|noise, ditherAmount?: 100, transparency?: true, matte?: white|\"#rrggbb\"|none, interlaced?, lossless?: true (webp: every pixel kept exactly; false writes lossy WebP, a smaller file that loses some detail), quality?: 90 (webp with lossless: false: 0–100, higher keeps more detail in a larger file; more than 100 is refused), encoding?: utf8|utf16 (txt: the stories in stacking order, back to front, a thread once; utf16 with a byte order mark), lineEndings?: lf|crlf, selectionOnly?: false, svg?: {styling, outlineText, images, objectIds, decimals, minify, responsive, useArtboards, preserveEditing, metadata, fewerTspans, hiddenLayers, encoding, profile, embedFonts, variableData} (see document.formats), …the SVG options given flat instead, …the PDF options of document.exportPdf, …the DXF options of document.exportDxf (useArtboards: one drawing per artboard), …the EPS options of document.exportEps (useArtboards: one file per artboard, {stem}_{artboard}.eps, after a central {stem}.eps of the whole document when there are two or more and art shows; else the visible art), …emf and wmf write one picture of the artboard (useArtboards: true one file per chosen artboard, false the bounds of the visible art; EMF keeps curves, clipping, transparent images and gradients as images clipped to their shape; WMF flattens curves into polygons behind a placeable header; what a format leaves out comes back in warnings), …hpgl writes a plot of the artboard as pen moves for plotters and cutters (each visible path once along its line in plotter units; useArtboards: true one file per chosen artboard, false the bounds of the art it plots, without placed images, unpainted paths and art at 0% opacity), hpglVersion?: hpgl (default: IN, SP, PU, PD) | hpgl2 (also NP and PC pen colors, each pen's paths as one encoded polyline PE), curveTolerance?: 0.1 (points, 0.01 to 10), pens?: [\"#rrggbb\"…] (pen 1 first, up to 255; each path takes the nearest; default a pen per color in the order the art first draws in it, numbered alike in every file), origin?: bottomLeft (default) | center, sortPaths?: false (each pen's next path the nearest), insideFirst?: false (a path after the pen's paths that lie inside it), colorModel?: rgb|cmyk|gray (tiff: rgb keeps transparency as an alpha channel), lzw?: true, byteOrder?: little|big, embedIcc?: true, colorModel?: rgb|gray (bmp), depth?: 24 (bmp: 1 black and white, 4|8 a palette by reduction and dither, 16, 24, 32 with alpha), fileFormat?: windows|os2 (1, 4, 8 or 24 bits), rle?: false (4 and 8 bits, windows), flipRows?: false (top-down rows), depth?: 24 (tga: 16 one-b
Line truncated
|
||||
has_doc,
|
||||
export::export
|
||||
),
|
||||
@@ -54,7 +54,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Export for Screens",
|
||||
["File", "Export"],
|
||||
None,
|
||||
"{folder?, zip?: false (one .zip of every file, each deflated or stored, whichever is smaller: no folder → {name, dataBase64, bytes, files: [name…]}; with a folder it is written there → {path, bytes, files}), artboard?: index | artboards?: [index…] | range?: \"1-3\" (default all), assets?: [asset id…] (instead of artboards: each asset's art alone, cropped to its bounds and named after the asset; see assets.list), layers?: [layer id…] (instead of artboards: each layer's art alone, sublayers included, named after the layer), selection?: one|each (instead of artboards: the selected art as one file, or a file per selected object, named after it), fullDocument?: false (one file per format instead: a PDF of every artboard, other formats the bounds of all visible art, named after the document), includeBleed?: false (artboards grown by the document's bleed; a PDF page keeps the artboard as its TrimBox and puts its row's bleed around it once, the document's bleed when the row sets none and its preset gives none or 0), includeArtboardFill?: true (Include Artboard Fill: each artboard's background color behind its art; false leaves it out), pdfs?: multiple|single (Export PDFs As: with several artboards, single writes them as the pages of one PDF per PDF row, named after the document; refused with assets, layers or selection: each), exportPreset?: (a preset of document.exportPresets.list: its settings, under these params), subfolders?: false (each row's files in a sub-folder: its folder, else its size for raster (1x, 2x, 100w…) or its format (SVG, PDF)), folders?: none|rows (as subfolders)|format (a folder per extension: png, svg, pdf…)|item (a folder per artboard, asset, layer or object)|itemFormat (item/extension) (default: rows with subfolders or a preset, else none), name?: (a file name pattern instead of the item's name, with <filename> for the document, <name> for the artboard, asset, layer or object, <index> from 1, #### for the counter zero-padded to the run of #, <format>, <scale>, <suffix> (else the row's suffix ends the name), YYYYMMDD, YYYY-MM-DD, YYYY, <date>, <time>, <YYYY>, <MM>, <DD>, <hh>, <mm> and <ss>; a trailing .ext is dropped, as in `COMPANY-Logo-<filename>-####-YYYYMMDD`; different files it names alike get -2, -3…), counterStart?: 1, counterPer?: item (every file of an item has its number)|file, date?: YYYY-MM-DD (the date the pattern uses; default today, UTC), preset?: mobile (PNG 1x, 2x, 3x) | density (PNG 0.75x–4x in ldpi…xxxhdpi sub-folders) instead of formats (turns subfolders on), formats?: [{format: png|png8|jpg|webp|gif|tiff|bmp|tga|psd|svg|svgz|pdf|eps|ai|vectorcraft, scale?: 1 | \"2x\" | \"100w\" | \"100h\" | \"72ppi\", width?: px | height?: px | ppi? (raster only; width, then height, then ppi win over scale), suffix?: (raster default: @2x, @100w, @100h, none at 1x; vector formats drop size suffixes), folder?: (its sub-folder), quality?: (jpg 0–100), …the format's options (antiAlias, background, preset (pdf)…)}], settings?: {png|png8|jpg|webp|gif|tiff|bmp|tga|psd|svg|svgz|pdf|eps|ai|vectorcraft: {…options for every row of that format}} (rows' own options win), prefix?, antiAlias?: none|art|type (raster rows without their own), openLocation?: (remembered; the app shows the files after exporting)} one file per artboard and format (a PDF holds its artboard alone; artboards with the same name, in any case, get -2, -3…; an unnamed one is Artboard-N; a row whose file would take a name another row's file has, in any case, gets -2, -3… too, and identical rows write one file; row folders that differ only in case are one folder, spelled as the first row spells it) → {files: [path…]} (into the folder of exportPreset, outside the automation read roots: no ZIP path, and files relative to that folder); no folder → {files: [{name, dataBase64}]} (names include sub-folders: 2x/Icon@2x.png); every reply has warnings: [the encoders' warnings for the files, each once: an image that couldn't be decoded, type written in the fallback font…]. eps, ai and vectorcraft rows write a document of the item alone (its one artboard). The params (but zip and assets) are remembered in the document (document.exportSettings; not an undo step). A key it doesn't take, a key no format takes in a format row or in settings, settings for a format it doesn't write, and an unknown key inside a PDF, EPS or SVG option's object, are refused; a key only another format takes in a row or in settings is not used, and warnings name it as given (formats[0].quality; a key in settings only when no row of that format reads it; not a key of an exportPreset). Under automation read roots, an svg or svgz row, and a row whose files carry the native document (vectorcraft, eps, ai but a version 7 file, a pdf with preserveEditing on that holds every artboard of the document it is written from), is refused, before the folder is made or any file is written, while the document links a JavaScript file
Line truncated
|
||||
"{folder?, zip?: false (one .zip of every file, each deflated or stored, whichever is smaller: no folder → {name, dataBase64, bytes, files: [name…]}; with a folder it is written there → {path, bytes, files}), artboard?: index | artboards?: [index…] | range?: \"1-3\" (default all), assets?: [asset id…] (instead of artboards: each asset's art alone, cropped to its bounds and named after the asset; see assets.list), layers?: [layer id…] (instead of artboards: each layer's art alone, sublayers included, named after the layer), selection?: one|each (instead of artboards: the selected art as one file, or a file per selected object, named after it), fullDocument?: false (one file per format instead: a PDF of every artboard, other formats the bounds of all visible art, named after the document), includeBleed?: false (artboards grown by the document's bleed; a PDF page keeps the artboard as its TrimBox and puts its row's bleed around it once, the document's bleed when the row sets none and its preset gives none or 0), includeArtboardFill?: true (Include Artboard Fill: each artboard's background color behind its art; false leaves it out), pdfs?: multiple|single (Export PDFs As: with several artboards, single writes them as the pages of one PDF per PDF row, named after the document; refused with assets, layers or selection: each), exportPreset?: (a preset of document.exportPresets.list: its settings, under these params), subfolders?: false (each row's files in a sub-folder: its folder, else its size for raster (1x, 2x, 100w…) or its format (SVG, PDF)), folders?: none|rows (as subfolders)|format (a folder per extension: png, svg, pdf…)|item (a folder per artboard, asset, layer or object)|itemFormat (item/extension) (default: rows with subfolders or a preset, else none), name?: (a file name pattern instead of the item's name, with <filename> for the document, <name> for the artboard, asset, layer or object, <index> from 1, #### for the counter zero-padded to the run of #, <format>, <scale>, <suffix> (else the row's suffix ends the name), YYYYMMDD, YYYY-MM-DD, YYYY, <date>, <time>, <YYYY>, <MM>, <DD>, <hh>, <mm> and <ss>; a trailing .ext is dropped, as in `COMPANY-Logo-<filename>-####-YYYYMMDD`; different files it names alike get -2, -3…), counterStart?: 1, counterPer?: item (every file of an item has its number)|file, date?: YYYY-MM-DD (the date the pattern uses; default today, UTC), preset?: mobile (PNG 1x, 2x, 3x) | density (PNG 0.75x–4x in ldpi…xxxhdpi sub-folders) instead of formats (turns subfolders on), formats?: [{format: png|png8|jpg|webp|gif|tiff|bmp|tga|psd|svg|svgz|pdf|eps|ai|vectorcraft, scale?: 1 | \"2x\" | \"100w\" | \"100h\" | \"72ppi\", width?: px | height?: px | ppi? (raster only; width, then height, then ppi win over scale), suffix?: (raster default: @2x, @100w, @100h, none at 1x; vector formats drop size suffixes), folder?: (its sub-folder), quality?: (jpg 0–100; webp 0–100 with lossless: false), …the format's options (antiAlias, background, preset (pdf)…)}], settings?: {png|png8|jpg|webp|gif|tiff|bmp|tga|psd|svg|svgz|pdf|eps|ai|vectorcraft: {…options for every row of that format}} (rows' own options win), prefix?, antiAlias?: none|art|type (raster rows without their own), openLocation?: (remembered; the app shows the files after exporting)} one file per artboard and format (a PDF holds its artboard alone; artboards with the same name, in any case, get -2, -3…; an unnamed one is Artboard-N; a row whose file would take a name another row's file has, in any case, gets -2, -3… too, and identical rows write one file; row folders that differ only in case are one folder, spelled as the first row spells it) → {files: [path…]} (into the folder of exportPreset, outside the automation read roots: no ZIP path, and files relative to that folder); no folder → {files: [{name, dataBase64}]} (names include sub-folders: 2x/Icon@2x.png); every reply has warnings: [the encoders' warnings for the files, each once: an image that couldn't be decoded, type written in the fallback font…]. eps, ai and vectorcraft rows write a document of the item alone (its one artboard). The params (but zip and assets) are remembered in the document (document.exportSettings; not an undo step). A key it doesn't take, a key no format takes in a format row or in settings, settings for a format it doesn't write, and an unknown key inside a PDF, EPS or SVG option's object, are refused; a key only another format takes in a row or in settings is not used, and warnings name it as given (formats[0].quality; a key in settings only when no row of that format reads it; not a key of an exportPreset). Under automation read roots, an svg or svgz row, and a row whose files carry the native document (vectorcraft, eps, ai but a version 7 file, a pdf with preserveEditing on that holds every artboard of the document it is written from), is refused, before the folder is made or any file is written, while t
Line truncated
|
||||
has_doc,
|
||||
screens::export_for_screens
|
||||
),
|
||||
|
||||
@@ -241,7 +241,8 @@ struct RasterOptions {
|
||||
width: Option<f64>,
|
||||
/// The height of each file in pixels (wins over `ppi` and `scale`).
|
||||
height: Option<f64>,
|
||||
quality: Option<u8>,
|
||||
/// JPEG and lossy WebP quality, read by [`RasterOptions::quality`].
|
||||
quality: Option<Value>,
|
||||
background: Option<Value>,
|
||||
anti_alias: Option<String>,
|
||||
interlaced: Option<bool>,
|
||||
@@ -281,6 +282,19 @@ fn clamped_ppi(ppi: f64) -> f64 {
|
||||
}
|
||||
|
||||
impl RasterOptions {
|
||||
/// `quality` as given: `None` when absent or null, else a whole number 0–255 (JPEG caps it at
|
||||
/// 100; WebP refuses more than 100), or an error naming it.
|
||||
fn quality(&self) -> Result<Option<u8>> {
|
||||
match &self.quality {
|
||||
None | Some(Value::Null) => Ok(None),
|
||||
Some(v) => v
|
||||
.as_u64()
|
||||
.and_then(|q| u8::try_from(q).ok())
|
||||
.map(Some)
|
||||
.ok_or_else(|| bad(C, format!("quality must be a whole number from 0 to 100, not {v}"))),
|
||||
}
|
||||
}
|
||||
|
||||
/// The pixel size each file is scaled to: `width`, else `height`; `None` when neither is set.
|
||||
fn pixel_size(&self) -> Result<Option<ScreenSize>> {
|
||||
let checked = |key: &str, n: f64| {
|
||||
@@ -311,7 +325,8 @@ impl RasterOptions {
|
||||
},
|
||||
anti_alias: self.anti_alias.as_deref().map(anti_alias).transpose().map_err(|e| bad(C, e))?.unwrap_or_default(),
|
||||
interlaced: self.interlaced.unwrap_or(false),
|
||||
quality: self.quality.unwrap_or(90).min(100),
|
||||
quality: self.quality()?.unwrap_or(90).min(100),
|
||||
webp_lossless: self.lossless.unwrap_or(true),
|
||||
jpeg: JpegOptions {
|
||||
color_model,
|
||||
method: parse(self.method.as_deref(), jpeg::Method::from_id, "method", "baseline, optimized or progressive")?,
|
||||
@@ -1136,6 +1151,11 @@ fn encode_files(doc: &Document, f: &Format, p: &Value) -> Result<Encoded> {
|
||||
"psd" => RasterFormat::Psd,
|
||||
_ => RasterFormat::WebP,
|
||||
};
|
||||
if format == RasterFormat::WebP
|
||||
&& let Some(q) = o.quality()?.filter(|q| *q > 100)
|
||||
{
|
||||
return Err(bad(C, format!("quality {q}: WebP quality is 0–100")));
|
||||
}
|
||||
check_options(format, &settings)?;
|
||||
// Use Artboards: one file per chosen artboard (default all); else the one chosen.
|
||||
let chosen = match use_artboards {
|
||||
@@ -1182,9 +1202,6 @@ fn encode_files(doc: &Document, f: &Format, p: &Value) -> Result<Encoded> {
|
||||
}
|
||||
let regions: Vec<Rect> = enc.files.iter().filter_map(|(b, _)| b.and_then(|b| doc.artboards.get(b))).map(|a| a.rect).collect();
|
||||
enc.warnings.extend(crate::cmd::fonts::export_overflow_warning(doc, &doc.layers, Some(®ions)));
|
||||
if format == RasterFormat::WebP && o.lossless == Some(false) {
|
||||
enc.setting_notes.push("lossy WebP isn't available yet: the file is lossless (exact, but larger)".into());
|
||||
}
|
||||
return Ok(enc);
|
||||
}
|
||||
_ => return Err(bad(C, format!("no encoder for {} yet", f.label))),
|
||||
|
||||
@@ -206,11 +206,15 @@ const LOSSLESS: FormatOption = FormatOption {
|
||||
name: "lossless",
|
||||
ty: "boolean",
|
||||
default: "true",
|
||||
description: "lossless WebP; false asks for lossy, which isn't available yet (written lossless, with a warning)",
|
||||
description: "lossless WebP (every pixel kept exactly); false writes lossy WebP at quality: a smaller file that loses some detail",
|
||||
};
|
||||
|
||||
const WEBP_QUALITY: FormatOption =
|
||||
FormatOption { name: "quality", ty: "integer", default: "90", description: "lossy quality 0–100 (for when lossy WebP is available)" };
|
||||
const WEBP_QUALITY: FormatOption = FormatOption {
|
||||
name: "quality",
|
||||
ty: "integer",
|
||||
default: "90",
|
||||
description: "lossy WebP quality 0–100 (with lossless false; higher keeps more detail in a larger file; more than 100 is refused)",
|
||||
};
|
||||
|
||||
/// The options of the palette formats (PNG-8, GIF).
|
||||
const PALETTE_OPTIONS: &[FormatOption] = &[
|
||||
|
||||
@@ -135,26 +135,25 @@ fn formats_list_use_artboards() {
|
||||
assert!(opts("vectorcraft").get("useArtboards").is_none());
|
||||
}
|
||||
|
||||
/// An export's reply gives what the file loses before its notes on the options, whatever order
|
||||
/// the encoder gave them: the WebP encoder notes that lossy WebP isn't applied before the export
|
||||
/// notes the type it drew in the fallback font. With only notes on the options, they keep their
|
||||
/// order.
|
||||
/// An export's reply gives what the file loses before its notes on the options: the type the
|
||||
/// export drew in the fallback font comes before the note on an option WebP doesn't read. With
|
||||
/// only notes on the options, they keep their order.
|
||||
#[test]
|
||||
fn what_the_file_loses_comes_before_a_note_on_the_options() {
|
||||
let lossy = "lossy WebP isn't available yet: the file is lossless (exact, but larger)";
|
||||
let unused = "`interlaced` was not used: WebP files don't read it";
|
||||
let warnings = |s: &mut Session, p: Value| -> Vec<String> {
|
||||
let r = s.execute("document.export", &p).unwrap();
|
||||
r["warnings"].as_array().unwrap().iter().filter_map(Value::as_str).map(str::to_string).collect()
|
||||
};
|
||||
let mut s = session(60.0, 40.0, 1);
|
||||
assert_eq!(warnings(&mut s, json!({"format": "webp", "lossless": false})), [lossy]);
|
||||
assert_eq!(warnings(&mut s, json!({"format": "webp", "interlaced": true})), [unused]);
|
||||
s.execute("text.create", &json!({"x": 5, "y": 20, "text": "Ab", "font": "Nonexistent Sans Probe"})).unwrap();
|
||||
let w = warnings(&mut s, json!({"format": "webp", "lossless": false}));
|
||||
let w = warnings(&mut s, json!({"format": "webp", "interlaced": true}));
|
||||
assert_eq!(w.len(), 2, "{w:?}");
|
||||
assert!(w[0].contains("fallback font") && w[0].contains("Nonexistent Sans Probe"), "{w:?}");
|
||||
assert_eq!(w[1], lossy);
|
||||
assert_eq!(w[1], unused);
|
||||
// document.serialize gives them in the same order.
|
||||
let r = s.execute("document.serialize", &json!({"format": "webp", "lossless": false})).unwrap();
|
||||
let r = s.execute("document.serialize", &json!({"format": "webp", "interlaced": true})).unwrap();
|
||||
assert_eq!(r["warnings"], json!(w));
|
||||
}
|
||||
|
||||
|
||||
@@ -546,20 +546,19 @@ fn type_in_a_missing_family_is_named_once_for_every_format() {
|
||||
assert!(fallback[0].contains("Nonexistent Sans Probe"), "{fallback:?}");
|
||||
}
|
||||
|
||||
/// What a later file loses comes before a note on the options that an earlier file gave: the
|
||||
/// first artboard's WebP gives only the lossy WebP note, the second's also says its type doesn't
|
||||
/// fit.
|
||||
/// What a later file loses comes before a note on the options: the second artboard's WebP says
|
||||
/// its type doesn't fit, before the note on the row's option that WebP doesn't read.
|
||||
#[test]
|
||||
fn what_any_file_loses_comes_before_the_notes_on_the_options() {
|
||||
let mut s = session(2);
|
||||
let second = s.doc().unwrap().doc.artboards[1].rect;
|
||||
let area = json!({"width": 30, "height": 8});
|
||||
s.execute("text.create", &json!({"x": second.x0 + 2.0, "y": second.y0 + 2.0, "size": 12, "area": area, "text": "Ab\nCd\nEf\nGh"})).unwrap();
|
||||
let r = export(&mut s, json!({"formats": [{"format": "webp", "lossless": false}]}));
|
||||
let r = export(&mut s, json!({"formats": [{"format": "webp", "interlaced": true}]}));
|
||||
let warnings: Vec<&str> = r["warnings"].as_array().unwrap().iter().filter_map(Value::as_str).collect();
|
||||
assert_eq!(warnings.len(), 2, "{warnings:?}");
|
||||
assert!(warnings[0].contains("doesn't fit its frame"), "{warnings:?}");
|
||||
assert!(warnings[1].starts_with("lossy WebP"), "{warnings:?}");
|
||||
assert!(warnings[1].starts_with("`formats[0].interlaced` was not used"), "{warnings:?}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -53,41 +53,115 @@ fn text_export_writes_the_stories_in_stacking_order() {
|
||||
let _ = std::fs::remove_dir_all(dir);
|
||||
}
|
||||
|
||||
/// The chunk types of RIFF WebP file `file`, in order.
|
||||
fn webp_chunks(file: &[u8]) -> Vec<[u8; 4]> {
|
||||
assert_eq!((&file[..4], &file[8..12]), (&b"RIFF"[..], &b"WEBP"[..]));
|
||||
let mut chunks = Vec::new();
|
||||
let mut at = 12;
|
||||
while at + 8 <= file.len() {
|
||||
let len = u32::from_le_bytes([file[at + 4], file[at + 5], file[at + 6], file[at + 7]]) as usize;
|
||||
chunks.push([file[at], file[at + 1], file[at + 2], file[at + 3]]);
|
||||
at += 8 + len + len % 2;
|
||||
}
|
||||
chunks
|
||||
}
|
||||
|
||||
/// The size and straight RGBA pixels of image file `file`.
|
||||
fn rgba(file: &[u8]) -> (u32, u32, Vec<u8>) {
|
||||
let img = craft_image_codecs::decode(file).unwrap();
|
||||
let (w, h) = img.dimensions();
|
||||
(w, h, img.to_rgba8())
|
||||
}
|
||||
|
||||
/// A 120 × 80 pt document filled with a grid of rectangles in 96 colors.
|
||||
fn varied_art() -> Session {
|
||||
let mut s = Session::new();
|
||||
s.execute("file.new", &json!({"width": 120, "height": 80})).unwrap();
|
||||
for row in 0..8 {
|
||||
for col in 0..12 {
|
||||
s.execute("shape.rectangle", &json!({"x": col * 10, "y": row * 10, "width": 10, "height": 10})).unwrap();
|
||||
let color = format!("#{:02x}{:02x}{:02x}", col * 21, row * 32, (col * 7 + row * 23) % 256);
|
||||
s.execute("paint.setFill", &json!({"color": color})).unwrap();
|
||||
}
|
||||
}
|
||||
s
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn webp_is_lossless_and_says_so_when_lossy_is_asked_for() {
|
||||
fn webp_is_lossless_by_default_and_lossy_when_asked() {
|
||||
let mut s = varied_art();
|
||||
let export = |s: &mut Session, p: Value| -> (Vec<u8>, Value) {
|
||||
let r = s.execute("document.export", &merge(json!({"format": "webp", "background": "white"}), p)).unwrap();
|
||||
(b64(&r), r["warnings"].clone())
|
||||
};
|
||||
let (lossless, warnings) = export(&mut s, json!({}));
|
||||
assert_eq!(webp_chunks(&lossless), [*b"VP8L"], "lossless by default");
|
||||
assert_eq!(warnings, json!([]));
|
||||
// Quality doesn't change a lossless file.
|
||||
assert_eq!(export(&mut s, json!({"lossless": true, "quality": 10})).0, lossless);
|
||||
|
||||
let (lossy, warnings) = export(&mut s, json!({"lossless": false}));
|
||||
assert_eq!(webp_chunks(&lossy), [*b"VP8 "], "opaque art is a plain lossy file");
|
||||
assert_eq!(warnings, json!([]), "no note: the file is lossy");
|
||||
assert_eq!(export(&mut s, json!({"lossless": false, "quality": 90})).0, lossy, "quality 90 by default");
|
||||
// At quality 90 each channel stays within 4 levels of the exact pixels on average.
|
||||
let ((w, h, exact), (lw, lh, near)) = (rgba(&lossless), rgba(&lossy));
|
||||
assert_eq!((lw, lh), (w, h));
|
||||
assert_eq!((w, h), (120, 80));
|
||||
let diff: u64 = exact.iter().zip(&near).map(|(a, b)| u64::from(a.abs_diff(*b))).sum();
|
||||
let mean = diff as f64 / exact.len() as f64;
|
||||
assert!(mean <= 4.0, "mean difference {mean}");
|
||||
// Lower quality, smaller file.
|
||||
let low = export(&mut s, json!({"lossless": false, "quality": 10})).0;
|
||||
let high = export(&mut s, json!({"lossless": false, "quality": 95})).0;
|
||||
assert_eq!(webp_chunks(&low), [*b"VP8 "]);
|
||||
assert!(low.len() < high.len(), "{} vs {} bytes", low.len(), high.len());
|
||||
for q in [0, 100] {
|
||||
assert_eq!(webp_chunks(&export(&mut s, json!({"lossless": false, "quality": q})).0), [*b"VP8 "], "quality {q}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn lossy_webp_keeps_translucent_pixels() {
|
||||
let mut s = Session::new();
|
||||
s.execute("file.new", &json!({"width": 30, "height": 20})).unwrap();
|
||||
s.execute("shape.rectangle", &json!({"x": 2, "y": 2, "width": 10, "height": 10})).unwrap();
|
||||
let r = s.execute("document.export", &json!({"format": "webp"})).unwrap();
|
||||
let file = b64(&r);
|
||||
assert_eq!((&file[..4], &file[8..12], &file[12..16]), (&b"RIFF"[..], &b"WEBP"[..], &b"VP8L"[..]), "lossless bitstream");
|
||||
assert_eq!(r["warnings"], json!([]));
|
||||
let r = s.execute("document.export", &json!({"format": "webp", "lossless": false, "quality": 60, "background": "black"})).unwrap();
|
||||
assert_eq!(&b64(&r)[12..16], b"VP8L");
|
||||
assert!(r["warnings"][0].as_str().unwrap().contains("lossless"), "{r}");
|
||||
assert_eq!(
|
||||
craft_image_codecs::decode(&b64(&r))
|
||||
.map(|__cimg| {
|
||||
let (__w, __h) = __cimg.dimensions();
|
||||
match (__cimg.layout(), __cimg.sample_type()) {
|
||||
(craft_image_codecs::ChannelLayout::Gray, craft_image_codecs::SampleType::U8) => {
|
||||
image::DynamicImage::ImageLuma8(image::GrayImage::from_raw(__w, __h, __cimg.into_data()).unwrap())
|
||||
}
|
||||
(craft_image_codecs::ChannelLayout::GrayA, craft_image_codecs::SampleType::U8) => {
|
||||
image::DynamicImage::ImageLumaA8(image::GrayAlphaImage::from_raw(__w, __h, __cimg.into_data()).unwrap())
|
||||
}
|
||||
(craft_image_codecs::ChannelLayout::Rgb, craft_image_codecs::SampleType::U8) => {
|
||||
image::DynamicImage::ImageRgb8(image::RgbImage::from_raw(__w, __h, __cimg.into_data()).unwrap())
|
||||
}
|
||||
_ => image::DynamicImage::ImageRgba8(image::RgbaImage::from_raw(__w, __h, __cimg.to_rgba8()).unwrap()),
|
||||
}
|
||||
})
|
||||
.unwrap()
|
||||
.to_rgba8()
|
||||
.get_pixel(29, 19)
|
||||
.0,
|
||||
[0, 0, 0, 255]
|
||||
);
|
||||
s.execute("shape.rectangle", &json!({"x": 0, "y": 0, "width": 20, "height": 20})).unwrap();
|
||||
s.execute("paint.setFill", &json!({"color": "#0000ff"})).unwrap();
|
||||
s.execute("transparency.set", &json!({"opacity": 50})).unwrap();
|
||||
let file = |s: &mut Session, lossless: bool| b64(&s.execute("document.export", &json!({"format": "webp", "lossless": lossless})).unwrap());
|
||||
let (lossless, lossy) = (file(&mut s, true), file(&mut s, false));
|
||||
assert_eq!(webp_chunks(&lossy), [*b"VP8X", *b"ALPH", *b"VP8 "]);
|
||||
let ((w, h, exact), (lw, lh, near)) = (rgba(&lossless), rgba(&lossy));
|
||||
assert_eq!((lw, lh), (w, h));
|
||||
let at = |px: &[u8], x: u32, y: u32| -> [u8; 4] {
|
||||
let i = 4 * (y * w + x) as usize;
|
||||
[px[i], px[i + 1], px[i + 2], px[i + 3]]
|
||||
};
|
||||
// The alpha is written exactly: half covered under the rectangle, clear past it.
|
||||
let alphas = |px: &[u8]| px.chunks(4).map(|p| p[3]).collect::<Vec<u8>>();
|
||||
assert_eq!(alphas(&near), alphas(&exact));
|
||||
assert!((120..=135).contains(&at(&near, 5, 5)[3]), "{:?}", at(&near, 5, 5));
|
||||
assert_eq!(at(&near, 28, 10)[3], 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn webp_quality_out_of_its_range_is_refused() {
|
||||
let mut s = varied_art();
|
||||
for q in [json!(101), json!(255), json!(256), json!(-1), json!(60.5), json!("high"), json!(true)] {
|
||||
let p = json!({"format": "webp", "lossless": false, "quality": q});
|
||||
let e = s.execute("document.export", &p).unwrap_err().to_string();
|
||||
assert!(e.contains("quality"), "{q}: {e}");
|
||||
// In Export for Screens too, in a row or in the format's settings.
|
||||
let row = json!({"formats": [{"format": "webp", "lossless": false, "quality": q}]});
|
||||
assert!(s.execute("document.exportForScreens", &row).is_err(), "{q}");
|
||||
let settings = json!({"formats": [{"format": "webp"}], "settings": {"webp": {"lossless": false, "quality": q}}});
|
||||
assert!(s.execute("document.exportForScreens", &settings).is_err(), "{q}");
|
||||
}
|
||||
// A lossless file refuses it as well: the value is not a WebP quality.
|
||||
assert!(s.execute("document.export", &json!({"format": "webp", "quality": 101})).is_err());
|
||||
let r = s.execute("document.exportForScreens", &json!({"formats": [{"format": "webp", "lossless": false, "quality": 100}]})).unwrap();
|
||||
let file = b64(&r["files"][0]);
|
||||
assert_eq!(webp_chunks(&file), [*b"VP8 "]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -23,7 +23,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"Print Setup",
|
||||
[],
|
||||
None,
|
||||
"{preset?: name ([Default] or a saved print preset, any case: print.presets.list; its settings replace the document's, as choosing it in the Print dialog does), settings?: {copies: 1 (1–999), collate: true, reverse, artboards: all|range|ignore (all the art as one page), range: \"1-3, 5\" (1-based, with artboards: range), skipBlank (leave out artboards with no art that prints), media: letter|legal|tabloid|a3|a4|a5|a6|b4|b5|b4 (jis)|b5 (jis)|b6 (jis)|japanese postcard|japanese double postcard|japanese envelope #3|japanese envelope #4|kaku #2|kaku #3|yonroku-ban|custom (a paper is named by its id or its dialog label, any case and spacing, so `B5 (JIS)` works; b4 and b5 stay the ISO 216 sizes, 250 × 353 and 176 × 250 mm, and the JIS sizes are b4 (jis) 257 × 364 mm, b5 (jis) 182 × 257 mm and b6 (jis) 128 × 182 mm), width, height (custom paper, 72–14400 pt), orientation: portrait|landscape|portraitFlipped|landscapeFlipped, autoRotate: true (turn the paper to each artboard; orientation ignored), transverse (the page a quarter turn on the paper), printLayers: visiblePrintable|visible|all (template layers never print), placement: {origin: topLeft|top|topRight|left|center|right|bottomLeft|bottom|bottomRight (the point of the printed area, the artboard with its bleed and marks, on the same point of the imageable area), x, y (pt, right and down)}, scaling: none|fit|custom|tileFull|tileImageable, scale: {width: 100, height: 100 (1–1000 % with custom and tiling), linked: true (width and height stay equal: give one and the other follows, and turning it on sets the height to the width; a different width and height without linked turn it off, and with linked: true, or linked: null over a linked scale, are an error; a saved scale without linked reads it as false)}, overlap: 0 (pt between tiles), tileRange: \"\" (1-based tiles across then down; empty: all), copiesPerSheet: false (not with tiling: as many copies of each artboard, with its bleed and marks, as fit the imageable area, across then down, not turned; the placement places the grid; an artboard that doesn't fit prints one copy per sheet, with a warning), gutter: 0 (pt between copies, 0–720), margin: 0 (pt the device can't print around the paper: the imageable area is inside it), marks: {trim, registration, colorBars, pageInfo, kind: roman|japanese, weight: 0.25, offset: 6} (as document.exportPdf, at the paper's scale; page information adds the tile and the ink), bleed: {useDocument: true (the document's bleed, document.setup), top, bottom, left, right} (pt), output: {mode: composite|separations (one gray page per ink that prints), emulsion: up|down (down mirrors), image: positive|negative, spotsToProcess, overprintBlack: false (separations: solid 100% K or 100% gray fills, strokes and characters, to within half a percent, overprint in the printed copy, gradients when every stop is (every point of a freeform one); rich, RGB, spot-linked and lighter blacks knock out; composite ignores it), inks: [{name: \"Cyan\"|…|a spot swatch, print: true, frequency (lpi, default 60), angle (screen angle, degrees counter-clockwise as PostScript setscreen takes it; default C 15, M 75, Y 0, K 45, spots 45)}]}, graphics: {autoFlatness: true, flatness: 1 (0.2–100), fonts: none|subset|complete}, color: {intent: perceptual|relativeColorimetric|saturation|absoluteColorimetric, preserveNumbers: true (CMYK colors keep their values), profile: \"\" (the printer profile, an RGB or CMYK one: composite PDF colors are converted to it with the intent, separations separate with a CMYK one; empty: as they are)}, advanced: {printAsBitmap (composite pages print as one image each, at the document's raster effects resolution, or lower for a page larger than 64 Mpx or 32,768 px a side), overprints: preserve|discard|simulate (composite output; preserve writes them to overprint (/OP), simulate prints them as Overprint Preview shows them; separations always keep them), flattenerPreset: \"\" (a flattener preset, built-in or saved: transparency is flattened before printing; empty: it prints live; PostScript defaults to medium)}, tileOrigin: {placed: false, x, y} (where the Print Tiling tool put the pages: print.tiling.set)}} store the print settings with the document, over the ones it has or the preset's (null keeps a value), as one undo step; no settings or preset → {settings} (the current ones, defaults if never set up)",
|
||||
"{preset?: name ([Default] or a saved print preset, any case: print.presets.list; its settings replace the document's, as choosing it in the Print dialog does), settings?: {copies: 1 (1–999), collate: true, reverse, artboards: all|range|ignore (all the art as one page), range: \"1-3, 5\" (1-based, with artboards: range), skipBlank (leave out artboards with no art that prints), media: letter|legal|tabloid|a3|a4|a5|a6|b4|b5|b4 (jis)|b5 (jis)|b6 (jis)|japanese postcard|japanese double postcard|japanese envelope #3|japanese envelope #4|kaku #2|kaku #3|yonroku-ban|custom (a paper is named by its id or its dialog label, any case and spacing, so `B5 (JIS)` works; b4 and b5 stay the ISO 216 sizes, 250 × 353 and 176 × 250 mm, and the JIS sizes are b4 (jis) 257 × 364 mm, b5 (jis) 182 × 257 mm and b6 (jis) 128 × 182 mm), width, height (custom paper, 72–14400 pt), orientation: portrait|landscape|portraitFlipped|landscapeFlipped, autoRotate: true (turn the paper to each artboard; orientation ignored), transverse (the page a quarter turn on the paper), printLayers: visiblePrintable|visible|all (template layers never print), placement: {origin: topLeft|top|topRight|left|center|right|bottomLeft|bottom|bottomRight (the point of the printed area, the artboard with its bleed and marks, on the same point of the imageable area), x, y (pt, right and down)}, scaling: none|fit|custom|tileFull|tileImageable, scale: {width: 100, height: 100 (1–1000 % with custom and tiling), linked: true (width and height stay equal: give one and the other follows, and turning it on sets the height to the width; a different width and height without linked turn it off, and with linked: true, or linked: null over a linked scale, are an error; a saved scale without linked reads it as false)}, overlap: 0 (pt between tiles), tileRange: \"\" (1-based tiles across then down; empty: all), copiesPerSheet: false (not with tiling: as many copies of each artboard, with its bleed and marks, as fit the imageable area, across then down, not turned; the placement places the grid; an artboard that doesn't fit prints one copy per sheet, with a warning), gutter: 0 (pt between copies, 0–720), margin: 0 (pt the device can't print around the paper: the imageable area is inside it), marks: {trim, registration, colorBars, pageInfo, kind: roman|japanese, weight: 0.25, offset: 6} (as document.exportPdf, at the paper's scale; page information adds the tile and the ink), bleed: {useDocument: true (the document's bleed, document.setup), top, bottom, left, right} (pt), output: {mode: composite|separations (one gray page per ink that prints), emulsion: up|down (down mirrors), image: positive|negative, spotsToProcess, overprintBlack: false (separations: solid 100% K or 100% gray fills, strokes and characters, to within half a percent, overprint in the printed copy, gradients when every stop is (every point of a freeform one); rich, RGB, spot-linked and lighter blacks are not marked, and paints already set to overprint keep it; composite ignores it), inks: [{name: \"Cyan\"|…|a spot swatch, print: true, frequency (lpi, default 60), angle (screen angle, degrees counter-clockwise as PostScript setscreen takes it; default C 15, M 75, Y 0, K 45, spots 45)}]}, graphics: {autoFlatness: true, flatness: 1 (0.2–100), fonts: none|subset|complete}, color: {intent: perceptual|relativeColorimetric|saturation|absoluteColorimetric, preserveNumbers: true (CMYK colors keep their values), profile: \"\" (the printer profile, an RGB or CMYK one: composite PDF colors are converted to it with the intent, separations separate with a CMYK one; empty: as they are)}, advanced: {printAsBitmap (composite pages print as one image each, at the document's raster effects resolution, or lower for a page larger than 64 Mpx or 32,768 px a side), overprints: preserve|discard|simulate (composite output; preserve writes them to overprint (/OP), simulate prints them as Overprint Preview shows them; separations always keep them), flattenerPreset: \"\" (a flattener preset, built-in or saved: transparency is flattened before printing; empty: it prints live; PostScript defaults to medium)}, tileOrigin: {placed: false, x, y} (where the Print Tiling tool put the pages: print.tiling.set)}} store the print settings with the document, over the ones it has or the preset's (null keeps a value), as one undo step; no settings or preset → {settings} (the current ones, defaults if never set up)",
|
||||
has_doc,
|
||||
setup
|
||||
),
|
||||
|
||||
@@ -19,7 +19,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"New Swatch",
|
||||
["Window", "Swatches"],
|
||||
None,
|
||||
"{name?, color? | colors?: [colour] (one swatch each, in one undo step; #rrggbbaa and #rgba are refused) | swatch? | gradient? | pattern?: name (default: the current fill), tint?: 0..100 (% of the global or spot `swatch`, or of the one the current fill links to), mode?: \"gray\"|\"rgb\"|\"hsb\"|\"lab\"|\"cmyk\"|\"web\" (convert the colour; lab: CIE L*a*b*, how spot colours are usually defined), global?, spot? (a spot colour, always global), group?: colour group name (solid colours only; default: ungrouped), none?: true (the None paint), paint?: paint.setFill params, keepModel?: bool (as paint.setFill)} save a colour, gradient or pattern as a swatch. A tint of a global or spot colour (below 100%, without mode, global or spot) becomes a tint swatch, \"Name 40%\", linked to its base: it follows edits to the base and applies as that tint of it. A gradient swatch keeps the gradient's aspect (with or without start/end) and holds no link to the swatch its gradient came from, and a pattern swatch holds the pattern untransformed. Names are unique (\"Sky 2\"); a colour's default name is its values (\"C=10 M=20 Y=30 K=0\", \"R=255 G=128 B=0\", \"Gray K=40\", \"L=55 a=60 b=40\") → {name, names: [every new swatch]}",
|
||||
"{name?, color? | colors?: [colour | {swatch, tint?}] (one swatch each, in one undo step; #rrggbbaa and #rgba are refused; `{swatch, tint}` is the paint paint.setFill gives, so a tint of a global or spot color becomes a tint swatch) | swatch? | gradient? | pattern?: name (default: the current fill), tint?: 0..100 (% of the global or spot `swatch`, or of the one the current fill links to), mode?: \"gray\"|\"rgb\"|\"hsb\"|\"lab\"|\"cmyk\"|\"web\" (convert the colour; lab: CIE L*a*b*, how spot colours are usually defined), global?, spot? (a spot colour, always global), group?: colour group name (solid colours only; default: ungrouped), none?: true (the None paint), paint?: paint.setFill params, keepModel?: bool (as paint.setFill)} save a colour, gradient or pattern as a swatch. A tint of a global or spot colour (below 100%, without mode, global or spot) becomes a tint swatch, \"Name 40%\", linked to its base: it follows edits to the base and applies as that tint of it. A gradient swatch keeps the gradient's aspect (with or without start/end) and holds no link to the swatch its gradient came from, and a pattern swatch holds the pattern untransformed. Names are unique (\"Sky 2\"); a colour's default name is its values (\"C=10 M=20 Y=30 K=0\", \"R=255 G=128 B=0\", \"Gray K=40\", \"L=55 a=60 b=40\") → {name, names: [every new swatch]}",
|
||||
has_doc,
|
||||
swatch_new
|
||||
),
|
||||
@@ -37,7 +37,7 @@ pub fn specs() -> Vec<CommandSpec> {
|
||||
"New Color Group",
|
||||
["Window", "Swatches"],
|
||||
None,
|
||||
"{name?, swatches?: [names] (solid colours move into the group; gradients, patterns and None stay), colors?: [colour] (added as new swatches; #rrggbbaa and #rgba are refused), keepModel?: bool (as paint.setFill), fromArtwork?: false (add the unique colours of the selected art: fills, strokes, text, gradient stops and mesh points; a colour linked to a global swatch moves that swatch into the group), toGlobal?: true (with fromArtwork: the new swatches are global and the selected art's matching unlinked colours link to them), includeTints?: false (with fromArtwork: tints of global swatches also get swatches of their own)} → {name, swatches: [names in the group], linked: paints linked}",
|
||||
"{name?, swatches?: [names] (solid colours move into the group; gradients, patterns and None stay), colors?: [colour | {swatch, tint?}] (added as new swatches; #rrggbbaa and #rgba are refused; `{swatch, tint}` below 100% of a global or spot color adds a tint swatch, \"Name 40%\", linked to it, and any other `{swatch}` its color), keepModel?: bool (as paint.setFill), fromArtwork?: false (add the unique colours of the selected art: fills, strokes, text, gradient stops and mesh points; a colour linked to a global swatch moves that swatch into the group), toGlobal?: true (with fromArtwork: the new swatches are global and the selected art's matching unlinked colours link to them), includeTints?: false (with fromArtwork: tints of global swatches also get swatches of their own)} → {name, swatches: [names in the group], linked: paints linked}",
|
||||
has_doc,
|
||||
swatch_new_group
|
||||
),
|
||||
@@ -146,9 +146,11 @@ fn swatch_new(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
let stored = |c: Color| if mode.is_some() { c } else { super::paint::new_color(s, p, c) };
|
||||
let cs: Vec<Paint> = cs
|
||||
.iter()
|
||||
.map(|c| color_value(c).map(|c| Paint::solid(stored(c))))
|
||||
.collect::<Option<_>>()
|
||||
.ok_or_else(|| bad(C, "bad colour in `colors`"))?;
|
||||
.map(|c| match swatch_entry(s, c, C)? {
|
||||
Some(paint) => Ok(paint),
|
||||
None => color_value(c).map(|c| Paint::solid(stored(c))).ok_or_else(|| bad(C, "bad colour in `colors`")),
|
||||
})
|
||||
.collect::<Result<_>>()?;
|
||||
if cs.is_empty() {
|
||||
return Err(bad(C, "`colors` is empty"));
|
||||
}
|
||||
@@ -216,6 +218,16 @@ fn swatch_new(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
Ok(json!({ "name": names[0], "names": names }))
|
||||
}
|
||||
|
||||
/// A `colors` entry of `swatch.new` or `swatch.newGroup` that names a color swatch,
|
||||
/// `{swatch, tint?}`: the paint `paint.setFill {swatch, tint}` applies (a tint of a global or spot
|
||||
/// color stays linked to it). `None` for an entry without `swatch`.
|
||||
fn swatch_entry(s: &Session, v: &Value, cmd: &str) -> Result<Option<Paint>> {
|
||||
let Some(name) = v.get("swatch") else { return Ok(None) };
|
||||
let name = name.as_str().ok_or_else(|| bad(cmd, format!("`swatch` in `colors` must be a swatch name, not {name}")))?;
|
||||
let tint = super::paint::tint_param(v, cmd)?;
|
||||
super::paint::swatch_solid(&s.doc()?.doc, name, tint).map(Some).map_err(|e| bad(cmd, e))
|
||||
}
|
||||
|
||||
/// A gradient or pattern `paint`, parsed from the paint params `p`, as a new or edited swatch
|
||||
/// stores it.
|
||||
fn stored_paint(paint: Paint, p: &Value) -> Paint {
|
||||
@@ -475,10 +487,20 @@ fn swatch_new_group(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
let mut names = str_list(p, "swatches");
|
||||
super::paint::check_keep_model(p, C)?;
|
||||
check_switches(p, &["fromArtwork", "toGlobal", "includeTints"], C)?;
|
||||
let colors: Vec<Color> = p
|
||||
// A `{swatch, tint}` entry below 100% becomes a tint swatch linked to its base; any other
|
||||
// entry becomes a process color swatch.
|
||||
let colors: Vec<Paint> = p
|
||||
.get("colors")
|
||||
.and_then(Value::as_array)
|
||||
.map(|a| a.iter().map(|v| color_value(v).map(|c| super::paint::new_color(s, p, c)).ok_or_else(|| bad(C, format!("bad color {v}")))).collect())
|
||||
.map(|a| {
|
||||
a.iter()
|
||||
.map(|v| match swatch_entry(s, v, C)? {
|
||||
Some(paint @ Paint::Solid { swatch: Some(_), tint, .. }) if tint < 1.0 => Ok(paint),
|
||||
Some(paint) => paint.color().map(Paint::solid).ok_or_else(|| bad(C, format!("bad color {v}"))),
|
||||
None => color_value(v).map(|c| Paint::solid(super::paint::new_color(s, p, c))).ok_or_else(|| bad(C, format!("bad color {v}"))),
|
||||
})
|
||||
.collect::<Result<Vec<_>>>()
|
||||
})
|
||||
.transpose()?
|
||||
.unwrap_or_default();
|
||||
let from_art = bool_or(p, "fromArtwork", false);
|
||||
@@ -486,15 +508,15 @@ fn swatch_new_group(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
let tints = bool_or(p, "includeTints", false);
|
||||
let requested = name_param(p, "name");
|
||||
let (name, members, linked) = s.edit("New Color Group", |d, sel| {
|
||||
// New swatches: (colour, global).
|
||||
let mut new: Vec<(Color, bool)> = colors.iter().map(|c| (*c, false)).collect();
|
||||
// New swatches: (paint, global).
|
||||
let mut new: Vec<(Paint, bool)> = colors.iter().map(|c| (c.clone(), false)).collect();
|
||||
if from_art {
|
||||
if sel.objects.is_empty() {
|
||||
return Err(bad(C, "select artwork to make a group of its colours"));
|
||||
}
|
||||
let mut art = vec![];
|
||||
artwork_colors(d, &sel.objects, tints, &mut names, &mut art);
|
||||
new.extend(art.into_iter().map(|c| (c, to_global)));
|
||||
new.extend(art.into_iter().map(|c| (Paint::solid(c), to_global)));
|
||||
}
|
||||
let name = d.free_swatch_name(requested.as_deref().unwrap_or("Color Group"));
|
||||
// Colour groups hold solid colours only.
|
||||
@@ -505,12 +527,13 @@ fn swatch_new_group(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
let mut free = d.free_swatch_names();
|
||||
free.insert(&name);
|
||||
group.swatches.iter().for_each(|sw| free.insert(&sw.name));
|
||||
for (c, global) in new {
|
||||
let nm = free.take(&color_name(c));
|
||||
if global {
|
||||
for (paint, global) in new {
|
||||
// A tint swatch is named "Name 40%", a colour after its values.
|
||||
let nm = free.take_new(&paint);
|
||||
if global && let Some(c) = paint.color() {
|
||||
links.push((c, nm.clone()));
|
||||
}
|
||||
group.swatches.push(Swatch { name: nm, paint: Paint::solid(c), global, spot: false });
|
||||
group.swatches.push(Swatch { name: nm, paint, global, spot: false });
|
||||
}
|
||||
let members: Vec<String> = group.swatches.iter().map(|w| w.name.clone()).collect();
|
||||
d.swatch_groups.push(group);
|
||||
|
||||
@@ -95,3 +95,50 @@ fn new_swatch_saves_several_colours_in_one_step() {
|
||||
assert!(s.execute("swatch.new", &json!({"colors": []})).is_err());
|
||||
assert!(s.execute("swatch.new", &json!({"colors": ["nope"]})).is_err());
|
||||
}
|
||||
|
||||
/// The tint swatch a swatch named `name` is: (base, tint 0..1); none for any other swatch.
|
||||
fn tint_of(s: &Session, name: &str) -> Option<(String, f32)> {
|
||||
s.doc().unwrap().doc.swatch(name)?.tint_of().map(|(b, t)| (b.to_string(), t))
|
||||
}
|
||||
|
||||
/// `{swatch, tint}` entries of `swatch.new {colors}` and `swatch.newGroup {colors}` make tint
|
||||
/// swatches linked to their spot color, beside plain colors, in one undo step; the tints follow an
|
||||
/// edit of the spot color; a bad entry saves nothing.
|
||||
#[test]
|
||||
fn colors_entries_naming_a_spot_color_save_tint_swatches() {
|
||||
let mut s = session();
|
||||
s.execute("swatch.new", &json!({"name": "Ink", "color": "#0066cc", "spot": true})).unwrap();
|
||||
let undo = s.doc().unwrap().history.undo.len();
|
||||
let r = s.execute("swatch.new", &json!({"colors": [{"swatch": "Ink", "tint": 60}, "#112233", {"swatch": "Ink", "tint": 30}]})).unwrap();
|
||||
let names = hexes(&r["names"]);
|
||||
assert_eq!(names, ["Ink 60%", "R=17 G=34 B=51", "Ink 30%"]);
|
||||
assert_eq!(s.doc().unwrap().history.undo.len(), undo + 1, "one undo step");
|
||||
let (base, tint) = tint_of(&s, "Ink 60%").expect("a tint swatch");
|
||||
assert_eq!(base, "Ink");
|
||||
assert!((tint - 0.6).abs() < 1e-6, "{tint}");
|
||||
assert!(tint_of(&s, "R=17 G=34 B=51").is_none());
|
||||
let r = s.execute("swatch.newGroup", &json!({"name": "Guide", "colors": [{"swatch": "Ink", "tint": 45}, "#445566", {"swatch": "Ink"}]})).unwrap();
|
||||
let members = hexes(&r["swatches"]);
|
||||
assert_eq!(members[0], "Ink 45%");
|
||||
assert_eq!(tint_of(&s, "Ink 45%").map(|(b, _)| b).as_deref(), Some("Ink"));
|
||||
assert!(members[1..].iter().all(|m| tint_of(&s, m).is_none()), "a color and the full spot color are process copies: {members:?}");
|
||||
let d = &s.doc().unwrap().doc;
|
||||
let full = d.swatch(&members[2]).unwrap();
|
||||
assert!(!full.spot && !full.global, "{full:?}");
|
||||
// The tint swatches follow an edit of the spot color.
|
||||
s.execute("swatch.edit", &json!({"name": "Ink", "color": "#cc0000"})).unwrap();
|
||||
let d = &s.doc().unwrap().doc;
|
||||
let ink = d.global_color("Ink").unwrap();
|
||||
for name in ["Ink 60%", "Ink 45%"] {
|
||||
let w = d.swatch(name).unwrap();
|
||||
let t = w.tint_of().unwrap().1;
|
||||
assert_eq!(w.paint.color().map(|c| c.to_hex()), Some(ink.tinted(t).to_hex()), "{name}");
|
||||
}
|
||||
// A missing swatch, a tint of a process color or a tint that is not a number saves nothing.
|
||||
let count = s.doc().unwrap().doc.swatches_iter().count();
|
||||
for bad in [json!({"swatch": "Nope", "tint": 50}), json!({"swatch": "R=17 G=34 B=51", "tint": 50}), json!({"swatch": "Ink", "tint": "half"})] {
|
||||
assert!(s.execute("swatch.new", &json!({"colors": ["#010203", bad]})).is_err(), "{bad}");
|
||||
assert!(s.execute("swatch.newGroup", &json!({"colors": ["#010203", bad]})).is_err(), "{bad}");
|
||||
}
|
||||
assert_eq!(s.doc().unwrap().doc.swatches_iter().count(), count);
|
||||
}
|
||||
@@ -641,7 +641,7 @@ fn export_selection_reports_the_encoders_warnings() {
|
||||
assert_eq!(plain["format"], "svg");
|
||||
assert!(warnings(&plain).is_empty(), "{plain}");
|
||||
for (format, options, says) in [
|
||||
("webp", json!({"lossless": false}), "lossless"),
|
||||
("webp", json!({"interlaced": true}), "interlaced"),
|
||||
("svg", json!({"profile": "tiny12"}), "blend"),
|
||||
("pdf", json!({"createLayers": true, "compatibility": "1.4"}), "layers"),
|
||||
] {
|
||||
|
||||
@@ -5066,6 +5066,81 @@ proptest! {
|
||||
survive("mutated .ai brushes", || Some(vectorcraft_eps::layered_ai(&private, Document::new(200.0, 100.0), vec![], false, false, 1.0).0))?;
|
||||
survive("mutated .ai brushes, trusted", || Some(vectorcraft_eps::layered_ai(&private, Document::new(200.0, 100.0), vec![], false, true, 1.0).0))?;
|
||||
}
|
||||
|
||||
/// A `.ai` whose blends, as the writer writes them, are damaged: the keys and spine on `%_`
|
||||
/// lines with their dictionaries, the drawn steps, the record's `XP` and its hex, and the
|
||||
/// blend's transparency, cut short or edited.
|
||||
#[test]
|
||||
fn ai_written_blends_never_panic(cut in 0usize..BLENDS_FUZZ_CHARS, edits in prop::collection::vec((0usize..BLENDS_FUZZ_CHARS, prop::sample::select(vec!['0', '1', '2', '8', '9', 'A', 'F', '-', '.', ' ', '\n', '(', ')', '/', ',', ';', '%', '_', 'u', 'U', 'K', 'S', 'X', 'P'])), 0..12)) {
|
||||
let text = mutate_text(blends_text(), cut, &edits);
|
||||
let private = [b"%AI24_ZStandard_Data".as_slice(), &zstd(&text)].concat();
|
||||
survive("mutated .ai blends", || Some(vectorcraft_eps::layered_ai(&private, Document::new(300.0, 200.0), vec![], false, false, 1.0).0))?;
|
||||
survive("mutated .ai blends, trusted", || Some(vectorcraft_eps::layered_ai(&private, Document::new(300.0, 200.0), vec![], false, true, 1.0).0))?;
|
||||
}
|
||||
}
|
||||
|
||||
/// The range of [`ai_written_blends_never_panic`]'s cuts and edits: past the end of [`blends_text`].
|
||||
const BLENDS_FUZZ_CHARS: usize = 24_000;
|
||||
|
||||
/// The editing data VectorCraft writes for a document with two blends: red to blue squares with
|
||||
/// three steps and no spine of its own, at half opacity; and three squares 25 pt apart on a spine
|
||||
/// edited on the canvas, aligned to the path.
|
||||
fn blends_text() -> &'static str {
|
||||
static TEXT: std::sync::OnceLock<String> = std::sync::OnceLock::new();
|
||||
TEXT.get_or_init(|| {
|
||||
use std::sync::Arc;
|
||||
use vectorcraft_color::{Color, Paint};
|
||||
use vectorcraft_doc::live::{BlendOrientation, BlendSpacing, BlendSpec};
|
||||
use vectorcraft_doc::{Appearance, Node, NodeKind};
|
||||
use vectorcraft_geom::{PathData, Point, Rect, SubPath, shapes};
|
||||
let mut doc = Document::new(300.0, 200.0);
|
||||
let layer = doc.layers[0].id;
|
||||
let square = |doc: &mut Document, x: f64, y: f64, c: Color| {
|
||||
Arc::new(Node::path(
|
||||
doc.alloc_id(),
|
||||
shapes::rectangle(Rect::new(x, y, x + 20.0, y + 20.0)),
|
||||
Appearance::basic(Paint::solid(c), Paint::None, 0.0),
|
||||
))
|
||||
};
|
||||
let (red, blue, green) = (Color::rgb(1.0, 0.0, 0.0), Color::rgb(0.0, 0.0, 1.0), Color::rgb(0.0, 1.0, 0.0));
|
||||
let keys = vec![square(&mut doc, 20.0, 20.0, red), square(&mut doc, 120.0, 20.0, blue)];
|
||||
let mut fade = Node::new(
|
||||
doc.alloc_id(),
|
||||
NodeKind::Blend { children: keys, spec: Box::new(BlendSpec { spacing: BlendSpacing::Steps(3), ..BlendSpec::default() }) },
|
||||
);
|
||||
fade.opacity = 0.5;
|
||||
doc.insert(Some(layer), usize::MAX, fade).unwrap();
|
||||
let keys = vec![square(&mut doc, 20.0, 80.0, red), square(&mut doc, 120.0, 80.0, blue), square(&mut doc, 170.0, 80.0, green)];
|
||||
let centers: Vec<Point> = [30.0, 130.0, 180.0].iter().map(|x| Point::new(*x, 90.0)).collect();
|
||||
let spec = BlendSpec {
|
||||
spacing: BlendSpacing::Distance(25.0),
|
||||
orientation: BlendOrientation::AlignToPath,
|
||||
spine: Some(PathData::single(SubPath::polyline(¢ers, false))),
|
||||
key_anchors: vec![0, 1, 2],
|
||||
..BlendSpec::default()
|
||||
};
|
||||
let path = Node::new(doc.alloc_id(), NodeKind::Blend { children: keys, spec: Box::new(spec) });
|
||||
doc.insert(Some(layer), usize::MAX, path).unwrap();
|
||||
let out = vectorcraft_eps::export_ai_editing(&doc, &vectorcraft_eps::AiEditingOptions::default()).unwrap();
|
||||
String::from_utf8(out.program).unwrap()
|
||||
})
|
||||
}
|
||||
|
||||
/// The data [`ai_written_blends_never_panic`] damages, as it is, opens with both blends live, and
|
||||
/// the property's cuts and edits reach all of it.
|
||||
#[test]
|
||||
fn the_written_blends_fuzz_data_opens_live() {
|
||||
use vectorcraft_doc::NodeKind;
|
||||
let text = blends_text();
|
||||
assert!(text.chars().count() < BLENDS_FUZZ_CHARS, "{}", text.chars().count());
|
||||
for mark in ["%AI5_BeginLayer", "%_(K) /String (ShapeBlendPathType) ,", "%_(S) /String (ShapeBlendPathType) ,", "1 0 92 XP", "1 0 116 XP"] {
|
||||
assert!(text.replace("\r\n", "\n").contains(mark), "{mark}");
|
||||
}
|
||||
let private = [b"%AI24_ZStandard_Data".as_slice(), &zstd(text)].concat();
|
||||
let (d, warnings, layered) = vectorcraft_eps::layered_ai(&private, Document::new(300.0, 200.0), vec![], false, true, 1.0);
|
||||
assert!(layered, "{warnings:?}");
|
||||
let art = d.layers[0].children().unwrap();
|
||||
assert_eq!(art.iter().map(|n| matches!(n.kind, NodeKind::Blend { .. })).collect::<Vec<_>>(), [true, true], "{warnings:?}");
|
||||
}
|
||||
|
||||
/// The range of [`ai_written_styles_never_panic`]'s cuts and edits: past the end of [`styles_text`].
|
||||
|
||||
@@ -147,6 +147,12 @@
|
||||
//! reader reads back as the same graph ([`crate::ai_graph`]) is written as its group between
|
||||
//! `%_Gs`, its functional records and `%_GS`, each series' group tagged `Go` right after its end;
|
||||
//! any other graph, and a graph with art left out, as its art, with a warning.
|
||||
//! - Blends, as the reader reads them (`blend.rs`): the blend's key objects and spine as a group on
|
||||
//! `%_` lines, each key's `/ArtDictionary` naming it a key and its id and the spine's naming it the
|
||||
//! spine (written when the blend has a spine of its own); its steps drawn, a group;
|
||||
//! the blend plugin's `1 0 n XP` line and the blend's record of its spacing, orientation and keys as hex
|
||||
//! on `%` lines; its name and transparency as a group's after its end (`writer::blends`). A blend is
|
||||
//! written live only when the reader reads it back with its settings.
|
||||
//!
|
||||
//! Lines end in CR LF. Strings are written in UTF-8. Art space is ruler space: y up, its origin at
|
||||
//! the first artboard's top-left corner. On the canvas ([`CANVAS_SIZE`] points square, y down) the
|
||||
@@ -176,7 +182,8 @@
|
||||
//! and instances of
|
||||
//! symbols past 4,096 as their art (symbol art past [`vectorcraft_doc::MAX_SYMBOL_NODES`] objects
|
||||
//! in all left out), instances of symbols the document doesn't have as empty groups, symbols' 9-slice
|
||||
//! guides, export types and dynamic type left out, live objects (placed documents included) as their art,
|
||||
//! guides, export types and dynamic type left out, blends the reader wouldn't read back live as
|
||||
//! their steps, other live objects (placed documents included) as their art,
|
||||
//! strokes a plain line can't draw and the object's art style doesn't hold
|
||||
//! as their filled outlines, several fills or strokes as a group of a path for each, freeform
|
||||
//! gradient swatches, gradient swatches of more than 256 stops, swatches of patterns written as
|
||||
@@ -289,6 +296,8 @@ fn export_held(source: &Document, o: &AiEditingOptions, max_objects: usize, keep
|
||||
let links = writer::style_links(doc);
|
||||
// Before baking, which leaves the wrap objects that may be written as they are unchanged.
|
||||
let wraps_held = if keep_wraps { writer::wraps_held(doc, &styled) } else { HashSet::new() };
|
||||
// The blends baking leaves as they are, which may be written live.
|
||||
let unbaked_blends = writer::unbaked_blends(doc);
|
||||
// Live geometry effects as their result, as the PDF part draws them.
|
||||
let baked = baked(doc);
|
||||
let doc = baked.as_ref().unwrap_or(doc);
|
||||
@@ -319,6 +328,8 @@ fn export_held(source: &Document, o: &AiEditingOptions, max_objects: usize, keep
|
||||
// On a large canvas the layers' symbol instances are written as their art.
|
||||
w.symbols_live = scale == 1.0;
|
||||
w.brushes_live = scale == 1.0;
|
||||
w.blends_live = scale == 1.0;
|
||||
w.unbaked_blends = unbaked_blends;
|
||||
w.symbol_doc = symbol_doc;
|
||||
w.max_objects = max_objects;
|
||||
w.wraps_held = wraps_held;
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -15,6 +15,7 @@ use vectorcraft_pathops::BoolOp;
|
||||
use crate::ai_ops::{self, unit};
|
||||
use crate::ps;
|
||||
|
||||
mod blends;
|
||||
mod brushes;
|
||||
mod envelopes;
|
||||
mod images;
|
||||
@@ -24,6 +25,9 @@ mod symbols;
|
||||
mod texts;
|
||||
mod variables;
|
||||
|
||||
#[cfg(test)]
|
||||
pub(super) use blends::BLENDS;
|
||||
pub(super) use blends::unbaked_blends;
|
||||
#[cfg(test)]
|
||||
pub(super) use brushes::BRUSHES;
|
||||
#[cfg(test)]
|
||||
@@ -58,7 +62,7 @@ pub(super) const PATTERN_TILES: &str = "pattern fills with more tiles than a fil
|
||||
pub(super) const CLIPPING: &str = "clipping groups and clipping layers whose clipping object isn't a path, and the clipping groups inside them, are written as their art cut to that object in the editing data for other apps";
|
||||
pub(super) const CLIP_PAINT: &str = "the fills and strokes of clipping paths that a plain fill and line can't draw are written as paths of their own inside the clipping (fills under the clipped art, strokes over it) in the editing data for other apps";
|
||||
pub(super) const CLIP_PAINT_MASKS: &str = "the opacity masks of clipping paths whose fills and strokes are written as paths of their own stay on the clipping path, not on those paths, in the editing data for other apps";
|
||||
pub(super) const LIVE: &str = "blends, meshes, repeats, placed documents and intertwines are written as their art in the editing data for other apps";
|
||||
pub(super) const LIVE: &str = "meshes, repeats, placed documents and intertwines are written as their art in the editing data for other apps";
|
||||
pub(super) const GRAPHS: &str = "graphs are written as their art, without their data or settings, in the editing data for other apps";
|
||||
pub(super) const STROKES: &str = "strokes a plain line can't draw (inside or outside the path, variable width, dots, dashes fitted to corners, gradients, patterns, arrowheads) are written as filled outlines, and brushed strokes as their brush's art, in the editing data for other apps";
|
||||
pub(super) const ITEM_TRANSPARENCY: &str =
|
||||
@@ -328,6 +332,14 @@ pub(super) struct Writer<'a> {
|
||||
series_tag: Option<String>,
|
||||
/// Where the `Go` lines of the graph being written start in [`Self::body`].
|
||||
graph_tags: Vec<usize>,
|
||||
/// Blends may be written live; false on a large canvas, where they are written as their steps.
|
||||
pub(super) blends_live: bool,
|
||||
/// How many more objects the reader's blends may lay out ([`crate::import::BLEND_BUDGET`]).
|
||||
blend_budget: usize,
|
||||
/// The entries naming a blend's key object in its dictionary, and the key's id.
|
||||
blend_role: Option<(NodeId, String)>,
|
||||
/// The blends baking left as they are ([`blends::unbaked_blends`]); only these are written live.
|
||||
pub(super) unbaked_blends: HashSet<NodeId>,
|
||||
}
|
||||
|
||||
impl<'a> Writer<'a> {
|
||||
@@ -410,6 +422,10 @@ impl<'a> Writer<'a> {
|
||||
in_graph: false,
|
||||
series_tag: None,
|
||||
graph_tags: vec![],
|
||||
blends_live: true,
|
||||
blend_budget: crate::import::BLEND_BUDGET,
|
||||
blend_role: None,
|
||||
unbaked_blends: HashSet::new(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -840,7 +856,9 @@ impl<'a> Writer<'a> {
|
||||
}
|
||||
NodeKind::Envelope { .. } if self.envelope(n, xy) => {}
|
||||
NodeKind::Envelope { .. } => self.drawn_art(n, xy, Some(envelopes::ENVELOPES), true),
|
||||
NodeKind::Blend { .. } | NodeKind::Mesh(_) | NodeKind::Repeat(_) | NodeKind::PlacedDocument(_) | NodeKind::Intertwine { .. } => {
|
||||
NodeKind::Blend { .. } if self.blend(n, xy) => {}
|
||||
NodeKind::Blend { .. } => self.drawn_art(n, xy, Some(blends::BLENDS), true),
|
||||
NodeKind::Mesh(_) | NodeKind::Repeat(_) | NodeKind::PlacedDocument(_) | NodeKind::Intertwine { .. } => {
|
||||
self.drawn_art(n, xy, Some(LIVE), true);
|
||||
}
|
||||
// Ruler guides are kept in the document's native copy only.
|
||||
@@ -955,9 +973,10 @@ impl<'a> Writer<'a> {
|
||||
/// `n`'s `/ArtDictionary`, after it, when it has a name (`AI10_ArtUID`, see [`Self::take_id`]),
|
||||
/// is bound to variables ([`Self::bound_variables`]; without a name, it gets an XML id and an
|
||||
/// empty `AIArtName`), has text wrap options ([`Self::text_wrap`]), has an opacity mask
|
||||
/// (`AI9_Mask`, see [`Self::mask`]), or is a symbol's art (its symbol's entries first, see
|
||||
/// [`Self::define_symbol`]). False when `n` has an opacity mask that is left out: nested too
|
||||
/// deep, or its art doesn't fit.
|
||||
/// (`AI9_Mask`, see [`Self::mask`]), is a symbol's art (its symbol's entries first, see
|
||||
/// [`Self::define_symbol`]), or is a blend's key object (its part and id after the name, see
|
||||
/// [`blends`]). False when `n` has an opacity mask that is left out: nested too deep, or its art
|
||||
/// doesn't fit.
|
||||
fn dictionary(&mut self, n: &Node) -> bool {
|
||||
let name = n.name.as_deref().filter(|s| !s.is_empty());
|
||||
let moved = std::mem::take(&mut self.wrap_moved);
|
||||
@@ -977,7 +996,11 @@ impl<'a> Writer<'a> {
|
||||
Some((id, _)) if *id == n.id => self.root_entries.take().map(|(_, e)| e),
|
||||
_ => None,
|
||||
};
|
||||
if name.is_none() && mask.is_none() && bound.is_empty() && entries.is_none() && wrap.is_none() {
|
||||
let role = match &self.blend_role {
|
||||
Some((id, _)) if *id == n.id => self.blend_role.take().map(|(_, e)| e),
|
||||
_ => None,
|
||||
};
|
||||
if name.is_none() && mask.is_none() && bound.is_empty() && entries.is_none() && wrap.is_none() && role.is_none() {
|
||||
return mask_written;
|
||||
}
|
||||
let start = self.body.len();
|
||||
@@ -998,6 +1021,10 @@ impl<'a> Writer<'a> {
|
||||
self.bound.push((n.id, id, bound));
|
||||
}
|
||||
}
|
||||
let has_role = role.is_some();
|
||||
if let Some(r) = role {
|
||||
self.body.push_str(&r);
|
||||
}
|
||||
if let Some(w) = wrap {
|
||||
self.text_wrap(w);
|
||||
}
|
||||
@@ -1005,7 +1032,7 @@ impl<'a> Writer<'a> {
|
||||
if let Some(m) = mask
|
||||
&& !self.mask(m)
|
||||
{
|
||||
if !has_id && !has_entries && wrap.is_none() {
|
||||
if !has_id && !has_entries && wrap.is_none() && !has_role {
|
||||
self.body.truncate(start);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,372 @@
|
||||
//! Blends: a live blend as the `.ai` reader reads one ([`crate::import`]'s `.ai` reader, `blend.rs`
|
||||
//! and `read/containers.rs`' `end_blend`).
|
||||
//!
|
||||
//! The blend's own art on `%_` lines: `0 Ae`, a group of its key objects, each with an
|
||||
//! `/ArtDictionary` naming it a key (`ShapeBlendPathType` `K`) and its id (`ShapeBlendPathID`, a
|
||||
//! letter or digit), and its spine as an unpainted path named the spine (`S`), written only when the
|
||||
//! blend has a spine of its own; then its steps drawn, a group on plain lines; then `0 Ae`,
|
||||
//! the `XP` line of the blend plugin ([`BLEND_PLUGIN`], `1 0 n XP`) and the blend's record, `n` bytes
|
||||
//! as hex on `%` lines; then the blend's name in an `/ArtDictionary` and its transparency, as a
|
||||
//! group's after its end. The record
|
||||
//! is `DCBA` and little-endian 32-bit words: 1, the spacing (0 Smooth Color, 1 Specified Steps, 2
|
||||
//! Specified Distance); 2, the distance as a float (Specified Steps: the spine's length shared out
|
||||
//! between the steps; Smooth Color: 4); 4, the steps between the first two keys; 5, the orientation
|
||||
//! (0 Align to Page, a float of 8 and the spine's starting angle in radians for Align to Path); 6,
|
||||
//! the next free id (0 after the 62nd); 9, 1; 10, the number of keys; then six words a key: its id,
|
||||
//! 0, the anchor of the spine it sits on as a float, two words of all ones, and the steps between
|
||||
//! it and the key before it. The reader reads words 1, 2 (for Specified Distance), 5 (0, or 8 or
|
||||
//! more), 10 and the keys' ids; the others are written as the record's form has them.
|
||||
//!
|
||||
//! Each blend is checked with the reader's own reading ([`crate::import::blend_reads`]) before it is
|
||||
//! written: one the reader would read with other settings is written as its steps.
|
||||
|
||||
use std::collections::HashSet;
|
||||
use std::fmt::Write;
|
||||
use std::sync::Arc;
|
||||
|
||||
use vectorcraft_color::{BlendMode, Color, Paint};
|
||||
use vectorcraft_doc::blend::{blend_spine, blend_steps, blend_steps_settled, pin_spine};
|
||||
use vectorcraft_doc::live::{BlendOrientation, BlendSpacing, BlendSpec};
|
||||
use vectorcraft_doc::{AppearanceItem, Document, Node, NodeId, NodeKind, StrokeLayer};
|
||||
use vectorcraft_geom::{FillRule, PathData};
|
||||
|
||||
use super::{MAX_NEST, Writer, Xy, hide};
|
||||
use crate::import::{BLEND_PLUGIN, MAX_BLEND_KEYS, MAX_BLEND_OBJECTS, blend_reads};
|
||||
|
||||
pub(in crate::ai_editing) const BLENDS: &str = "blends with easing, a color shift or start points of their own, blends with effects, an appearance or an opacity mask of their own, blends of objects other than paths, compound paths and groups, of clipping groups, of more than 62 key objects, of hidden key objects, of key objects that hold a blend, of key objects with geometry or Pathfinder effects or a group's own fills and strokes, or of key objects the editing copy would change (empty paths or subpaths, paths and compound path members of several subpaths, several fills or strokes, strokes a plain line can't draw, dashes of more than 64 lengths, hidden fills or strokes, fills or strokes other than a color, in a Lab color or with transparency or effects of their own, effects or opacity masks), blends where one key object has a fill or stroke of no paint or a stroke of no width and another has one that draws, blends inside objects with geometry or Pathfinder effects or a group's own fills and strokes, blends whose spine has more than one part, blends whose step count is close to where rounding changes it, blends that would open with other settings or not as they are drawn, blends in opacity masks, pattern tiles, symbols and art cut to a clipping object or nested eight levels deep in art written in place of other objects (symbol instances, live objects, brushed strokes), blends whose art would pass the most objects the reader reads, and every blend on a large canvas are written as their steps in the editing data for other apps";
|
||||
|
||||
/// How far (pt) the lengths a blend counts its steps from may move when written (coordinates are
|
||||
/// written to 4 decimals and read back through art space) without changing a count.
|
||||
const SETTLE_LENGTH: f64 = 0.01;
|
||||
/// How far (pt) each segment of a spine may add to [`SETTLE_LENGTH`]: rounding moves each of its
|
||||
/// points by up to 0.00005 √2 pt, which moves the segment's length by up to six times that.
|
||||
const SETTLE_SEGMENT: f64 = 5e-4;
|
||||
/// How far a key's color (each channel, 0 to 1) may move when written without changing a Smooth
|
||||
/// Color count.
|
||||
const SETTLE_COLOR: f64 = 0.001;
|
||||
|
||||
/// The most dash lengths the reader reads; a stroke with more opens solid.
|
||||
const MAX_DASH_LENGTHS: usize = 64;
|
||||
|
||||
/// The ids the keys take, in their order (letters and digits, as the reader reads them).
|
||||
const IDS: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||
|
||||
/// Hex digits on one `%` line of a record.
|
||||
const HEX_LINE: usize = 60;
|
||||
|
||||
/// A blend to write live.
|
||||
pub(super) struct LiveBlend {
|
||||
keys: Vec<Arc<Node>>,
|
||||
ids: Vec<String>,
|
||||
/// Its spine part; `None`: the blend has no spine of its own.
|
||||
spine: Option<PathData>,
|
||||
record: Vec<u8>,
|
||||
steps: Vec<Arc<Node>>,
|
||||
}
|
||||
|
||||
impl Writer<'_> {
|
||||
/// Blend `n` as the reader reads it live, or `None` when it would read other settings or none
|
||||
/// (the blend is then written as its steps).
|
||||
pub(super) fn live_blend(&mut self, n: &Node) -> Option<LiveBlend> {
|
||||
let NodeKind::Blend { children: keys, spec } = &n.kind else { return None };
|
||||
// Hidden lines (pattern tiles, opacity masks), symbols' definitions and art cut to a
|
||||
// clipping object aren't read as live blends. (No blend is drawn in a look: styled objects
|
||||
// hold only paths, compound paths and groups of them.)
|
||||
if !self.blends_live || self.hidden > 0 || self.in_symbol || self.clip.is_some() || self.nest >= MAX_NEST {
|
||||
return None;
|
||||
}
|
||||
// Baking changes its keys, or the art it sits in ([`unbaked_blends`]).
|
||||
if !self.unbaked_blends.contains(&n.id) {
|
||||
return None;
|
||||
}
|
||||
if !spec.ease.is_default() || spec.color_shift != 0.0 || !spec.starts.is_empty() {
|
||||
return None;
|
||||
}
|
||||
let own = &n.appearance;
|
||||
if !own.items.is_empty() || !own.effects.is_empty() || n.extras().mask.is_some() {
|
||||
return None;
|
||||
}
|
||||
// The reader shows every key object it reads.
|
||||
if keys.len() < 2 || keys.len() > IDS.len().min(MAX_BLEND_KEYS) || !keys.iter().all(|k| k.visible && plain_key(k)) {
|
||||
return None;
|
||||
}
|
||||
// A fill or stroke the editing copy leaves out is read back as none at all, and the steps
|
||||
// blend from it to another key's otherwise.
|
||||
if left_out_against_drawn(keys) {
|
||||
return None;
|
||||
}
|
||||
// The spine written: a replaced spine (no key anchors) with an anchor where each key sits, a
|
||||
// spine edited on the canvas with its keys' anchors moved onto them.
|
||||
let spec: &BlendSpec = spec;
|
||||
// The blend lays out along the spine's first subpath, and only that part is written: a
|
||||
// spine of more parts would open without the others.
|
||||
if spec.spine.as_ref().is_some_and(|s| s.subpaths.len() > 1) {
|
||||
return None;
|
||||
}
|
||||
let written = match &spec.spine {
|
||||
None => BlendSpec { key_anchors: vec![], ..spec.clone() },
|
||||
Some(_) if spec.key_anchors.is_empty() => {
|
||||
let (path, anchors) = pin_spine(keys, spec)?;
|
||||
let anchors = anchors.into_iter().map(u32::try_from).collect::<Result<Vec<u32>, _>>().ok()?;
|
||||
BlendSpec { spine: Some(path), key_anchors: anchors, ..spec.clone() }
|
||||
}
|
||||
Some(_) => BlendSpec { spine: Some(blend_spine(keys, spec)?.0), ..spec.clone() },
|
||||
};
|
||||
// The record holds Specified Distance as a 32-bit float, which the reader reads back as its
|
||||
// shortest decimal (10 mm comes back as 28.346457 pt): the blend is compared with that
|
||||
// distance, and kept live only when it lays out as many steps with it.
|
||||
let written = match written.spacing {
|
||||
BlendSpacing::Distance(d) => {
|
||||
let read: f64 = (d as f32).to_string().parse().ok().filter(|r: &f64| r.is_finite() && *r > 0.0)?;
|
||||
let stored = BlendSpec { spacing: BlendSpacing::Distance(read), ..written.clone() };
|
||||
if blend_steps(keys, &stored) != blend_steps(keys, &written) {
|
||||
return None;
|
||||
}
|
||||
stored
|
||||
}
|
||||
_ => written,
|
||||
};
|
||||
// As many objects as the reader lays out for one blend, twice within what its budget has left,
|
||||
// counted before the steps are drawn.
|
||||
let objects = blend_steps(keys, &written).into_iter().fold(keys.len(), usize::saturating_add);
|
||||
if objects > MAX_BLEND_OBJECTS || objects.saturating_mul(2) > self.blend_budget {
|
||||
return None;
|
||||
}
|
||||
// The reader counts the steps from the keys as written, rounded: a count that rounding can
|
||||
// change may come back other than drawn. Specified Distance counts from the spine's length,
|
||||
// and every segment of the spine adds to how far that may move.
|
||||
let segments = written.spine.as_ref().and_then(|s| s.subpaths.first()).map_or(0, |s| s.segment_count());
|
||||
let settle = match written.spacing {
|
||||
BlendSpacing::Distance(_) => SETTLE_LENGTH + segments as f64 * SETTLE_SEGMENT,
|
||||
_ => SETTLE_LENGTH,
|
||||
};
|
||||
if !blend_steps_settled(keys, &written, settle, SETTLE_COLOR) {
|
||||
return None;
|
||||
}
|
||||
let ids: Vec<String> = IDS.iter().take(keys.len()).map(|c| char::from(*c).to_string()).collect();
|
||||
let record = self.record(keys, &written)?;
|
||||
let steps: Vec<Arc<Node>> = vectorcraft_effects::expand_live_deep(Some(self.doc), n).children().cloned().unwrap_or_default();
|
||||
let drawn: Vec<Node> = steps.iter().map(|s| (**s).clone()).collect();
|
||||
// The spine part as written: the first subpath of the spine laid out.
|
||||
let part = written.spine.as_ref().and_then(|s| s.subpaths.first()).map(|sp| PathData::single(sp.clone()));
|
||||
let mut budget = self.blend_budget;
|
||||
let read = blend_reads(keys, &ids, part.as_ref(), &record, &drawn, &mut budget)?;
|
||||
if read != written {
|
||||
return None;
|
||||
}
|
||||
self.blend_budget = budget;
|
||||
Some(LiveBlend { keys: keys.clone(), ids, spine: part, record, steps })
|
||||
}
|
||||
|
||||
/// The record of a blend of `keys` with the settings `spec` (its spine as written).
|
||||
fn record(&self, keys: &[Arc<Node>], spec: &BlendSpec) -> Option<Vec<u8>> {
|
||||
let (spine, anchors) = blend_spine(keys, spec)?;
|
||||
let steps = blend_steps(keys, spec);
|
||||
let first = u32::try_from(*steps.first()?).ok()?;
|
||||
let (spacing, value) = match spec.spacing {
|
||||
BlendSpacing::SmoothColor => (0, 4.0),
|
||||
BlendSpacing::Steps(n) => (1, spine.length() / (f64::from(n) + 1.0)),
|
||||
BlendSpacing::Distance(d) => (2, d),
|
||||
};
|
||||
let orientation = match spec.orientation {
|
||||
BlendOrientation::AlignToPage => 0.0,
|
||||
BlendOrientation::AlignToPath => 8.0 + self.starting_angle(&spine)?,
|
||||
};
|
||||
let count = u32::try_from(keys.len()).ok()?;
|
||||
let next = IDS.get(keys.len()).copied().map_or(0, u32::from);
|
||||
let mut words: Vec<u32> = vec![u32::from_le_bytes(*b"DCBA"), spacing, (value as f32).to_bits(), 0, first, (orientation as f32).to_bits()];
|
||||
words.extend([next, 0, 0, 1, count]);
|
||||
for (i, id) in IDS.iter().take(keys.len()).enumerate() {
|
||||
let anchor = anchors.as_ref().and_then(|a| a.get(i)).copied().unwrap_or(i);
|
||||
let before = i.checked_sub(1).and_then(|j| steps.get(j)).copied().unwrap_or(0);
|
||||
words.extend([u32::from(*id), 0, (anchor as f32).to_bits(), u32::MAX, u32::MAX, u32::try_from(before).ok()?]);
|
||||
}
|
||||
Some(words.iter().flat_map(|w| w.to_le_bytes()).collect())
|
||||
}
|
||||
|
||||
/// The angle in art space (radians, from 0 to 2π) at which `spine` starts.
|
||||
fn starting_angle(&self, spine: &PathData) -> Option<f64> {
|
||||
let sp = spine.subpaths.first()?;
|
||||
let first = sp.anchors.first()?;
|
||||
let towards = if (first.h_out - first.p).hypot() > 1e-9 { first.h_out } else { sp.anchors.get(1)?.p };
|
||||
let (a, b) = (self.to_art * first.p, self.to_art * towards);
|
||||
let angle = (b.y - a.y).atan2(b.x - a.x);
|
||||
Some(if angle < 0.0 { angle + std::f64::consts::TAU } else { angle })
|
||||
}
|
||||
|
||||
/// Blend `n`, of transparency `xy`, written live ([`Self::live_blend`]): its own art on `%_`
|
||||
/// lines, its steps and its record, then the state block of its transparency, before which the
|
||||
/// object's dictionary (its name, text wrap options and variables) goes. False, writing
|
||||
/// nothing, when it is written as its steps: the reader would read it otherwise, or art in it
|
||||
/// would be left out at the object limit ([`Self::take_objects`]).
|
||||
pub(super) fn blend(&mut self, n: &Node, xy: Xy) -> bool {
|
||||
let budget = self.blend_budget;
|
||||
let Some(b) = self.live_blend(n) else { return false };
|
||||
let start = self.body.len();
|
||||
let (state, gs, charges, bound, warnings) = (self.state, self.gs, self.charges(), self.bound.len(), self.warnings.len());
|
||||
let outer = std::mem::take(&mut self.body);
|
||||
self.hidden += 1;
|
||||
self.line("0 Ae");
|
||||
let opened = self.open_group("u");
|
||||
if opened {
|
||||
for (k, id) in b.keys.iter().zip(&b.ids) {
|
||||
self.blend_role = Some((k.id, format!("%_(K) /String (ShapeBlendPathType) ,\n%_({id}) /String (ShapeBlendPathID) ,\n")));
|
||||
self.node(k);
|
||||
self.blend_role = None;
|
||||
}
|
||||
if let Some(spine) = &b.spine {
|
||||
self.plain_object(spine, FillRule::NonZero, None, None, Xy::OPAQUE);
|
||||
self.body.push_str("%_/ArtDictionary :\n%_(S) /String (ShapeBlendPathType) ,\n%_;\n%_\n");
|
||||
}
|
||||
self.line("U");
|
||||
self.line("9 () XW");
|
||||
}
|
||||
self.hidden -= 1;
|
||||
let part = std::mem::replace(&mut self.body, outer);
|
||||
hide(&part, &mut self.body);
|
||||
// Readers of the printed form skip the hidden lines: the steps set their own state.
|
||||
(self.state, self.gs) = (None, None);
|
||||
self.state(n.locked, !n.visible);
|
||||
let steps = self.open_group("u");
|
||||
if steps {
|
||||
// The steps are drawn art: copies of the keys carry no text wrap options of their own.
|
||||
self.nest += 1;
|
||||
self.drawn += 1;
|
||||
for s in &b.steps {
|
||||
self.node(s);
|
||||
}
|
||||
self.drawn -= 1;
|
||||
self.nest -= 1;
|
||||
self.state(n.locked, !n.visible);
|
||||
self.line("U");
|
||||
self.line("9 () XW");
|
||||
}
|
||||
if !opened || !steps || self.left_out_since(charges) {
|
||||
let lines = self.body.split_off(start);
|
||||
self.give_back(charges, &lines);
|
||||
self.bound.truncate(bound);
|
||||
// The warnings of art written as its steps again are those steps'.
|
||||
if !self.left_out_since(charges) {
|
||||
self.warnings.truncate(warnings);
|
||||
}
|
||||
(self.state, self.gs, self.block_end, self.blend_budget) = (state, gs, usize::MAX, budget);
|
||||
return false;
|
||||
}
|
||||
self.line("0 Ae");
|
||||
let hex: String = b.record.iter().map(|x| format!("{x:02X}")).collect();
|
||||
let _ = writeln!(self.body, "({BLEND_PLUGIN}) 1 0 {} XP", b.record.len());
|
||||
for chunk in hex.as_bytes().chunks(HEX_LINE) {
|
||||
self.body.push('%');
|
||||
self.body.push_str(&String::from_utf8_lossy(chunk));
|
||||
self.body.push('\n');
|
||||
}
|
||||
// The blend's dictionary goes after the record and before this block ([`Self::node`]).
|
||||
self.state_block(xy);
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
/// The blends on `doc`'s layers that baking leaves as they are: blends with nothing in them that
|
||||
/// [`vectorcraft_effects::needs_bake`] evaluates (geometry and Pathfinder effects, a group's own
|
||||
/// fills and strokes), inside no object that has such things of its own. Baking changes the keys
|
||||
/// of the others, so they are written as their steps.
|
||||
pub(in crate::ai_editing) fn unbaked_blends(doc: &Document) -> HashSet<NodeId> {
|
||||
fn walk(nodes: &[Arc<Node>], out: &mut HashSet<NodeId>) {
|
||||
for n in nodes {
|
||||
if matches!(n.kind, NodeKind::Blend { .. }) {
|
||||
if !vectorcraft_effects::needs_bake(n) {
|
||||
out.insert(n.id);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
let Some(children) = n.children() else { continue };
|
||||
let mut own = (**n).clone();
|
||||
if let Some(c) = own.children_mut() {
|
||||
c.clear();
|
||||
}
|
||||
if !vectorcraft_effects::needs_bake(&own) {
|
||||
walk(children, out);
|
||||
}
|
||||
}
|
||||
}
|
||||
let mut out = HashSet::new();
|
||||
walk(&doc.layers, &mut out);
|
||||
out
|
||||
}
|
||||
|
||||
/// Does the reader read stroke `s`'s dashes back as they are (`read/ops.rs`' `d`): at most 64
|
||||
/// lengths, each finite and not negative, and a finite offset? It reads other dashes as a solid
|
||||
/// line.
|
||||
fn dash_read_back(s: &StrokeLayer) -> bool {
|
||||
s.dash
|
||||
.as_ref()
|
||||
.is_none_or(|d| d.pattern.len() <= MAX_DASH_LENGTHS && d.pattern.iter().all(|v| v.is_finite() && *v >= 0.0) && d.offset.is_finite())
|
||||
}
|
||||
|
||||
/// Do the keys hold a fill or stroke that the editing copy leaves out (a fill of no paint; a stroke
|
||||
/// of no paint or of no width, as `visible_items` leaves them out) where another holds one of the
|
||||
/// same kind that it writes? The steps blend the width, paint and settings of the one left out, and
|
||||
/// the keys read back blend from no fill or stroke, so the steps would open otherwise.
|
||||
fn left_out_against_drawn(keys: &[Arc<Node>]) -> bool {
|
||||
// [fill, stroke]: is one left out somewhere, is one written somewhere.
|
||||
let mut left_out = [false; 2];
|
||||
let mut drawn = [false; 2];
|
||||
for k in keys {
|
||||
k.walk(&mut |n| {
|
||||
for i in &n.appearance.items {
|
||||
let (kind, out) = match i {
|
||||
AppearanceItem::Fill(f) => (0, f.paint.is_none()),
|
||||
AppearanceItem::Stroke(s) => (1, s.paint.is_none() || !(s.width > 0.0 && s.width.is_finite())),
|
||||
};
|
||||
if out {
|
||||
left_out[kind] = true;
|
||||
} else {
|
||||
drawn[kind] = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
(left_out[0] && drawn[0]) || (left_out[1] && drawn[1])
|
||||
}
|
||||
|
||||
/// Can `k` be a key object written live, as the reader reads it back: paths, compound paths and
|
||||
/// groups other than clipping groups (holding no blend), without effects or opacity masks, each with
|
||||
/// at most one fill and one plain stroke over it (a line the data draws as it is), each fill and
|
||||
/// stroke shown, in a color other than Lab or none, opaque in the normal blending mode? (A group's own fills and
|
||||
/// strokes are baked into art of their own, and such blends aren't [`unbaked_blends`].)
|
||||
fn plain_key(k: &Node) -> bool {
|
||||
let mut plain = true;
|
||||
k.walk(&mut |n| {
|
||||
// A clipping group may be written as its art cut to the clipping object.
|
||||
let kind = match &n.kind {
|
||||
// The writer leaves out a path with nothing to draw and subpaths without anchors, and
|
||||
// writes a path of several subpaths as a compound path.
|
||||
NodeKind::Path { path, guide: false, .. } => matches!(path.subpaths.as_slice(), [one] if !one.anchors.is_empty()),
|
||||
// A compound path is written as one path, and read back with a member for each
|
||||
// subpath.
|
||||
NodeKind::Compound { children, .. } => {
|
||||
!children.is_empty()
|
||||
&& children.iter().all(|c| matches!(&c.kind, NodeKind::Path { path, guide: false, .. } if path.subpaths.len() == 1))
|
||||
}
|
||||
NodeKind::Group { clip: false, .. } => true,
|
||||
_ => false,
|
||||
};
|
||||
let items = &n.appearance.items;
|
||||
let fills = items.iter().filter(|i| matches!(i, AppearanceItem::Fill(_))).count();
|
||||
let strokes = items.iter().filter(|i| matches!(i, AppearanceItem::Stroke(_))).count();
|
||||
let order = !matches!(items.as_slice(), [AppearanceItem::Stroke(_), AppearanceItem::Fill(_)]);
|
||||
let quiet = items.iter().all(|i| {
|
||||
i.visible()
|
||||
&& matches!(i.paint(), Paint::Solid { .. } | Paint::None)
|
||||
// A color that names no global or spot swatch is written in RGB, so a Lab color
|
||||
// would come back as another.
|
||||
&& !matches!(i.paint(), Paint::Solid { color: Color::Lab { .. }, .. })
|
||||
&& i.effects().is_empty()
|
||||
&& i.opacity() >= 1.0
|
||||
&& i.blend() == BlendMode::Normal
|
||||
&& !matches!(i, AppearanceItem::Stroke(s) if !vectorcraft_effects::stroke::is_plain(s) || !dash_read_back(s))
|
||||
});
|
||||
plain &= kind && fills <= 1 && strokes <= 1 && order && quiet && n.appearance.effects.is_empty() && n.extras().mask.is_none();
|
||||
});
|
||||
plain
|
||||
}
|
||||
@@ -90,9 +90,10 @@ pub use ai::NameEncoding;
|
||||
#[cfg(test)]
|
||||
pub(crate) use ai::objects_read;
|
||||
pub(crate) use ai::{
|
||||
BRUSH_MANAGER, BrushesRead, DEFORM_PLUGIN, EnvelopeGridPoint, MAX_CHECKED as ENVELOPE_CHECKS, MAX_EDITING_OBJECTS, MAX_GRADIENT_STOPS,
|
||||
MAX_LISTED, MAX_LISTED_NAME, MAX_SYMBOLS, brush_plugin_name, brushes_kept, envelope_outline, envelope_upright, read_art_style, read_brush_object,
|
||||
read_style_list, style_moves_with, symbol_art_member, warp_number,
|
||||
BLEND_BUDGET, BLEND_PLUGIN, BRUSH_MANAGER, BrushesRead, DEFORM_PLUGIN, EnvelopeGridPoint, MAX_BLEND_KEYS, MAX_BLEND_OBJECTS,
|
||||
MAX_CHECKED as ENVELOPE_CHECKS, MAX_EDITING_OBJECTS, MAX_GRADIENT_STOPS, MAX_LISTED, MAX_LISTED_NAME, MAX_SYMBOLS, blend_reads,
|
||||
brush_plugin_name, brushes_kept, envelope_outline, envelope_upright, read_art_style, read_brush_object, read_style_list, style_moves_with,
|
||||
symbol_art_member, warp_number,
|
||||
};
|
||||
#[cfg(test)]
|
||||
pub(crate) use ai::{ENVELOPE_DRAWN, ENVELOPE_TYPE_DRAWN};
|
||||
|
||||
@@ -34,6 +34,7 @@ use std::io::Read as _;
|
||||
use super::lex::find;
|
||||
use crate::ps;
|
||||
|
||||
pub(crate) use blend::{MAX_BLEND_OBJECTS, MAX_KEYS as MAX_BLEND_KEYS, PLUGIN as BLEND_PLUGIN, blend_reads};
|
||||
pub(crate) use brush::{BrushesRead, MANAGER_NAME as BRUSH_MANAGER, brushes_kept, plugin_name as brush_plugin_name, read_brush_object};
|
||||
pub(crate) use envelope::DRAWN as ENVELOPE_DRAWN;
|
||||
pub(crate) use envelope::MAX_CHECKED;
|
||||
@@ -41,6 +42,8 @@ pub(crate) use envelope::TYPE_DRAWN as ENVELOPE_TYPE_DRAWN;
|
||||
pub(crate) use envelope::{GridPoint as EnvelopeGridPoint, PLUGIN as DEFORM_PLUGIN, outline as envelope_outline, upright as envelope_upright};
|
||||
pub(crate) use envelope::{MAX_ANY as ENVELOPE_MAX_ANY, MAX_SOLID as ENVELOPE_MAX_SOLID};
|
||||
pub(crate) use envelope::{WARPED_TYPE_DRAWN, WarpedType};
|
||||
#[cfg(test)]
|
||||
pub(crate) use frames::TEXT_FRAME_SCANS;
|
||||
pub(crate) use frames::text_frames;
|
||||
pub use obj::{NameEncoding, Names};
|
||||
pub(crate) use paint::MAX_STOPS as MAX_GRADIENT_STOPS;
|
||||
@@ -50,14 +53,14 @@ pub(crate) use read::objects_read;
|
||||
pub use read::read;
|
||||
#[cfg(test)]
|
||||
pub(crate) use read::with_image_limits;
|
||||
pub(crate) use read::{
|
||||
BLEND_BUDGET, MAX_NODES as MAX_EDITING_OBJECTS, MAX_SYMBOLS, join_and, read_art_style, read_over_page, read_program, read_style_list, slot_frame,
|
||||
slot_of, style_moves_with, symbol_art_member,
|
||||
};
|
||||
pub use read::{
|
||||
BindingRef, Brushes, PaletteSwatches, PlacedPage, Structure, Symbols, active_artboard, artboards, bindings_note, brushes, graphic_styles,
|
||||
palette, read_beside, read_in, symbols, variables,
|
||||
};
|
||||
pub(crate) use read::{
|
||||
MAX_NODES as MAX_EDITING_OBJECTS, MAX_SYMBOLS, join_and, read_art_style, read_over_page, read_program, read_style_list, slot_frame, slot_of,
|
||||
style_moves_with, symbol_art_member,
|
||||
};
|
||||
|
||||
pub(crate) use read::is_look_slot;
|
||||
pub(crate) use style::{MAX_LISTED, MAX_LISTED_NAME, warp_number};
|
||||
|
||||
@@ -15,11 +15,14 @@
|
||||
//!
|
||||
//! The reader reads the words after `DCBA` (little endian) this way. Word 1 is the spacing: 0 is
|
||||
//! Smooth Color, 1 is Specified Steps and 2 is Specified Distance. For Specified Distance, word 2
|
||||
//! is the distance in points, as a 32-bit float. Word 10 is the number of keys, and the words after
|
||||
//! it are a record of six words per key that starts with the key's id. For Specified Steps, the
|
||||
//! steps between two keys are counted from the steps drawn. The orientation is taken from the steps
|
||||
//! drawn: whichever one lays the blend out as they are drawn. A blend whose parts don't agree,
|
||||
//! whose spacing isn't one of these, or that doesn't come out as drawn, keeps its drawn steps.
|
||||
//! is the distance in points, as a 32-bit float. Word 5 is 0 for Align to Page and, for Align to
|
||||
//! Path, a 32-bit float of 8 or more. Word 10 is the number of keys, and the words after it are a
|
||||
//! record of six words per key that starts with the key's id. For Specified Steps, the steps
|
||||
//! between two keys are counted from the steps drawn. The orientation is the record's when it lays
|
||||
//! the blend out as the steps are drawn, else whichever one does (the closest when both do). A blend
|
||||
//! with no spine part whose record names its keys in their order has no spine of its own: it runs
|
||||
//! straight between its keys' centers. A blend whose parts don't agree, whose spacing isn't one of
|
||||
//! these, or that doesn't come out as drawn, keeps its drawn steps.
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
@@ -28,19 +31,19 @@ use vectorcraft_color::{Color, Paint};
|
||||
use vectorcraft_doc::blend::{blend_expand, blend_steps};
|
||||
use vectorcraft_doc::live::{BlendOrientation, BlendSpacing, BlendSpec};
|
||||
use vectorcraft_doc::{AppearanceItem, Node, NodeId, NodeKind};
|
||||
use vectorcraft_geom::{PathData, Point, SubPath};
|
||||
use vectorcraft_geom::{ParamCurve, PathData, Point, SubPath};
|
||||
|
||||
/// The plugin that writes blends.
|
||||
pub(super) const PLUGIN: &str = "Adobe Path Blends"; // brand-ok: the plugin name the files use
|
||||
pub(crate) const PLUGIN: &str = "Adobe Path Blends"; // brand-ok: the plugin name the files use
|
||||
/// The most bytes of a blend's record read.
|
||||
pub(super) const MAX_RECORD: usize = 4096;
|
||||
/// The most keys read from one blend.
|
||||
const MAX_KEYS: usize = 64;
|
||||
pub(crate) const MAX_KEYS: usize = 64;
|
||||
/// The most steps between two keys (Blend Options' limit).
|
||||
const MAX_STEPS: usize = 1000;
|
||||
/// The most objects (keys and steps) one blend may lay out to be read live; more keep their
|
||||
/// drawn steps.
|
||||
pub(super) const MAX_BLEND_OBJECTS: usize = 5_000;
|
||||
pub(crate) const MAX_BLEND_OBJECTS: usize = 5_000;
|
||||
/// How far (pt) a step laid out here may be from where the file draws it.
|
||||
const PLACE_TOLERANCE: f64 = 0.5;
|
||||
/// How far a step's colour (each channel, 0 to 1) may be from the drawn one.
|
||||
@@ -66,6 +69,8 @@ pub(super) struct Record {
|
||||
pub(super) ids: Vec<String>,
|
||||
/// `None`: Specified Steps, whose steps the reader counts from the drawn ones.
|
||||
pub(super) spacing: Option<BlendSpacing>,
|
||||
/// The orientation word 5 names, when it names one.
|
||||
pub(super) orientation: Option<BlendOrientation>,
|
||||
}
|
||||
|
||||
/// A blend's record, or `None` for a record that isn't one or whose spacing isn't read: an
|
||||
@@ -82,7 +87,18 @@ pub(super) fn record(bytes: &[u8]) -> Option<Record> {
|
||||
_ => return None,
|
||||
};
|
||||
let ids = record_ids(&words)?;
|
||||
Some(Record { ids, spacing })
|
||||
let orientation = words.get(5).and_then(|w| orientation(*w));
|
||||
Some(Record { ids, spacing, orientation })
|
||||
}
|
||||
|
||||
/// The orientation in a record's word 5: 0 is Align to Page, a 32-bit float of 8 or more Align to
|
||||
/// Path; anything else names none.
|
||||
fn orientation(bits: u32) -> Option<BlendOrientation> {
|
||||
if bits == 0 {
|
||||
return Some(BlendOrientation::AlignToPage);
|
||||
}
|
||||
let a = f32::from_bits(bits);
|
||||
(a.is_finite() && a >= 8.0).then_some(BlendOrientation::AlignToPath)
|
||||
}
|
||||
|
||||
/// The distance in a record's word `bits` (a 32-bit float), as the shortest decimal that reads
|
||||
@@ -131,6 +147,7 @@ pub(super) fn live_blend(edit: &Node, drawn: &Node, record: &Record, roles: &Rol
|
||||
if keys.len() < 2 || named.len() != keys.len() || ids.len() != keys.len() {
|
||||
return None;
|
||||
}
|
||||
let in_order = named.iter().zip(ids).all(|(n, id)| *n == id.as_str());
|
||||
named.sort_unstable();
|
||||
let mut listed: Vec<&str> = ids.iter().map(String::as_str).collect();
|
||||
listed.sort_unstable();
|
||||
@@ -150,12 +167,20 @@ pub(super) fn live_blend(edit: &Node, drawn: &Node, record: &Record, roles: &Rol
|
||||
})
|
||||
.collect();
|
||||
// A blend whose spine was never edited has none written: its spine is the straight lines
|
||||
// between the keys' centres, in the record's order.
|
||||
let spine = match spine {
|
||||
Some(spine) => spine,
|
||||
None => straight_spine(&keys, ids, roles)?,
|
||||
// between the keys' centers, in the record's order. With the keys in that order it is the
|
||||
// spine of a blend that has none of its own.
|
||||
let (spine, key_anchors) = match spine {
|
||||
Some(spine) => {
|
||||
let anchors = on_spine(&keys, &spine)?;
|
||||
(Some(spine), anchors)
|
||||
}
|
||||
None if in_order => (None, vec![]),
|
||||
None => {
|
||||
let spine = straight_spine(&keys, ids, roles)?;
|
||||
let anchors = on_spine(&keys, &spine)?;
|
||||
(Some(spine), anchors)
|
||||
}
|
||||
};
|
||||
let key_anchors = on_spine(&keys, &spine)?;
|
||||
let spacing = match record.spacing {
|
||||
// Specified Steps: the steps between two keys are the drawn objects that aren't keys,
|
||||
// shared out.
|
||||
@@ -170,26 +195,68 @@ pub(super) fn live_blend(edit: &Node, drawn: &Node, record: &Record, roles: &Rol
|
||||
if cost > *budget {
|
||||
return None;
|
||||
}
|
||||
let spec = BlendSpec { spacing, spine: Some(spine), key_anchors, ..BlendSpec::default() };
|
||||
let spec = BlendSpec { spacing, spine, key_anchors, ..BlendSpec::default() };
|
||||
// As many objects as the spacing lays out between each pair of keys (the orientation doesn't
|
||||
// change how many), counted before anything is laid out: as many as are drawn.
|
||||
if blend_steps(&keys, &spec).into_iter().fold(keys.len(), usize::saturating_add) != drawn.len() {
|
||||
return None;
|
||||
}
|
||||
*budget -= cost;
|
||||
// The drawn steps' centres and paints, once.
|
||||
let drawn: Vec<(Point, Fill)> = drawn.iter().map(|d| Some((centre(d)?, fill(d)))).collect::<Option<_>>()?;
|
||||
// The orientation that lays the steps out as drawn, the closest when both do.
|
||||
[BlendOrientation::AlignToPage, BlendOrientation::AlignToPath]
|
||||
// The drawn steps as the check compares them, once.
|
||||
let drawn: Vec<Drawn> = drawn.iter().map(|d| drawn_as(d)).collect::<Option<_>>()?;
|
||||
// The orientations that lay the steps out as drawn (the check compares the steps' centers, which
|
||||
// turning the steps along the spine leaves in place). Of those that also lay them out at their
|
||||
// drawn sizes and turned as drawn, the record's, else the closest; when none does, the closest
|
||||
// of them all.
|
||||
let fits: Vec<(f64, BlendSpec, Vec<Node>)> = [BlendOrientation::AlignToPage, BlendOrientation::AlignToPath]
|
||||
.into_iter()
|
||||
.filter_map(|orientation| {
|
||||
let spec = BlendSpec { orientation, ..spec.clone() };
|
||||
let laid = blend_expand(&keys, &spec);
|
||||
let off = how_far(&laid, &drawn)?;
|
||||
Some((off, spec))
|
||||
let off = how_far(&laid, &drawn, false)?;
|
||||
Some((off, spec, laid))
|
||||
})
|
||||
.min_by(|a, b| a.0.total_cmp(&b.0))
|
||||
.map(|(_, spec)| NodeKind::Blend { children: keys, spec: Box::new(spec) })
|
||||
.collect();
|
||||
let as_drawn: Vec<&(f64, BlendSpec, Vec<Node>)> = fits.iter().filter(|(_, _, laid)| how_far(laid, &drawn, true).is_some()).collect();
|
||||
as_drawn
|
||||
.iter()
|
||||
.copied()
|
||||
.find(|(_, s, _)| Some(s.orientation) == record.orientation)
|
||||
.or_else(|| as_drawn.iter().copied().min_by(|a, b| a.0.total_cmp(&b.0)))
|
||||
.or_else(|| fits.iter().min_by(|a, b| a.0.total_cmp(&b.0)))
|
||||
.map(|(_, spec, _)| NodeKind::Blend { children: keys, spec: Box::new(spec.clone()) })
|
||||
}
|
||||
|
||||
/// What the reader makes of a blend written as the key objects `keys`, named by `ids` in their
|
||||
/// order, the spine `spine` (`None`: no spine part), the record `bytes` and the drawn steps `drawn`:
|
||||
/// the live blend's settings, or `None` where it keeps the drawn steps. Takes from `budget` as
|
||||
/// [`live_blend`] does.
|
||||
pub(crate) fn blend_reads(
|
||||
keys: &[Arc<Node>],
|
||||
ids: &[String],
|
||||
spine: Option<&PathData>,
|
||||
bytes: &[u8],
|
||||
drawn: &[Node],
|
||||
budget: &mut usize,
|
||||
) -> Option<BlendSpec> {
|
||||
let record = record(bytes)?;
|
||||
let mut roles = Roles::new();
|
||||
let mut parts: Vec<Arc<Node>> = Vec::with_capacity(keys.len() + 1);
|
||||
for (k, id) in keys.iter().zip(ids) {
|
||||
roles.insert(k.id, ("K".to_string(), Some(id.clone())));
|
||||
parts.push(k.clone());
|
||||
}
|
||||
if let Some(s) = spine {
|
||||
let id = NodeId(u64::MAX);
|
||||
roles.insert(id, ("S".to_string(), None));
|
||||
parts.push(Arc::new(Node::path(id, s.clone(), Default::default())));
|
||||
}
|
||||
let edit = Node::new(NodeId(u64::MAX - 1), NodeKind::Group { children: parts, clip: false });
|
||||
let drawn = Node::new(NodeId(u64::MAX - 2), NodeKind::Group { children: drawn.iter().cloned().map(Arc::new).collect(), clip: false });
|
||||
match live_blend(&edit, &drawn, &record, &roles, budget)? {
|
||||
NodeKind::Blend { spec, .. } => Some(*spec),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
/// The anchor of `spine`'s first subpath each key's centre sits on (within a point), each a
|
||||
@@ -227,6 +294,117 @@ fn centre(n: &Node) -> Option<Point> {
|
||||
n.geometric_bounds().map(|b| b.center()).filter(|p| p.x.is_finite() && p.y.is_finite())
|
||||
}
|
||||
|
||||
/// The most anchors of an object's paths the check compares; an object with more is compared by its
|
||||
/// size alone.
|
||||
const MAX_MARK_ANCHORS: usize = 64;
|
||||
/// The most drawn objects whose outlines one check compares, spread evenly from the first to the
|
||||
/// last; the rest are compared by their sizes alone (the orientation turns every step alike).
|
||||
const MAX_OUTLINE_CHECKS: usize = 16;
|
||||
/// The most outline comparisons one check makes (a drawn object compared can have more than one
|
||||
/// laid object in its place); past them, a drawn object whose outline is to be compared matches
|
||||
/// none.
|
||||
const MAX_OUTLINE_COMPARISONS: usize = 4 * MAX_OUTLINE_CHECKS;
|
||||
|
||||
/// An object as the check compares it.
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
struct Drawn<'a> {
|
||||
centre: Point,
|
||||
fill: Fill,
|
||||
/// Its width and height.
|
||||
size: Point,
|
||||
/// The object, for its paths' outline ([`outline`]), which turning it moves.
|
||||
node: &'a Node,
|
||||
}
|
||||
|
||||
/// `n` as the check compares it, or `None` when it has no finite bounds.
|
||||
fn drawn_as(n: &Node) -> Option<Drawn<'_>> {
|
||||
let size = n.geometric_bounds().map(|b| Point::new(b.width(), b.height())).filter(|p| p.x.is_finite() && p.y.is_finite())?;
|
||||
Some(Drawn { centre: centre(n)?, fill: fill(n), size, node: n })
|
||||
}
|
||||
|
||||
/// How the check compares an object's turn.
|
||||
enum Outline {
|
||||
/// By its outline: every subpath of more than one anchor of its paths, in any order, each with
|
||||
/// its path's fill, so that a turn that trades the places of paths painted differently doesn't
|
||||
/// pass.
|
||||
Paths(Vec<(Fill, SubPath)>),
|
||||
/// By its size alone: it holds art whose drawing isn't its members (a blend, an envelope, a
|
||||
/// repeat), art past eight levels down, more than [`MAX_MARK_ANCHORS`] anchors or no subpath to
|
||||
/// compare.
|
||||
Size,
|
||||
}
|
||||
|
||||
/// How the check compares `n`'s turn (the members of its groups and compound paths looked through,
|
||||
/// at most eight levels down; a compound path's members take its fill).
|
||||
fn outline(n: &Node) -> Outline {
|
||||
/// What the walk found.
|
||||
#[derive(Default)]
|
||||
struct Walk {
|
||||
subpaths: Vec<(Fill, SubPath)>,
|
||||
anchors: usize,
|
||||
/// Art compared by the size alone, or too many anchors.
|
||||
size_only: bool,
|
||||
}
|
||||
fn add(n: &Node, depth: usize, painted: Option<Fill>, w: &mut Walk) {
|
||||
if w.size_only {
|
||||
return;
|
||||
}
|
||||
match &n.kind {
|
||||
NodeKind::Path { path, .. } => {
|
||||
let f = painted.unwrap_or_else(|| fill(n));
|
||||
// A subpath of one anchor has no segment to compare with.
|
||||
for s in path.subpaths.iter().filter(|s| s.anchors.len() > 1) {
|
||||
w.anchors = w.anchors.saturating_add(s.anchors.len());
|
||||
if w.anchors > MAX_MARK_ANCHORS {
|
||||
w.size_only = true;
|
||||
return;
|
||||
}
|
||||
w.subpaths.push((f, s.clone()));
|
||||
}
|
||||
}
|
||||
NodeKind::Group { children, .. } if depth < 8 => {
|
||||
for c in children {
|
||||
add(c, depth + 1, painted, w);
|
||||
}
|
||||
}
|
||||
NodeKind::Compound { children, .. } if depth < 8 => {
|
||||
let f = painted.unwrap_or_else(|| fill(n));
|
||||
for c in children {
|
||||
add(c, depth + 1, Some(f), w);
|
||||
}
|
||||
}
|
||||
_ => w.size_only = true,
|
||||
}
|
||||
}
|
||||
let mut w = Walk::default();
|
||||
add(n, 0, None, &mut w);
|
||||
if w.size_only || w.subpaths.is_empty() { Outline::Size } else { Outline::Paths(w.subpaths) }
|
||||
}
|
||||
|
||||
/// Do two outlines ([`Outline::Paths`]) draw the same lines in the same fills: each anchor of one,
|
||||
/// and the points a quarter, half and three quarters along each of its segments (which show how a
|
||||
/// curved side bends), within `tolerance` of the other's subpaths of a fill that matches its own?
|
||||
/// Where a path starts, how many anchors it has on a straight or curved stretch, and the order of
|
||||
/// the paths don't count.
|
||||
fn same_outline(a: &[(Fill, SubPath)], b: &[(Fill, SubPath)], tolerance: f64) -> bool {
|
||||
let on = |from: &[(Fill, SubPath)], to: &[(Fill, SubPath)]| {
|
||||
from.iter().all(|(f, s)| {
|
||||
// Fills the check can't compare (gradients, patterns) are compared with each other by
|
||||
// their outline alone.
|
||||
let to = PathData::new(
|
||||
to.iter().filter(|(g, _)| same_fill(*f, *g) || (*f == Fill::Other && *g == Fill::Other)).map(|(_, t)| t.clone()).collect(),
|
||||
);
|
||||
let near = |p: Point| to.nearest(p).is_some_and(|(.., d)| d <= tolerance);
|
||||
s.anchors.iter().all(|p| near(p.p))
|
||||
&& (0..s.segment_count()).all(|i| {
|
||||
let c = s.segment(i);
|
||||
[0.25, 0.5, 0.75].into_iter().all(|t| near(c.eval(t)))
|
||||
})
|
||||
})
|
||||
};
|
||||
on(a, b) && on(b, a)
|
||||
}
|
||||
|
||||
/// An object's fill, as far as the check compares it.
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
enum Fill {
|
||||
@@ -267,31 +445,76 @@ fn same_fill(a: Fill, b: Fill) -> bool {
|
||||
/// farthest, each drawn object matched to a laid one of its own within the tolerance (each laid
|
||||
/// one matches one drawn one: the nearest still free; through a grid of cells the tolerance wide,
|
||||
/// so each finds its neighbours without looking at them all), when they are as many and each
|
||||
/// matches in place and fill; else `None` (also when that matching leaves one out).
|
||||
fn how_far(laid: &[Node], drawn: &[(Point, Fill)]) -> Option<f64> {
|
||||
/// matches in place and fill, and with `turned` also in width and height and, for at most
|
||||
/// [`MAX_OUTLINE_CHECKS`] drawn objects spread from the first to the last, in the outline of its
|
||||
/// paths (each within twice the tolerance), which turning an object changes; else `None` (also when
|
||||
/// that matching leaves one out, and when it would take more than [`MAX_OUTLINE_COMPARISONS`]
|
||||
/// outline comparisons).
|
||||
fn how_far(laid: &[Node], drawn: &[Drawn], turned: bool) -> Option<f64> {
|
||||
if laid.len() != drawn.len() {
|
||||
return None;
|
||||
}
|
||||
let cell = |p: Point| ((p.x / PLACE_TOLERANCE).floor() as i64, (p.y / PLACE_TOLERANCE).floor() as i64);
|
||||
let laid: Vec<(Point, Fill)> = laid.iter().map(|l| Some((centre(l)?, fill(l)))).collect::<Option<_>>()?;
|
||||
let laid: Vec<Drawn> = laid.iter().map(drawn_as).collect::<Option<_>>()?;
|
||||
let mut grid: HashMap<(i64, i64), Vec<usize>> = HashMap::with_capacity(laid.len());
|
||||
for (i, (p, _)) in laid.iter().enumerate() {
|
||||
grid.entry(cell(*p)).or_default().push(i);
|
||||
for (i, l) in laid.iter().enumerate() {
|
||||
grid.entry(cell(l.centre)).or_default().push(i);
|
||||
}
|
||||
let close = |a: Point, b: Point| (a.x - b.x).abs() <= 2.0 * PLACE_TOLERANCE && (a.y - b.y).abs() <= 2.0 * PLACE_TOLERANCE;
|
||||
// The drawn objects whose outlines are compared: all of them, or as many as the limit allows,
|
||||
// spread evenly so that the first and the last are among them.
|
||||
let mut compare_outline = vec![drawn.len() <= MAX_OUTLINE_CHECKS; drawn.len()];
|
||||
if drawn.len() > MAX_OUTLINE_CHECKS {
|
||||
for j in 0..MAX_OUTLINE_CHECKS {
|
||||
if let Some(c) = compare_outline.get_mut(j * (drawn.len() - 1) / (MAX_OUTLINE_CHECKS - 1)) {
|
||||
*c = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
let outlines_compared = std::cell::Cell::new(0usize);
|
||||
let same_turn = |l: &Drawn, d: &Drawn, compare: bool| {
|
||||
if !turned {
|
||||
return true;
|
||||
}
|
||||
if !close(l.size, d.size) || !compare {
|
||||
return close(l.size, d.size);
|
||||
}
|
||||
// An outline that isn't compared doesn't count as the same.
|
||||
if outlines_compared.get() >= MAX_OUTLINE_COMPARISONS {
|
||||
return false;
|
||||
}
|
||||
outlines_compared.set(outlines_compared.get() + 1);
|
||||
match (outline(l.node), outline(d.node)) {
|
||||
(Outline::Paths(a), Outline::Paths(b)) => same_outline(&a, &b, 2.0 * PLACE_TOLERANCE),
|
||||
// Live art against its drawing, too many anchors, or no paths: compared by the size
|
||||
// alone.
|
||||
_ => true,
|
||||
}
|
||||
};
|
||||
let mut used = vec![false; laid.len()];
|
||||
let mut worst: f64 = 0.0;
|
||||
for &(c, f) in drawn {
|
||||
for (k, d) in drawn.iter().enumerate() {
|
||||
let (c, f) = (d.centre, d.fill);
|
||||
let compare = compare_outline.get(k).copied().unwrap_or(false);
|
||||
let (cx, cy) = cell(c);
|
||||
// Coordinates far out saturate the cells: the neighbours' keys saturate too.
|
||||
let (i, near) = (-1i64..=1)
|
||||
let candidates = (-1i64..=1)
|
||||
.flat_map(|dx| (-1i64..=1).map(move |dy| (cx.saturating_add(dx), cy.saturating_add(dy))))
|
||||
.filter_map(|k| grid.get(&k))
|
||||
.flatten()
|
||||
.filter(|&&i| !used.get(i).copied().unwrap_or(true))
|
||||
.filter_map(|&i| laid.get(i).map(|l| (i, l)))
|
||||
.filter(|(_, (p, lf))| (*p - c).hypot() <= PLACE_TOLERANCE && same_fill(*lf, f))
|
||||
.map(|(i, (p, _))| (i, (*p - c).hypot()))
|
||||
.min_by(|a, b| a.1.total_cmp(&b.1))?;
|
||||
.filter(|(_, l)| (l.centre - c).hypot() <= PLACE_TOLERANCE && same_fill(l.fill, f));
|
||||
let (i, near) = if turned && compare {
|
||||
// Outlines are tried nearest first, so that steps crowded in one place don't spend the
|
||||
// outline comparisons on candidates farther off.
|
||||
let mut nearest: Vec<(usize, f64)> =
|
||||
candidates.filter(|(_, l)| close(l.size, d.size)).map(|(i, l)| (i, (l.centre - c).hypot())).collect();
|
||||
nearest.sort_by(|a, b| a.1.total_cmp(&b.1));
|
||||
nearest.into_iter().find(|(i, _)| laid.get(*i).is_some_and(|l| same_turn(l, d, true)))?
|
||||
} else {
|
||||
candidates.filter(|(_, l)| same_turn(l, d, false)).map(|(i, l)| (i, (l.centre - c).hypot())).min_by(|a, b| a.1.total_cmp(&b.1))?
|
||||
};
|
||||
if let Some(u) = used.get_mut(i) {
|
||||
*u = true;
|
||||
}
|
||||
@@ -364,7 +587,7 @@ mod tests {
|
||||
let edit = Node::new(NodeId(1), NodeKind::Group { children: vec![], clip: false });
|
||||
let drawn = Node::new(NodeId(2), NodeKind::Group { children: vec![], clip: false });
|
||||
let mut budget = 1;
|
||||
let record = Record { ids: vec!["A".into(), "B".into()], spacing: None };
|
||||
let record = Record { ids: vec!["A".into(), "B".into()], spacing: None, orientation: None };
|
||||
assert!(live_blend(&edit, &drawn, &record, &Roles::new(), &mut budget).is_none());
|
||||
assert_eq!(budget, 1);
|
||||
}
|
||||
@@ -396,7 +619,7 @@ mod tests {
|
||||
#[test]
|
||||
fn a_blend_takes_from_the_budget_only_when_it_is_laid_out() {
|
||||
let (edit, drawn, roles) = two_keys();
|
||||
let steps = Record { ids: vec!["A".into(), "B".into()], spacing: None };
|
||||
let steps = Record { ids: vec!["A".into(), "B".into()], spacing: None, orientation: None };
|
||||
let mut budget = 10;
|
||||
assert!(matches!(live_blend(&edit, &drawn, &steps, &roles, &mut budget), Some(NodeKind::Blend { .. })));
|
||||
assert_eq!(budget, 0);
|
||||
@@ -417,7 +640,7 @@ mod tests {
|
||||
let NodeKind::Group { children, .. } = &drawn.kind else { panic!("a group") };
|
||||
let keys_alone = [children[0].clone(), children[4].clone()];
|
||||
let drawn = Node::new(NodeId(11), NodeKind::Group { children: keys_alone.to_vec(), clip: false });
|
||||
let far = Record { ids: vec!["A".into(), "B".into()], spacing: Some(BlendSpacing::Distance(150.0)) };
|
||||
let far = Record { ids: vec!["A".into(), "B".into()], spacing: Some(BlendSpacing::Distance(150.0)), orientation: None };
|
||||
let mut budget = 10;
|
||||
let Some(NodeKind::Blend { spec, .. }) = live_blend(&edit, &drawn, &far, &roles, &mut budget) else { panic!("a live blend") };
|
||||
assert_eq!(spec.spacing, BlendSpacing::Distance(150.0));
|
||||
@@ -427,6 +650,44 @@ mod tests {
|
||||
assert_eq!(budget, 6);
|
||||
}
|
||||
|
||||
/// Word 5 names the orientation: 0 Align to Page, a 32-bit float of 8 or more (8 and an angle)
|
||||
/// Align to Path; any other value names none, and a record too short to hold it names none.
|
||||
#[test]
|
||||
fn records_say_their_orientation() {
|
||||
let magic = u32::from_le_bytes(*b"DCBA");
|
||||
let words = |w5: u32| {
|
||||
[magic, 1, 50f32.to_bits(), 0, 3, w5, 'C' as u32, 0, 0, 1, 2, 'A' as u32, 0, 0, u32::MAX, u32::MAX, 0, 'B' as u32, 0, 1f32.to_bits()]
|
||||
.into_iter()
|
||||
.chain([u32::MAX, u32::MAX, 3])
|
||||
.flat_map(u32::to_le_bytes)
|
||||
.collect::<Vec<u8>>()
|
||||
};
|
||||
let orientation = |w5: u32| record(&words(w5)).map(|r| r.orientation);
|
||||
assert_eq!(orientation(0), Some(Some(BlendOrientation::AlignToPage)));
|
||||
assert_eq!(orientation(8f32.to_bits()), Some(Some(BlendOrientation::AlignToPath)));
|
||||
assert_eq!(orientation(11.141593f32.to_bits()), Some(Some(BlendOrientation::AlignToPath)));
|
||||
for other in [1f32.to_bits(), 7.9f32.to_bits(), (-9f32).to_bits(), f32::NAN.to_bits(), f32::INFINITY.to_bits()] {
|
||||
assert_eq!(orientation(other), Some(None), "{other:#x}");
|
||||
}
|
||||
}
|
||||
|
||||
/// On a level straight spine both orientations lay two squares' steps out alike: the blend takes
|
||||
/// the record's orientation, and Align to Page when the record names none.
|
||||
#[test]
|
||||
fn the_records_orientation_is_kept_where_both_lay_out_alike() {
|
||||
let (edit, drawn, roles) = two_keys();
|
||||
for (named, want) in [
|
||||
(Some(BlendOrientation::AlignToPath), BlendOrientation::AlignToPath),
|
||||
(Some(BlendOrientation::AlignToPage), BlendOrientation::AlignToPage),
|
||||
(None, BlendOrientation::AlignToPage),
|
||||
] {
|
||||
let record = Record { ids: vec!["A".into(), "B".into()], spacing: None, orientation: named };
|
||||
let mut budget = 10;
|
||||
let Some(NodeKind::Blend { spec, .. }) = live_blend(&edit, &drawn, &record, &roles, &mut budget) else { panic!("a live blend") };
|
||||
assert_eq!(spec.orientation, want, "{named:?}");
|
||||
}
|
||||
}
|
||||
|
||||
/// Two drawn steps on one laid object don't both match it: each laid object matches one drawn
|
||||
/// one, so a drawing the blend doesn't lay out isn't taken for it.
|
||||
#[test]
|
||||
@@ -435,12 +696,261 @@ mod tests {
|
||||
let path = vectorcraft_geom::shapes::rectangle(vectorcraft_geom::Rect::new(x, 0.0, x + 10.0, 10.0));
|
||||
Node::path(NodeId(0), path, Default::default())
|
||||
};
|
||||
// `laid` against the objects `drawn` as the check compares them.
|
||||
let check = |laid: &[Node], drawn: &[Node], turned: bool| {
|
||||
let drawn: Vec<Drawn> = drawn.iter().map(|d| drawn_as(d).expect("bounds")).collect();
|
||||
how_far(laid, &drawn, turned)
|
||||
};
|
||||
let laid = [square(0.0), square(50.0)];
|
||||
let c = |x: f64| (Point::new(x + 5.0, 5.0), Fill::None);
|
||||
assert!(how_far(&laid, &[c(0.0), c(50.0)]).is_some());
|
||||
assert!(how_far(&laid, &[c(0.0), c(0.1)]).is_none(), "both drawn steps near the first laid one");
|
||||
assert!(check(&laid, &[square(0.0), square(50.0)], true).is_some());
|
||||
assert!(check(&laid, &[square(0.0), square(0.1)], false).is_none(), "both drawn steps near the first laid one");
|
||||
// Sizes and outlines count only when asked for: a wider rectangle with the same center, and
|
||||
// a triangle turned a half turn.
|
||||
let wide = |x: f64| {
|
||||
let path = vectorcraft_geom::shapes::rectangle(vectorcraft_geom::Rect::new(x - 5.0, 2.5, x + 15.0, 7.5));
|
||||
Node::path(NodeId(0), path, Default::default())
|
||||
};
|
||||
assert!(check(&laid, &[wide(0.0), wide(50.0)], false).is_some());
|
||||
assert!(check(&laid, &[wide(0.0), wide(50.0)], true).is_none());
|
||||
// Steps on one center match by their size, in whichever order they are drawn.
|
||||
let big = |x: f64| {
|
||||
let path = vectorcraft_geom::shapes::rectangle(vectorcraft_geom::Rect::new(x - 5.0, -5.0, x + 15.0, 15.0));
|
||||
Node::path(NodeId(0), path, Default::default())
|
||||
};
|
||||
assert!(check(&[square(0.0), big(0.0)], &[big(0.0), square(0.0)], true).is_some());
|
||||
// A group's members in close reds match in whichever order they are drawn.
|
||||
let reds = |x: f64, order: [usize; 3]| {
|
||||
let member = |k: usize| {
|
||||
let left = x + k as f64 * 10.0;
|
||||
let path = vectorcraft_geom::shapes::rectangle(vectorcraft_geom::Rect::new(left, 0.0, left + 8.0, 8.0));
|
||||
let red = [0.25, 0.265, 0.28].get(k).copied().unwrap_or(0.0);
|
||||
Arc::new(Node::path(NodeId(0), path, vectorcraft_doc::Appearance::basic(Paint::solid(Color::rgb(red, 0.0, 0.0)), Paint::None, 0.0)))
|
||||
};
|
||||
Node::group(NodeId(0), order.iter().map(|k| member(*k)).collect())
|
||||
};
|
||||
assert!(check(&[reds(0.0, [0, 1, 2]), reds(50.0, [0, 1, 2])], &[reds(0.0, [1, 0, 2]), reds(50.0, [1, 0, 2])], true).is_some());
|
||||
// A triangle turned a half turn has its anchors elsewhere.
|
||||
let polygon = |points: &[Point]| Node::path(NodeId(0), PathData::single(SubPath::polyline(points, true)), Default::default());
|
||||
let triangle = |x: f64, turn: f64| {
|
||||
let mut n = polygon(&[Point::new(x, 0.0), Point::new(x, 10.0), Point::new(x + 10.0, 5.0)]);
|
||||
n.transform(vectorcraft_geom::Affine::rotate_about(turn, Point::new(x + 5.0, 5.0)), false);
|
||||
n
|
||||
};
|
||||
let laid = [triangle(0.0, 0.0), triangle(50.0, 0.0)];
|
||||
let turned = |x: f64| triangle(x, std::f64::consts::PI);
|
||||
assert!(check(&laid, &[turned(0.0), turned(50.0)], false).is_some());
|
||||
assert!(check(&laid, &[turned(0.0), turned(50.0)], true).is_none());
|
||||
// So has one in a group, filled with a gradient, which the check compares by its outline.
|
||||
let graded = |x: f64, turn: f64| {
|
||||
let mut t = triangle(x, turn);
|
||||
let gradient = vectorcraft_color::gradient::GradientPaint::new(vectorcraft_color::gradient::Gradient::default());
|
||||
t.appearance.set_fill(Paint::Gradient(Box::new(gradient)));
|
||||
Node::group(NodeId(0), vec![Arc::new(t)])
|
||||
};
|
||||
let in_groups = [graded(0.0, 0.0), graded(50.0, 0.0)];
|
||||
assert!(check(&in_groups, &[graded(0.0, 0.0), graded(50.0, 0.0)], true).is_some());
|
||||
assert!(check(&in_groups, &[graded(0.0, std::f64::consts::PI), graded(50.0, std::f64::consts::PI)], true).is_none());
|
||||
// The same triangle drawn from another of its anchors matches.
|
||||
let shifted = |x: f64| polygon(&[Point::new(x + 10.0, 5.0), Point::new(x, 0.0), Point::new(x, 10.0)]);
|
||||
assert!(check(&laid, &[shifted(0.0), shifted(50.0)], true).is_some());
|
||||
// So does the same triangle drawn with another anchor on one of its sides.
|
||||
let split = |x: f64| polygon(&[Point::new(x, 0.0), Point::new(x, 5.0), Point::new(x, 10.0), Point::new(x + 10.0, 5.0)]);
|
||||
assert!(check(&laid, &[split(0.0), split(50.0)], true).is_some());
|
||||
// A square with its top side bent inward has the same corners as its half turn, whose bent
|
||||
// side is at the bottom: the points along its sides tell them apart.
|
||||
let bent = |x: f64, turn: f64| {
|
||||
let (tl, tr) = (Point::new(x, 0.0), Point::new(x + 10.0, 0.0));
|
||||
let anchors = vec![
|
||||
vectorcraft_geom::Anchor::with_handles(tl, tl, Point::new(x + 3.0, 4.0)),
|
||||
vectorcraft_geom::Anchor::with_handles(tr, Point::new(x + 7.0, 4.0), tr),
|
||||
vectorcraft_geom::Anchor::corner(Point::new(x + 10.0, 10.0)),
|
||||
vectorcraft_geom::Anchor::corner(Point::new(x, 10.0)),
|
||||
];
|
||||
let mut n = Node::path(NodeId(0), PathData::single(SubPath::new(anchors, true)), Default::default());
|
||||
n.transform(vectorcraft_geom::Affine::rotate_about(turn, Point::new(x + 5.0, 5.0)), false);
|
||||
n
|
||||
};
|
||||
let upright = [bent(0.0, 0.0), bent(50.0, 0.0)];
|
||||
assert!(check(&upright, &[bent(0.0, 0.0), bent(50.0, 0.0)], true).is_some());
|
||||
let half = std::f64::consts::PI;
|
||||
assert!(check(&upright, &[bent(0.0, half), bent(50.0, half)], false).is_some());
|
||||
assert!(check(&upright, &[bent(0.0, half), bent(50.0, half)], true).is_none(), "the bent side at the bottom");
|
||||
// Past the limit of outlines compared, the last object is still among them.
|
||||
let row = |last: Node| {
|
||||
let mut row: Vec<Node> = (0..MAX_OUTLINE_CHECKS).map(|i| square(20.0 * i as f64)).collect();
|
||||
row.push(last);
|
||||
row
|
||||
};
|
||||
let end = 20.0 * MAX_OUTLINE_CHECKS as f64;
|
||||
assert!(check(&row(bent(end, 0.0)), &row(bent(end, 0.0)), true).is_some());
|
||||
assert!(check(&row(bent(end, 0.0)), &row(bent(end, half)), true).is_none(), "the last one turned");
|
||||
// A hundred steps crowded within the tolerance of each other match their drawn copies:
|
||||
// each drawn one is compared with the nearest laid one first.
|
||||
let crowd = |turn: f64| (0..100u32).map(|i| triangle(0.4 * f64::from(i) / 99.0, turn)).collect::<Vec<_>>();
|
||||
assert!(check(&crowd(0.0), &crowd(0.0), true).is_some());
|
||||
assert!(check(&crowd(0.0), &crowd(half), true).is_none(), "the crowd turned");
|
||||
// A compound path matches with its contours in another order, and not turned a half turn.
|
||||
let pair = |x: f64, flip: bool, turn: f64| {
|
||||
let a = SubPath::polyline(&[Point::new(x, 0.0), Point::new(x, 4.0), Point::new(x + 10.0, 2.0)], true);
|
||||
let b = SubPath::polyline(&[Point::new(x, 6.0), Point::new(x, 10.0), Point::new(x + 4.0, 8.0)], true);
|
||||
let subpaths = if flip { vec![b, a] } else { vec![a, b] };
|
||||
let mut n = Node::path(NodeId(0), PathData::new(subpaths), Default::default());
|
||||
n.transform(vectorcraft_geom::Affine::rotate_about(turn, Point::new(x + 5.0, 5.0)), false);
|
||||
n
|
||||
};
|
||||
let laid = [pair(0.0, false, 0.0), pair(50.0, false, 0.0)];
|
||||
assert!(check(&laid, &[pair(0.0, true, 0.0), pair(50.0, true, 0.0)], true).is_some());
|
||||
assert!(check(&laid, &[pair(0.0, true, std::f64::consts::PI), pair(50.0, true, std::f64::consts::PI)], true).is_none());
|
||||
// A lone anchor in a path draws nothing: the same path with one matches itself.
|
||||
let dotted = |x: f64| {
|
||||
let triangle = SubPath::polyline(&[Point::new(x, 0.0), Point::new(x, 10.0), Point::new(x + 10.0, 5.0)], true);
|
||||
let dot = SubPath::polyline(&[Point::new(x + 3.0, 5.0)], false);
|
||||
Node::path(NodeId(0), PathData::new(vec![triangle, dot]), Default::default())
|
||||
};
|
||||
assert!(check(&[dotted(0.0), dotted(50.0)], &[dotted(0.0), dotted(50.0)], true).is_some());
|
||||
// A live blend draws more than its keys: one is compared with its drawn copy by size alone.
|
||||
let blend = |x: f64| {
|
||||
let keys = vec![Arc::new(triangle(x, 0.0)), Arc::new(triangle(x, 0.0))];
|
||||
Node::new(NodeId(0), NodeKind::Blend { children: keys, spec: Box::default() })
|
||||
};
|
||||
let expanded = |x: f64| {
|
||||
let inside = SubPath::polyline(&[Point::new(x + 3.0, 4.0), Point::new(x + 3.0, 6.0)], false);
|
||||
let inside = Node::path(NodeId(0), PathData::single(inside), Default::default());
|
||||
Node::group(NodeId(0), vec![Arc::new(triangle(x, 0.0)), Arc::new(inside)])
|
||||
};
|
||||
assert!(check(&[blend(0.0), blend(50.0)], &[expanded(0.0), expanded(50.0)], true).is_some());
|
||||
// Coordinates far out don't overflow the grid.
|
||||
let far = [square(1e300), square(-1e300)];
|
||||
let _ = how_far(&far, &[c(1e300), c(-1e300)]);
|
||||
let _ = check(&far, &[square(1e300), square(-1e300)], false);
|
||||
}
|
||||
|
||||
/// Triangles pointing right on a spine running right to left, with their steps drawn pointing
|
||||
/// right: Align to Path would turn each one (keys included) a half turn, which leaves their
|
||||
/// centers and sizes as they are but not their points. A record naming Align to Path doesn't
|
||||
/// make the blend Align to Path.
|
||||
#[test]
|
||||
fn the_records_orientation_must_lay_the_steps_out_turned_as_drawn() {
|
||||
let triangle = |id: u64, x: f64| {
|
||||
let points = [Point::new(x, 0.0), Point::new(x, 10.0), Point::new(x + 20.0, 5.0)];
|
||||
Arc::new(Node::path(NodeId(id), PathData::single(SubPath::polyline(&points, true)), Default::default()))
|
||||
};
|
||||
let spine = vectorcraft_geom::shapes::line(Point::new(110.0, 5.0), Point::new(10.0, 5.0));
|
||||
let spine = Arc::new(Node::path(NodeId(3), spine, Default::default()));
|
||||
let edit = Node::new(NodeId(10), NodeKind::Group { children: vec![triangle(1, 100.0), triangle(2, 0.0), spine], clip: false });
|
||||
let steps = (0..5u32).map(|i| triangle(20 + u64::from(i), 100.0 - f64::from(i) * 25.0)).collect();
|
||||
let drawn = Node::new(NodeId(11), NodeKind::Group { children: steps, clip: false });
|
||||
let roles = Roles::from([
|
||||
(NodeId(1), ("K".to_string(), Some("A".to_string()))),
|
||||
(NodeId(2), ("K".to_string(), Some("B".to_string()))),
|
||||
(NodeId(3), ("S".to_string(), None)),
|
||||
]);
|
||||
for named in [BlendOrientation::AlignToPath, BlendOrientation::AlignToPage] {
|
||||
let record = Record { ids: vec!["A".into(), "B".into()], spacing: None, orientation: Some(named) };
|
||||
let mut budget = 10;
|
||||
let Some(NodeKind::Blend { spec, .. }) = live_blend(&edit, &drawn, &record, &roles, &mut budget) else { panic!("a live blend") };
|
||||
assert_eq!(spec.orientation, BlendOrientation::AlignToPage, "{named:?}");
|
||||
}
|
||||
}
|
||||
|
||||
/// Triangles pointing right on a spine 1 pt long running right to left, with 998 steps drawn
|
||||
/// unturned, so that every step sits within the tolerance of each one. Align to Path would turn
|
||||
/// each one to point left. A record naming Align to Path doesn't make the blend Align to Path,
|
||||
/// however many steps one step's place matches; a record naming Align to Page keeps it.
|
||||
#[test]
|
||||
fn the_records_orientation_is_checked_on_crowded_steps() {
|
||||
let triangle = |id: u64, x: f64| {
|
||||
let points = [Point::new(x, 0.0), Point::new(x, 10.0), Point::new(x + 20.0, 5.0)];
|
||||
Arc::new(Node::path(NodeId(id), PathData::single(SubPath::polyline(&points, true)), Default::default()))
|
||||
};
|
||||
let spine = vectorcraft_geom::shapes::line(Point::new(11.0, 5.0), Point::new(10.0, 5.0));
|
||||
let spine = Arc::new(Node::path(NodeId(3), spine, Default::default()));
|
||||
let edit = Node::new(NodeId(10), NodeKind::Group { children: vec![triangle(1, 1.0), triangle(2, 0.0), spine], clip: false });
|
||||
let steps = (0..1000u32).map(|i| triangle(20 + u64::from(i), 1.0 - f64::from(i) / 999.0)).collect();
|
||||
let drawn = Node::new(NodeId(11), NodeKind::Group { children: steps, clip: false });
|
||||
let roles = Roles::from([
|
||||
(NodeId(1), ("K".to_string(), Some("A".to_string()))),
|
||||
(NodeId(2), ("K".to_string(), Some("B".to_string()))),
|
||||
(NodeId(3), ("S".to_string(), None)),
|
||||
]);
|
||||
for named in [BlendOrientation::AlignToPath, BlendOrientation::AlignToPage] {
|
||||
let record = Record { ids: vec!["A".into(), "B".into()], spacing: None, orientation: Some(named) };
|
||||
let mut budget = MAX_BLEND_OBJECTS;
|
||||
let Some(NodeKind::Blend { spec, .. }) = live_blend(&edit, &drawn, &record, &roles, &mut budget) else { panic!("a live blend") };
|
||||
assert_eq!(spec.orientation, BlendOrientation::AlignToPage, "{named:?}");
|
||||
}
|
||||
}
|
||||
|
||||
/// Groups of a red square on the left and a blue one on the right, on a spine running right to
|
||||
/// left, with their steps drawn unturned: Align to Path would give each a half turn, which keeps
|
||||
/// the group's outline but trades the squares' places. A record naming Align to Path doesn't make
|
||||
/// the blend Align to Path.
|
||||
#[test]
|
||||
fn the_records_orientation_must_keep_each_member_where_it_is_drawn() {
|
||||
let square = |id: u64, x: f64, color: Color| {
|
||||
let path = vectorcraft_geom::shapes::rectangle(vectorcraft_geom::Rect::new(x, 0.0, x + 10.0, 10.0));
|
||||
Arc::new(Node::path(NodeId(id), path, vectorcraft_doc::Appearance::basic(Paint::solid(color), Paint::None, 0.0)))
|
||||
};
|
||||
let pair = |id: u64, x: f64| {
|
||||
let children = vec![square(id * 10, x, Color::rgb(1.0, 0.0, 0.0)), square(id * 10 + 1, x + 10.0, Color::rgb(0.0, 0.0, 1.0))];
|
||||
Arc::new(Node::new(NodeId(id), NodeKind::Group { children, clip: false }))
|
||||
};
|
||||
let spine = vectorcraft_geom::shapes::line(Point::new(110.0, 5.0), Point::new(10.0, 5.0));
|
||||
let spine = Arc::new(Node::path(NodeId(3), spine, Default::default()));
|
||||
let edit = Node::new(NodeId(4), NodeKind::Group { children: vec![pair(1, 100.0), pair(2, 0.0), spine], clip: false });
|
||||
let steps = (0..5u32).map(|i| pair(30 + u64::from(i), 100.0 - f64::from(i) * 25.0)).collect();
|
||||
let drawn = Node::new(NodeId(5), NodeKind::Group { children: steps, clip: false });
|
||||
let roles = Roles::from([
|
||||
(NodeId(1), ("K".to_string(), Some("A".to_string()))),
|
||||
(NodeId(2), ("K".to_string(), Some("B".to_string()))),
|
||||
(NodeId(3), ("S".to_string(), None)),
|
||||
]);
|
||||
for named in [BlendOrientation::AlignToPath, BlendOrientation::AlignToPage] {
|
||||
let record = Record { ids: vec!["A".into(), "B".into()], spacing: None, orientation: Some(named) };
|
||||
let mut budget = 100;
|
||||
let Some(NodeKind::Blend { spec, .. }) = live_blend(&edit, &drawn, &record, &roles, &mut budget) else { panic!("a live blend") };
|
||||
assert_eq!(spec.orientation, BlendOrientation::AlignToPage, "{named:?}");
|
||||
}
|
||||
// Drawn turned, blue on the left: the blend is Align to Path, whichever orientation the
|
||||
// record names.
|
||||
let turned = |id: u64, x: f64| {
|
||||
let children = vec![square(id * 10, x, Color::rgb(0.0, 0.0, 1.0)), square(id * 10 + 1, x + 10.0, Color::rgb(1.0, 0.0, 0.0))];
|
||||
Arc::new(Node::new(NodeId(id), NodeKind::Group { children, clip: false }))
|
||||
};
|
||||
let steps = (0..5u32).map(|i| turned(30 + u64::from(i), 100.0 - f64::from(i) * 25.0)).collect();
|
||||
let drawn = Node::new(NodeId(5), NodeKind::Group { children: steps, clip: false });
|
||||
for named in [BlendOrientation::AlignToPath, BlendOrientation::AlignToPage] {
|
||||
let record = Record { ids: vec!["A".into(), "B".into()], spacing: None, orientation: Some(named) };
|
||||
let mut budget = 100;
|
||||
let Some(NodeKind::Blend { spec, .. }) = live_blend(&edit, &drawn, &record, &roles, &mut budget) else { panic!("a live blend") };
|
||||
assert_eq!(spec.orientation, BlendOrientation::AlignToPath, "{named:?}");
|
||||
}
|
||||
}
|
||||
|
||||
/// Rectangles 20 pt wide and 10 pt high on a vertical spine, with their steps drawn upright: Align
|
||||
/// to Path would turn each one (keys included) a quarter turn, which leaves the centers in place
|
||||
/// but not the sizes. A record naming Align to Path doesn't make the blend Align to Path; a
|
||||
/// record naming Align to Page does.
|
||||
#[test]
|
||||
fn the_records_orientation_must_lay_the_steps_out_at_their_drawn_sizes() {
|
||||
let rect = |id: u64, y: f64| {
|
||||
let path = vectorcraft_geom::shapes::rectangle(vectorcraft_geom::Rect::new(0.0, y, 20.0, y + 10.0));
|
||||
Arc::new(Node::path(NodeId(id), path, Default::default()))
|
||||
};
|
||||
let spine = vectorcraft_geom::shapes::line(Point::new(10.0, 5.0), Point::new(10.0, 105.0));
|
||||
let spine = Arc::new(Node::path(NodeId(3), spine, Default::default()));
|
||||
let edit = Node::new(NodeId(10), NodeKind::Group { children: vec![rect(1, 0.0), rect(2, 100.0), spine], clip: false });
|
||||
let steps = (0..5u32).map(|i| rect(20 + u64::from(i), f64::from(i) * 25.0)).collect();
|
||||
let drawn = Node::new(NodeId(11), NodeKind::Group { children: steps, clip: false });
|
||||
let roles = Roles::from([
|
||||
(NodeId(1), ("K".to_string(), Some("A".to_string()))),
|
||||
(NodeId(2), ("K".to_string(), Some("B".to_string()))),
|
||||
(NodeId(3), ("S".to_string(), None)),
|
||||
]);
|
||||
for named in [BlendOrientation::AlignToPath, BlendOrientation::AlignToPage] {
|
||||
let record = Record { ids: vec!["A".into(), "B".into()], spacing: None, orientation: Some(named) };
|
||||
let mut budget = 10;
|
||||
let Some(NodeKind::Blend { spec, .. }) = live_blend(&edit, &drawn, &record, &roles, &mut budget) else { panic!("a live blend") };
|
||||
assert_eq!(spec.orientation, BlendOrientation::AlignToPage, "{named:?}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,9 +21,17 @@ const MAX_OBJECTS: usize = 100_000;
|
||||
const MAX_OBJECT: usize = 256 << 10;
|
||||
const OBJECT: &[u8] = b"/AI11Text :";
|
||||
|
||||
#[cfg(test)]
|
||||
thread_local! {
|
||||
/// How many times [`text_frames`] has scanned an editing copy on this thread.
|
||||
pub(crate) static TEXT_FRAME_SCANS: std::cell::Cell<u64> = const { std::cell::Cell::new(0) };
|
||||
}
|
||||
|
||||
/// The `/Art` path of each text object of `data` (an editing copy's document text), in art space
|
||||
/// (y up), by its story and frame. Objects without a readable path are left out.
|
||||
pub(crate) fn text_frames(data: &[u8]) -> HashMap<(u32, usize), BezPath> {
|
||||
#[cfg(test)]
|
||||
TEXT_FRAME_SCANS.set(TEXT_FRAME_SCANS.get() + 1);
|
||||
let mut out = HashMap::new();
|
||||
let mut at = 0;
|
||||
while let Some(i) = data.get(at..).and_then(|d| find(d, OBJECT)) {
|
||||
|
||||
@@ -156,9 +156,10 @@ use graph::Graph;
|
||||
pub(crate) use ops::{read_art_style, read_style_list, style_moves_with};
|
||||
#[cfg(test)]
|
||||
pub(crate) use raster::with_image_limits;
|
||||
pub(crate) use types::BLEND_BUDGET;
|
||||
pub(crate) use types::MAX_NODES;
|
||||
pub use types::PlacedPage;
|
||||
use types::{BLEND_BUDGET, BrushArtColors, FLIP, Frame, GState, Kind, PatternHead, PendingEnvelope, Place, PlacedTail, Raster, SymbolHead};
|
||||
use types::{BrushArtColors, FLIP, Frame, GState, Kind, PatternHead, PendingEnvelope, Place, PlacedTail, Raster, SymbolHead};
|
||||
#[cfg(test)]
|
||||
pub use types::{GRAPH_PLAIN, GRAPH_UNENDED, LINKED_PLACEHOLDERS, NON_NATIVE_ART, NON_NATIVE_ART_UNREAD, VERSIONED_UNENDED};
|
||||
pub(super) use types::{blend_mode, blend_name};
|
||||
|
||||
@@ -16,7 +16,7 @@ pub(crate) const MAX_NODES: usize = 4_000_000;
|
||||
|
||||
/// The most objects all the blends of one import may lay out to be checked (each twice) and made
|
||||
/// live; past it, blends keep their drawn steps.
|
||||
pub(super) const BLEND_BUDGET: usize = 50_000;
|
||||
pub(crate) const BLEND_BUDGET: usize = 50_000;
|
||||
|
||||
/// Most points in one path.
|
||||
pub(super) const MAX_POINTS: usize = 4_000_000;
|
||||
|
||||
@@ -9354,8 +9354,10 @@ fn a_blend_comes_in_as_a_live_blend() {
|
||||
}
|
||||
|
||||
/// A blend whose spine was never edited has no spine written, only its keys: its spine is the
|
||||
/// straight line between the keys' centres, in the record's order (here the left key, named `B`,
|
||||
/// first), and the blend comes in live.
|
||||
/// straight line between the keys' centers, in the record's order, and the blend comes in live.
|
||||
/// With the record naming the keys in their order (here the left key, named `B`, first) the blend
|
||||
/// has no spine of its own, which runs the same way; in the other order its spine is that line,
|
||||
/// from the right key to the left one.
|
||||
#[test]
|
||||
fn a_blend_with_no_spine_written_runs_straight_between_its_keys() {
|
||||
let spine_part = format!("%_N\n{}", blend_part("S", None));
|
||||
@@ -9365,12 +9367,20 @@ fn a_blend_with_no_spine_written_runs_straight_between_its_keys() {
|
||||
let NodeKind::Blend { children, spec } = &blend.kind else { panic!("a live blend: {:?} {warnings:?}", blend.kind) };
|
||||
assert!(!warnings.iter().any(|w| w == super::blend::DRAWN), "{warnings:?}");
|
||||
assert_eq!(spec.spacing, vectorcraft_doc::live::BlendSpacing::Steps(3));
|
||||
let spine = spec.spine.as_ref().and_then(|p| p.subpaths.first()).expect("a spine");
|
||||
let points: Vec<(f64, f64)> = spine.anchors.iter().map(|a| (a.p.x, a.p.y)).collect();
|
||||
assert_eq!((&spec.spine, &spec.key_anchors), (&None, &vec![]), "a blend with no spine of its own");
|
||||
let (spine, _) = vectorcraft_doc::blend::blend_spine(children, spec).expect("a spine");
|
||||
let points: Vec<(f64, f64)> = spine.subpaths[0].anchors.iter().map(|a| (a.p.x, a.p.y)).collect();
|
||||
assert_eq!(points.len(), 2, "{points:?}");
|
||||
assert!((points[0].0 - 10.0).abs() < 0.01 && (points[1].0 - 110.0).abs() < 0.01, "from the left key to the right one: {points:?}");
|
||||
assert_eq!(spec.key_anchors, vec![0, 1]);
|
||||
assert_eq!(vectorcraft_doc::blend::blend_expand(children, spec).len(), 5);
|
||||
|
||||
let body = blend_file("", [Some("B"), Some("A")], &blend_record(&['A', 'B']));
|
||||
let (blend, warnings) = read_blend(&body.replace(&spine_part, ""));
|
||||
let NodeKind::Blend { spec, .. } = &blend.kind else { panic!("a live blend: {:?} {warnings:?}", blend.kind) };
|
||||
let spine = spec.spine.as_ref().and_then(|p| p.subpaths.first()).expect("a spine");
|
||||
let points: Vec<(f64, f64)> = spine.anchors.iter().map(|a| (a.p.x, a.p.y)).collect();
|
||||
assert!((points[0].0 - 110.0).abs() < 0.01 && (points[1].0 - 10.0).abs() < 0.01, "from the right key to the left one: {points:?}");
|
||||
assert_eq!(spec.key_anchors, vec![1, 0]);
|
||||
}
|
||||
|
||||
/// The tags after a blend's drawn steps are the live blend's.
|
||||
|
||||
@@ -576,6 +576,12 @@ impl DocFont {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
thread_local! {
|
||||
/// How many times [`Texts::read`] has read a text document on this thread.
|
||||
pub(super) static TEXTS_READS: std::cell::Cell<u64> = const { std::cell::Cell::new(0) };
|
||||
}
|
||||
|
||||
/// The text document of an editing copy.
|
||||
pub(super) struct Texts {
|
||||
stories: Vec<Val>,
|
||||
@@ -615,6 +621,8 @@ impl Texts {
|
||||
fn find(h: &[u8], n: &[u8], from: usize) -> Option<usize> {
|
||||
h.get(from..)?.windows(n.len()).position(|w| w == n).map(|p| p + from)
|
||||
}
|
||||
#[cfg(test)]
|
||||
TEXTS_READS.set(TEXTS_READS.get() + 1);
|
||||
let start = find(data, b"%AI11_BeginTextDocument", 0)?;
|
||||
let from = find(data, b"/ASCII85Decode", start)? + b"/ASCII85Decode".len();
|
||||
let end = find(data, b"~>", from)? + 2;
|
||||
|
||||
@@ -47,6 +47,8 @@ mod layers;
|
||||
mod plan;
|
||||
mod slots;
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) use build::READ_AFRESH;
|
||||
#[cfg(test)]
|
||||
use build::{Frame, MADE, prune_unseen};
|
||||
pub(crate) use build::{MAX_WRAP_WORK, scale_document, scale_symbols};
|
||||
|
||||
@@ -116,13 +116,20 @@ pub(super) type Built = Result<(Document, Vec<String>), String>;
|
||||
/// look draws), no object is unread or has another placement or drawn art that the page would
|
||||
/// choose, no linked image shows a placeholder, and its artboards are the pages, one for one and of their size, in points or in the pages'
|
||||
/// units ([`page_scale_alone`]). The document is drawn at that scale. Else `Err(structure)`, for
|
||||
/// [`build_from`] with the page.
|
||||
pub(super) fn build_without_page(structure: Structure, data: &[u8], pages: &[(f64, f64)], unit: f64) -> Result<Built, Box<Structure>> {
|
||||
let Some(scale) = alone_scale(&structure, data, pages, unit) else {
|
||||
/// [`build_from`] with the page. `text` keeps what was read of the text of `data` for the check and
|
||||
/// the build, and for any later build of `data`.
|
||||
pub(super) fn build_without_page(
|
||||
structure: Structure,
|
||||
data: &[u8],
|
||||
pages: &[(f64, f64)],
|
||||
unit: f64,
|
||||
text: &mut ReadText,
|
||||
) -> Result<Built, Box<Structure>> {
|
||||
let Some(scale) = alone_scale(&structure, data, pages, unit, text) else {
|
||||
return Err(Box::new(structure));
|
||||
};
|
||||
let (styles, own_size) = (structure.styles_read, structure.symbols_own_size);
|
||||
let built = build_from(structure, data, None, Page::Artboard, false, false, 1.0).map(|(mut doc, notes)| {
|
||||
let built = build_weighing(structure, data, None, Page::Artboard, false, false, 1.0, &mut None, text).map(|(mut doc, notes)| {
|
||||
if scale != 1.0 {
|
||||
// The graphic styles read from the file are drawn in its units too.
|
||||
scale_read_document(&mut doc, scale, styles, own_size);
|
||||
@@ -133,9 +140,56 @@ pub(super) fn build_without_page(structure: Structure, data: &[u8], pages: &[(f6
|
||||
}
|
||||
|
||||
/// The scale [`build_without_page`] draws `structure` (the editing copy `data` read) at on `pages`
|
||||
/// in units of `unit` points, when it builds it without the page.
|
||||
pub(super) fn alone_scale(structure: &Structure, data: &[u8], pages: &[(f64, f64)], unit: f64) -> Option<f64> {
|
||||
page_scale_alone(structure, pages, unit).filter(|_| nothing_waits_on_page(structure) && type_all_made(structure, data))
|
||||
/// in units of `unit` points, when it builds it without the page. `text` keeps what was read of the
|
||||
/// text of `data`.
|
||||
pub(super) fn alone_scale(structure: &Structure, data: &[u8], pages: &[(f64, f64)], unit: f64, text: &mut ReadText) -> Option<f64> {
|
||||
page_scale_alone(structure, pages, unit).filter(|_| nothing_waits_on_page(structure) && type_all_made(structure, data, text))
|
||||
}
|
||||
|
||||
/// The text objects' frames and the text document of an editing copy, each read the first time it
|
||||
/// is asked for and kept for every later check and build of the same copy.
|
||||
#[derive(Default)]
|
||||
pub(super) struct ReadText {
|
||||
/// [`ai::text_frames`] of the copy, once scanned.
|
||||
frames: Option<std::collections::HashMap<(u32, usize), kurbo::BezPath>>,
|
||||
/// [`Texts::read`] of the copy, once read: `Some(None)` when it has no text document that can
|
||||
/// be read.
|
||||
texts: Option<Option<Texts>>,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
thread_local! {
|
||||
/// While set, [`ReadText`] keeps nothing on this thread: each check and build reads the text afresh.
|
||||
pub(crate) static READ_AFRESH: std::cell::Cell<bool> = const { std::cell::Cell::new(false) };
|
||||
}
|
||||
|
||||
impl ReadText {
|
||||
/// Forgets what was read while [`READ_AFRESH`] is set (only in tests).
|
||||
fn forget_in_tests(&mut self) {
|
||||
#[cfg(test)]
|
||||
if READ_AFRESH.get() {
|
||||
*self = Self::default();
|
||||
}
|
||||
}
|
||||
|
||||
/// The `/Art` path of each text object of `data` ([`ai::text_frames`]).
|
||||
fn frames(&mut self, data: &[u8]) -> &std::collections::HashMap<(u32, usize), kurbo::BezPath> {
|
||||
self.forget_in_tests();
|
||||
self.frames.get_or_insert_with(|| ai::text_frames(data))
|
||||
}
|
||||
|
||||
/// The text document of `data` ([`Texts::read`]), if it has one that can be read.
|
||||
fn texts(&mut self, data: &[u8]) -> Option<&Texts> {
|
||||
self.forget_in_tests();
|
||||
self.texts.get_or_insert_with(|| Texts::read(data)).as_ref()
|
||||
}
|
||||
|
||||
/// [`Self::texts`] with its characters painted by `patterns` ([`Texts::with_patterns`]).
|
||||
fn texts_with(&mut self, data: &[u8], patterns: std::collections::HashMap<String, vectorcraft_color::Paint>) -> Option<&Texts> {
|
||||
self.forget_in_tests();
|
||||
let texts = self.texts.take().unwrap_or_else(|| Texts::read(data)).map(|t| t.with_patterns(patterns));
|
||||
self.texts.insert(texts).as_ref()
|
||||
}
|
||||
}
|
||||
|
||||
/// Is nothing in `structure` waiting on the page: no object unread (the page's art takes its
|
||||
@@ -152,17 +206,18 @@ fn nothing_waits_on_page(structure: &Structure) -> bool {
|
||||
|
||||
/// Does the text document of `data` (read as `structure`) make the type of every text object, those
|
||||
/// that don't show included, with at least one that shows, and none of them type that a look draws?
|
||||
fn type_all_made(structure: &Structure, data: &[u8]) -> bool {
|
||||
/// The frames and the text document are read into `text` when it doesn't have them yet.
|
||||
fn type_all_made(structure: &Structure, data: &[u8], text: &mut ReadText) -> bool {
|
||||
let mut infos = vec![];
|
||||
collect_slots(&structure.doc.layers, true, &mut infos);
|
||||
if !infos.iter().any(|i| i.shown) || infos.iter().any(|i| i.look.is_some()) {
|
||||
return false;
|
||||
}
|
||||
let frames = ai::text_frames(data);
|
||||
let frames = text.frames(data);
|
||||
for info in &mut infos {
|
||||
info.art_path = info.story.and_then(|s| frames.get(&(s, info.frame))).map(|p| PathData::from_bezpath(&(structure.to_doc * p.clone())));
|
||||
}
|
||||
let Some(texts) = Texts::read(data) else { return false };
|
||||
let Some(texts) = text.texts(data) else { return false };
|
||||
let mut read: std::collections::BTreeMap<u32, Option<Arc<Story>>> = Default::default();
|
||||
let stories: Vec<Option<Arc<Story>>> = infos
|
||||
.iter()
|
||||
@@ -244,13 +299,14 @@ pub(super) fn build_from(
|
||||
trust: bool,
|
||||
unit: f64,
|
||||
) -> Result<(Document, Vec<String>), String> {
|
||||
build_weighing(structure, data, visible, page, outlined, trust, unit, &mut None)
|
||||
build_weighing(structure, data, visible, page, outlined, trust, unit, &mut None, &mut ReadText::default())
|
||||
}
|
||||
|
||||
/// [`build_from`]. When the layers with their live envelopes don't draw as the page, and don't with
|
||||
/// the drawn art of every live envelope put back either, `free` is set to the envelopes of type
|
||||
/// (by their place among them, as read) that opened live and that the page doesn't hold against
|
||||
/// them ([`held_back`]), whether or not the layers are then used, and however.
|
||||
/// them ([`held_back`]), whether or not the layers are then used, and however. The text of `data`
|
||||
/// is taken from `text`, and read into it when it doesn't have it yet.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(super) fn build_weighing(
|
||||
structure: Structure,
|
||||
@@ -261,6 +317,7 @@ pub(super) fn build_weighing(
|
||||
trust: bool,
|
||||
unit: f64,
|
||||
free: &mut Option<Vec<usize>>,
|
||||
text: &mut ReadText,
|
||||
) -> Result<(Document, Vec<String>), String> {
|
||||
let Structure {
|
||||
mut doc,
|
||||
@@ -425,7 +482,7 @@ pub(super) fn build_weighing(
|
||||
collect_slots(&doc.layers, true, &mut infos);
|
||||
super::slots::limit_look_slots(&mut doc.layers, &mut infos, shown.len(), outlined);
|
||||
// Each text object's own frame or path, by its story and frame.
|
||||
let frames = ai::text_frames(data);
|
||||
let frames = text.frames(data);
|
||||
for info in &mut infos {
|
||||
info.art_path = info.story.and_then(|s| frames.get(&(s, info.frame))).map(|p| PathData::from_bezpath(&(to_doc * p.clone())));
|
||||
}
|
||||
@@ -439,14 +496,14 @@ pub(super) fn build_weighing(
|
||||
// The page's type that needs no text object of the layers: the layers' own legacy text, or
|
||||
// placed files that show it.
|
||||
let as_outlines = page_type_elsewhere(infos.is_empty(), infos.iter().all(|i| !i.shown), &mut shown, &mut hidden, &doc, &placed_elsewhere)?;
|
||||
let texts = Texts::read(data).map(|t| t.with_patterns(text_patterns));
|
||||
let texts = text.texts_with(data, text_patterns);
|
||||
// Each story is read once, however many text objects name it.
|
||||
let mut read: std::collections::BTreeMap<u32, Option<Arc<Story>>> = Default::default();
|
||||
let stories: Vec<Option<Arc<Story>>> = infos
|
||||
.iter()
|
||||
.map(|i| {
|
||||
let n = i.story?;
|
||||
read.entry(n).or_insert_with(|| texts.as_ref().and_then(|t| t.story(n as usize)).map(Arc::new)).clone()
|
||||
read.entry(n).or_insert_with(|| texts.and_then(|t| t.story(n as usize)).map(Arc::new)).clone()
|
||||
})
|
||||
.collect();
|
||||
if stories.iter().flatten().map(|s| s.len()).sum::<usize>() > MAX_TEXT {
|
||||
@@ -3311,4 +3368,72 @@ mod candidate_tests {
|
||||
assert!(typed && kept.node(drawn[0].0).is_none() && kept.node(drawn[1].0).is_some());
|
||||
assert!(!notes.iter().any(|n| n.starts_with(DREW_DIFFERENTLY)), "{notes:?}");
|
||||
}
|
||||
|
||||
/// The editing copy of a 100 × 100 file whose one layer holds a square and `stories` objects of
|
||||
/// point type, each its own story, with the text document that makes them.
|
||||
fn many_stories(stories: u32) -> Vec<u8> {
|
||||
use crate::import::tests_native::{Story, layer, native_with_text, square, text_object, unsplit_text_document};
|
||||
let texts: Vec<String> = (0..stories).map(|i| format!("Story {i}\r")).collect();
|
||||
let anchor = |i: u32| (8170.0 + f64::from(i % 40), 8180.0 + f64::from(i / 40 % 40));
|
||||
let list: Vec<Story<'_>> = (0..stories).zip(&texts).map(|(i, t)| (t.as_str(), 0, anchor(i), (0.0, 0.0), 0.0)).collect();
|
||||
let objects: String = (0..stories).map(text_object).collect();
|
||||
native_with_text(&layer("Art", true, &format!("{}\n{objects}", square(10, 10))), &unsplit_text_document(&list)).into_bytes()
|
||||
}
|
||||
|
||||
/// The check and the build of layers that open without the page, each reading the text of the
|
||||
/// editing copy afresh, as [`build_without_page`] did before it read it once for both.
|
||||
fn alone_reading_twice(structure: Structure, data: &[u8], pages: &[(f64, f64)]) -> Option<Built> {
|
||||
let scale = alone_scale(&structure, data, pages, 1.0, &mut ReadText::default())?;
|
||||
assert_eq!(scale, 1.0);
|
||||
Some(build_from(structure, data, None, Page::Artboard, false, false, 1.0))
|
||||
}
|
||||
|
||||
/// Layers that open without the page, their text read once for the check and the build, come in
|
||||
/// as they do with the text read afresh for each.
|
||||
#[test]
|
||||
fn layers_alone_read_their_text_once_and_come_in_as_with_two_reads() {
|
||||
let data = many_stories(12);
|
||||
let read = || ai::read_over_page(&data, false, ai::NameEncoding::default()).unwrap();
|
||||
let pages = [(100.0, 100.0)];
|
||||
let Some(Ok(twice)) = alone_reading_twice(read(), &data, &pages) else { panic!("didn't open without the page") };
|
||||
let Ok(Ok(once)) = build_without_page(read(), &data, &pages, 1.0, &mut ReadText::default()) else { panic!("didn't open without the page") };
|
||||
assert_eq!(once, twice);
|
||||
let mut texts = vec![];
|
||||
once.0.walk(|n| {
|
||||
if let NodeKind::Text(t) = &n.kind {
|
||||
texts.push(t.plain_text());
|
||||
}
|
||||
});
|
||||
assert_eq!(texts.len(), 12, "{:?}", once.1);
|
||||
assert!(texts.iter().enumerate().all(|(i, t)| *t == format!("Story {i}")), "{texts:?}");
|
||||
}
|
||||
|
||||
/// The check and the build of layers that open without the page, 2,000 objects of point type in
|
||||
/// them, timed with the text read afresh for each and read once for both, alternating, seven runs
|
||||
/// of each: `cargo test -p vectorcraft-eps --lib -- --ignored --nocapture text_read_once_timing`.
|
||||
#[test]
|
||||
#[ignore = "a timing, run by hand"]
|
||||
fn text_read_once_timing() {
|
||||
let data = many_stories(2000);
|
||||
let read = || ai::read_over_page(&data, false, ai::NameEncoding::default()).unwrap();
|
||||
let pages = [(100.0, 100.0)];
|
||||
let (mut twice, mut once) = (vec![], vec![]);
|
||||
for _ in 0..7 {
|
||||
let structure = read();
|
||||
let start = std::time::Instant::now();
|
||||
let Some(Ok(a)) = alone_reading_twice(structure, &data, &pages) else { panic!("didn't open without the page") };
|
||||
twice.push(start.elapsed());
|
||||
let structure = read();
|
||||
let start = std::time::Instant::now();
|
||||
let Ok(Ok(b)) = build_without_page(structure, &data, &pages, 1.0, &mut ReadText::default()) else {
|
||||
panic!("didn't open without the page")
|
||||
};
|
||||
once.push(start.elapsed());
|
||||
assert_eq!(a, b);
|
||||
}
|
||||
println!("read twice: {twice:?}\nread once: {once:?}");
|
||||
twice.sort();
|
||||
once.sort();
|
||||
println!("median: read twice {:?}, read once {:?}", twice[3], once[3]);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
use super::build::{
|
||||
PAGE_MOVE, Page, alone_scale, build, build_from, build_on_page, build_weighing, build_without_page, reid_page_art, scale_symbol_art,
|
||||
PAGE_MOVE, Page, ReadText, alone_scale, build, build_from, build_on_page, build_weighing, build_without_page, reid_page_art, scale_symbol_art,
|
||||
};
|
||||
use super::slots::LAYERS_UNREAD;
|
||||
use super::{Affine, Arc, Cow, Document, Imported, Node, NodeKind, PathData, Rect, Vec2, ai};
|
||||
@@ -149,7 +149,7 @@ pub fn layered_ai_from(
|
||||
all.push(format!("{LAYERS_UNREAD} from its editing data ({why}): they come from its PDF part"));
|
||||
all
|
||||
};
|
||||
let AiLayers { data, structure, alone } = layers;
|
||||
let AiLayers { data, structure, alone, mut text } = layers;
|
||||
let data = match data {
|
||||
Ok(data) => data,
|
||||
Err(why) => return (visible, unread(warnings, &why), false),
|
||||
@@ -194,7 +194,7 @@ pub fn layered_ai_from(
|
||||
let (mut free, mut count) = (None, 0);
|
||||
let built = structure.unwrap_or_else(|| ai::read_over_page(&data, false, names).map(Box::new)).and_then(|structure| {
|
||||
count = structure.warped_type.envelope_count();
|
||||
build_weighing(*structure, &data, Some(&visible), Page::Artboard, outlined, trust, unit, &mut free)
|
||||
build_weighing(*structure, &data, Some(&visible), Page::Artboard, outlined, trust, unit, &mut free, &mut text)
|
||||
});
|
||||
// Layers that waited on the page only for their envelopes of type open alone, as they would
|
||||
// have without them, unless one opened live with the layers drawing as the page. Alone, each
|
||||
@@ -210,7 +210,7 @@ pub fn layered_ai_from(
|
||||
if let Some(free) = free.as_deref().filter(|free| !free.is_empty()) {
|
||||
structure.warped_type.open_alone(free, count);
|
||||
}
|
||||
build_without_page(structure, &data, &pages, unit).ok()?.ok()
|
||||
build_without_page(structure, &data, &pages, unit, &mut text).ok()?.ok()
|
||||
})
|
||||
{
|
||||
done.setup.bleed = visible.setup.bleed;
|
||||
@@ -248,27 +248,28 @@ fn holds_type_envelope(nodes: &[Arc<Node>]) -> bool {
|
||||
pub fn ai_layers_alone(private: &[u8], pages: &[(f64, f64)], unit: f64, names: ai::NameEncoding) -> Result<(Document, Vec<String>), AiLayers> {
|
||||
let data = match ai::decode_private(private) {
|
||||
Ok(data) => data,
|
||||
Err(why) => return Err(AiLayers { data: Err(why), structure: None, alone: None }),
|
||||
Err(why) => return Err(AiLayers { data: Err(why), structure: None, alone: None, text: Box::default() }),
|
||||
};
|
||||
if !has_layers(&data) {
|
||||
return Err(AiLayers { data: Ok(data), structure: None, alone: None });
|
||||
return Err(AiLayers { data: Ok(data), structure: None, alone: None, text: Box::default() });
|
||||
}
|
||||
// An image past the hard limits is read as an unread box, which the PDF part's art replaces.
|
||||
let structure = match ai::read_over_page(&data, false, names) {
|
||||
Ok(structure) => structure,
|
||||
Err(why) => return Err(AiLayers { data: Ok(data), structure: Some(Err(why)), alone: None }),
|
||||
Err(why) => return Err(AiLayers { data: Ok(data), structure: Some(Err(why)), alone: None, text: Box::default() }),
|
||||
};
|
||||
let mut text = Box::<ReadText>::default();
|
||||
// An envelope of type opens live only where the layers with it draw as the page, as the other
|
||||
// live envelopes do: the PDF part is imported to compare them with. Should none open live, the
|
||||
// layers open alone as they would have, the envelopes keeping their drawn art ([`layered_ai_from`]).
|
||||
if structure.warped_type.has_envelopes() && alone_scale(&structure, &data, pages, unit).is_some() {
|
||||
if structure.warped_type.has_envelopes() && alone_scale(&structure, &data, pages, unit, &mut text).is_some() {
|
||||
let alone = Some((pages.to_vec(), unit));
|
||||
return Err(AiLayers { data: Ok(data), structure: Some(Ok(Box::new(structure))), alone });
|
||||
return Err(AiLayers { data: Ok(data), structure: Some(Ok(Box::new(structure))), alone, text });
|
||||
}
|
||||
match build_without_page(structure, &data, pages, unit) {
|
||||
match build_without_page(structure, &data, pages, unit, &mut text) {
|
||||
Ok(Ok((doc, notes))) => Ok((doc, notes)),
|
||||
Ok(_) => Err(AiLayers { data: Ok(data), structure: None, alone: None }),
|
||||
Err(structure) => Err(AiLayers { data: Ok(data), structure: Some(Ok(structure)), alone: None }),
|
||||
Ok(_) => Err(AiLayers { data: Ok(data), structure: None, alone: None, text }),
|
||||
Err(structure) => Err(AiLayers { data: Ok(data), structure: Some(Ok(structure)), alone: None, text }),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,12 +284,14 @@ pub struct AiLayers {
|
||||
/// The pages and their unit the layers open on without the PDF part, when they wait on it only
|
||||
/// for their envelopes of type ([`ai_layers_alone`]).
|
||||
alone: Option<(Vec<(f64, f64)>, f64)>,
|
||||
/// The text objects' frames and the text document of the editing copy, as far as they were read.
|
||||
text: Box<ReadText>,
|
||||
}
|
||||
|
||||
impl AiLayers {
|
||||
/// The editing copy `private` (as [`layered_ai`] takes it), decoded.
|
||||
pub fn decode(private: &[u8]) -> Self {
|
||||
Self { data: ai::decode_private(private), structure: None, alone: None }
|
||||
Self { data: ai::decode_private(private), structure: None, alone: None, text: Box::default() }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,12 +44,12 @@ fn native_large_canvas(size: f64, scale: f64, layers: &str) -> String {
|
||||
}
|
||||
|
||||
/// A layer as the format writes it.
|
||||
fn layer(name: &str, visible: bool, body: &str) -> String {
|
||||
pub(super) fn layer(name: &str, visible: bool, body: &str) -> String {
|
||||
format!("%AI5_BeginLayer\n{} 1 1 1 0 0 1 0 79 128 255 0 50 0 Lb\n({name}) Ln\n{body}\nLB\n%AI5_EndLayer--\n", u8::from(visible))
|
||||
}
|
||||
|
||||
/// A yellow square of 4 points at (`x`, `y`) in the format's operators.
|
||||
fn square(x: u32, y: u32) -> String {
|
||||
pub(super) fn square(x: u32, y: u32) -> String {
|
||||
format!("0 0 1 0 k\n{x} {y} m\n{} {y} L\n{} {} L\n{x} {} L\nf", x + 4, x + 4, y + 4, y + 4)
|
||||
}
|
||||
|
||||
@@ -3243,9 +3243,9 @@ fn custom_colours_open_paths_and_planar_group_marks_are_read() {
|
||||
/// A text document of `stories` (each as the text, its alignment code, its anchor and the frame's
|
||||
/// translation, and the start of its first line from the anchor), one font and a 14 point default.
|
||||
/// A story: its text, alignment code, anchor, frame translation and first line's start.
|
||||
type Story<'a> = (&'a str, u8, (f64, f64), (f64, f64), f64);
|
||||
pub(super) type Story<'a> = (&'a str, u8, (f64, f64), (f64, f64), f64);
|
||||
|
||||
fn text_document(stories: &[Story<'_>]) -> String {
|
||||
pub(super) fn text_document(stories: &[Story<'_>]) -> String {
|
||||
let story = |(text, align, anchor, _t, start): &Story<'_>| {
|
||||
let n = text.chars().count();
|
||||
format!(
|
||||
@@ -3290,7 +3290,7 @@ fn named_text_document(stories: &[Story<'_>]) -> String {
|
||||
|
||||
/// The editing copy of a 100 × 100 file with `layers` and the text `document`; its template box is
|
||||
/// centred at (50, 50).
|
||||
fn native_with_text(layers: &str, document: &str) -> String {
|
||||
pub(super) fn native_with_text(layers: &str, document: &str) -> String {
|
||||
let lines: Vec<String> = ascii85(document.as_bytes()).as_bytes().chunks(60).map(|c| format!("%{}", String::from_utf8_lossy(c))).collect();
|
||||
format!(
|
||||
"%!PS-Adobe-3.0 \n%%BoundingBox: 0 0 100 100\n%%HiResBoundingBox: 0 0 100 100\n%AI3_Cropmarks: 0 0 100 100\n%AI3_TemplateBox: 50 50 50 50\n\
|
||||
@@ -3299,8 +3299,18 @@ fn native_with_text(layers: &str, document: &str) -> String {
|
||||
)
|
||||
}
|
||||
|
||||
/// [`text_document`] of `stories`, padded so that [`native_with_text`] doesn't split the end of its
|
||||
/// data, `~>`, across two lines.
|
||||
pub(super) fn unsplit_text_document(stories: &[Story<'_>]) -> String {
|
||||
let mut doc = text_document(stories);
|
||||
while ascii85(doc.as_bytes()).len() % 60 == 1 {
|
||||
doc.push('\n');
|
||||
}
|
||||
doc
|
||||
}
|
||||
|
||||
/// A text object of story `story`, as the layers hold it.
|
||||
fn text_object(story: u32) -> String {
|
||||
pub(super) fn text_object(story: u32) -> String {
|
||||
format!("/AI11Text :\n0 /FreeUndo ,\n0 /FrameIndex ,\n{story} /StoryIndex ,\n2 /TextAntialiasing ,\n;\n")
|
||||
}
|
||||
|
||||
@@ -6058,6 +6068,94 @@ fn an_envelope_of_type_waits_on_the_page_of_layers_that_would_open_alone() {
|
||||
assert_eq!(loose, [("Note".to_string(), true)], "{notes:?}");
|
||||
}
|
||||
|
||||
/// What `f` returns, with how many times it read a text document and scanned the text objects'
|
||||
/// frames of an editing copy on this thread; with `afresh`, each check and build reads them anew,
|
||||
/// keeping nothing for the next.
|
||||
fn text_reads<T>(afresh: bool, f: impl FnOnce() -> T) -> (T, u64, u64) {
|
||||
crate::import::ate::TEXTS_READS.set(0);
|
||||
crate::import::ai::TEXT_FRAME_SCANS.set(0);
|
||||
crate::import::native::READ_AFRESH.set(afresh);
|
||||
let out = f();
|
||||
crate::import::native::READ_AFRESH.set(false);
|
||||
(out, crate::import::ate::TEXTS_READS.get(), crate::import::ai::TEXT_FRAME_SCANS.get())
|
||||
}
|
||||
|
||||
/// A `.ai` that opens without its PDF part reads its text document and scans its text objects'
|
||||
/// frames once, for the check that its text document makes all of its type and for the build, and
|
||||
/// comes in as it does when each reads them anew.
|
||||
#[test]
|
||||
fn layers_that_open_alone_read_their_text_once() {
|
||||
let doc = unsplit_text_document(&[("Hi there\r", 0, (8200.0, 8180.0), (0.0, 0.0), 0.0), ("Mid\r", 2, (8191.5, 8191.5), (0.0, 0.0), -10.0)]);
|
||||
let art = layer("Art", true, &format!("{}\n{}{}", square(10, 10), text_object(0), text_object(1)));
|
||||
let file = private(&native_with_text(&art, &doc));
|
||||
let open = || crate::ai_layers_alone(&file, &[(100.0, 100.0)], 1.0, crate::NameEncoding::default()).ok();
|
||||
let (opened, texts, frames) = text_reads(false, open);
|
||||
let Some((d, notes)) = opened else { panic!("didn't open without the page") };
|
||||
assert_eq!((texts, frames), (1, 1), "{notes:?}");
|
||||
assert_eq!(text_of(&d.layers[0]).iter().map(|t| t.plain_text()).collect::<Vec<_>>(), ["Hi there", "Mid"], "{notes:?}");
|
||||
let (afresh, texts, frames) = text_reads(true, open);
|
||||
assert_eq!((texts, frames), (2, 2));
|
||||
assert_eq!(afresh, Some((d, notes)));
|
||||
}
|
||||
|
||||
/// Layers whose text document can't be read wait on the PDF part, which then doesn't read the text
|
||||
/// document or scan the frames again, and come in as they do when each check and build reads them
|
||||
/// anew.
|
||||
#[test]
|
||||
fn layers_whose_text_document_cannot_be_read_read_it_once_with_the_page() {
|
||||
let art = layer("Art", true, &format!("{}\n{}", square(10, 10), text_object(0)));
|
||||
let file = private(&native_with_text(&art, "not a text document"));
|
||||
let names = crate::NameEncoding::default();
|
||||
let open = || {
|
||||
let Err(layers) = crate::ai_layers_alone(&file, &[(100.0, 100.0)], 1.0, names) else { panic!("opened without the page") };
|
||||
crate::layered_ai_from(layers, pdf_part(10.0, 86.0), vec![], false, false, 1.0, names)
|
||||
};
|
||||
let (opened, texts, frames) = text_reads(false, open);
|
||||
assert_eq!((texts, frames), (1, 1), "{:?}", opened.1);
|
||||
let (afresh, texts, frames) = text_reads(true, open);
|
||||
assert_eq!((texts, frames), (2, 2), "{:?}", afresh.1);
|
||||
assert_eq!(opened, afresh);
|
||||
}
|
||||
|
||||
/// An envelope of type that waits on the PDF part reads the text document and scans the frames
|
||||
/// once, for the check before the PDF part is imported, the build with it, and the build without it
|
||||
/// that follows when the envelope doesn't open live, and the file comes in as it does when each of
|
||||
/// them reads them anew.
|
||||
#[test]
|
||||
fn an_envelope_of_type_waiting_on_the_page_reads_the_text_once() {
|
||||
let Some(family) = installed_family() else { return };
|
||||
let stories = [("FLUX\r", 0, (8170.0, 8180.0), (0.0, 0.0), 0.0), ("Note\r", 0, (8170.0, 8220.0), (0.0, 0.0), 0.0)];
|
||||
let mut doc = text_document(&stories).replace("(Helvetica)", &format!("({family})"));
|
||||
while ascii85(doc.as_bytes()).len() % 60 == 1 {
|
||||
doc.push('\n');
|
||||
}
|
||||
let (drawn, _) = drawn_envelope(&arc_envelope(&made_envelope_type(&doc), 30.0));
|
||||
let art = format!("u\n{}U\n{}", text_object(1), type_envelope(&arc_keys(0.3), &drawn));
|
||||
let file = private(&native_with_text(&layer("Art", true, &art), &doc));
|
||||
let names = crate::NameEncoding::default();
|
||||
let open = |page: Document| {
|
||||
let Err(layers) = crate::ai_layers_alone(&file, &[(100.0, 100.0)], 1.0, names) else { panic!("opened without the page") };
|
||||
crate::layered_ai_from(layers, page, vec![], false, false, 1.0, names)
|
||||
};
|
||||
// A PDF part the layers don't draw as: they open alone, after a build with the page and one without.
|
||||
let (opened, texts, frames) = text_reads(false, || open(pdf_part(80.0, 80.0)));
|
||||
assert_eq!((texts, frames), (1, 1), "{:?}", opened.1);
|
||||
let (afresh, texts, frames) = text_reads(true, || open(pdf_part(80.0, 80.0)));
|
||||
assert_eq!((texts, frames), (4, 4), "{:?}", afresh.1);
|
||||
assert_eq!(opened, afresh);
|
||||
let (envelopes, _) = envelopes_and_type(&opened.0);
|
||||
assert!(opened.2 && envelopes.is_empty(), "{envelopes:?} {:?}", opened.1);
|
||||
// A PDF part that draws as those layers, with the drawn art: the envelope opens live.
|
||||
let page = opened.0;
|
||||
let (opened, texts, frames) = text_reads(false, || open(page.clone()));
|
||||
assert_eq!((texts, frames), (1, 1), "{:?}", opened.1);
|
||||
let (afresh, texts, frames) = text_reads(true, || open(page));
|
||||
assert_eq!((texts, frames), (2, 2), "{:?}", afresh.1);
|
||||
assert_eq!(opened, afresh);
|
||||
let (envelopes, _) = envelopes_and_type(&opened.0);
|
||||
assert_eq!(envelopes, [vec!["FLUX".to_string()]], "{:?}", opened.1);
|
||||
}
|
||||
|
||||
/// The hidden type outside envelopes in the layers of `d`: each text object's name.
|
||||
fn loose_type_names(d: &Document) -> Vec<Option<String>> {
|
||||
let mut out = vec![];
|
||||
|
||||
@@ -1336,7 +1336,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
|
||||
"ui.dialogReset",
|
||||
"Reset",
|
||||
"",
|
||||
"{} the open dialog's Reset, which its Cancel button reads while Alt (Option on macOS) is held (Flare Tool Options, dialog `flareOptions`): its fields go back to their defaults and the dialog stays open, so OK applies them → the dialog; an error when no dialog is open or the open one has no Reset",
|
||||
"{} the open dialog's Reset, which its Cancel button reads while Alt (Option on macOS) is held (Flare Tool Options, dialog `flareOptions`; Save PDF, dialog `savePdf`): its fields go back to their defaults (Save PDF: the chosen preset's settings, with the path and artboards kept) and the dialog stays open, so OK applies them → the dialog; an error when no dialog is open, the open one has no Reset, or Save PDF's chosen preset was deleted (the fields stay as they are)",
|
||||
),
|
||||
(
|
||||
"ui.justification",
|
||||
|
||||
@@ -48,6 +48,42 @@ fn chords_cross(a: &CubicBez, b: &CubicBez) -> Option<(f64, f64)> {
|
||||
(within(s) && within(u)).then(|| (s.clamp(0.0, 1.0), u.clamp(0.0, 1.0)))
|
||||
}
|
||||
|
||||
/// `(s, t)` moved to where `a` and `b` cross exactly, by Newton's method on a(s) = b(t), or as it
|
||||
/// was when that doesn't settle within both segments, closer than it started, and within the
|
||||
/// distance a piece bent by [`FLAT`] can shift a crossing at their angle there.
|
||||
fn refined(a: &CubicBez, b: &CubicBez, (s0, t0): (f64, f64)) -> (f64, f64) {
|
||||
let gap = |s: f64, t: f64| a.eval(s).distance(b.eval(t));
|
||||
let start = gap(s0, t0);
|
||||
if start <= 1e-12 || !start.is_finite() {
|
||||
return (s0, t0);
|
||||
}
|
||||
let (da, db) = (a.deriv(), b.deriv());
|
||||
let (mut s, mut t) = (s0, t0);
|
||||
for _ in 0..8 {
|
||||
let f = a.eval(s) - b.eval(t);
|
||||
let (u, v) = (da.eval(s).to_vec2(), db.eval(t).to_vec2());
|
||||
// a(s + ds) - b(t + dt) ≈ f + u ds - v dt, which is zero for these steps.
|
||||
let den = u.cross(v);
|
||||
let (ds, dt) = (-f.cross(v) / den, u.cross(f) / den);
|
||||
if !(ds.is_finite() && dt.is_finite()) {
|
||||
return (s0, t0);
|
||||
}
|
||||
(s, t) = (s + ds, t + dt);
|
||||
if !(-1e-12..=1.0 + 1e-12).contains(&s) || !(-1e-12..=1.0 + 1e-12).contains(&t) {
|
||||
return (s0, t0);
|
||||
}
|
||||
if gap(s, t) <= 1e-12 {
|
||||
break;
|
||||
}
|
||||
}
|
||||
let (s, t) = (s.clamp(0.0, 1.0), t.clamp(0.0, 1.0));
|
||||
let (u, v) = (da.eval(s).to_vec2(), db.eval(t).to_vec2());
|
||||
let sin = u.cross(v).abs() / (u.hypot() * v.hypot());
|
||||
let reach = 4.0 * FLAT / sin + SAME;
|
||||
let moved = a.eval(s).distance(a.eval(s0)).max(b.eval(t).distance(b.eval(t0)));
|
||||
if gap(s, t) < start.min(1e-9) && moved <= reach { (s, t) } else { (s0, t0) }
|
||||
}
|
||||
|
||||
/// Where segments `a` and `b` cross: (t on `a`, t on `b`) pairs, halving both while their control
|
||||
/// boxes meet until each piece is straight. `None` once `budget` steps are spent.
|
||||
fn segment_crossings(a: &CubicBez, b: &CubicBez, budget: &mut usize) -> Option<Vec<(f64, f64)>> {
|
||||
@@ -80,6 +116,11 @@ fn segment_crossings(a: &CubicBez, b: &CubicBez, budget: &mut usize) -> Option<V
|
||||
stack.extend([(a0, a1, b0, bm, d), (a0, a1, bm, b1, d)]);
|
||||
}
|
||||
}
|
||||
// A piece counts as straight while it bends by up to FLAT, so where the curves meet at a shallow
|
||||
// angle the chords cross some way along from where the curves do.
|
||||
for f in &mut found {
|
||||
*f = refined(a, b, *f);
|
||||
}
|
||||
found.sort_by(|x, y| x.0.total_cmp(&y.0));
|
||||
// The same crossing found by neighbouring pieces counts once.
|
||||
found.dedup_by(|x, y| a.eval(x.0).distance(a.eval(y.0)) < SAME && b.eval(x.1).distance(b.eval(y.1)) < SAME);
|
||||
|
||||
@@ -244,6 +244,42 @@ fn crossings_are_found_on_both_paths() {
|
||||
assert!(near(hits[1][0].2, 0.0, 1e-6) && near(b.subpaths[0].segment(0).eval(hits[0][0].2).x, 50.0, 1e-6));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_shallow_crossing_is_placed_where_the_curves_meet() {
|
||||
// Lines square to the middle of a quarter circle of radius 100, just inside it: each crosses the
|
||||
// arc twice, at under a degree for the nearest one.
|
||||
let arc = PathData::single(quarter());
|
||||
let k = std::f64::consts::FRAC_1_SQRT_2;
|
||||
for gap in [0.5, 0.05, 0.005, 0.0005] {
|
||||
let mid = pt((100.0 - gap) * k, (100.0 - gap) * k);
|
||||
let (from, to) = (mid + Vec2::new(-k, k) * 60.0, mid + Vec2::new(k, -k) * 60.0);
|
||||
let across = PathData::single(line(&[(from.x, from.y), (to.x, to.y)], false));
|
||||
let exact: Vec<Point> = kurbo::PathSeg::Cubic(arc.subpaths[0].segment(0))
|
||||
.intersect_line(kurbo::Line::new(from, to))
|
||||
.iter()
|
||||
.map(|x| from.lerp(to, x.line_t))
|
||||
.collect();
|
||||
assert_eq!(exact.len(), 2, "{gap}");
|
||||
let on = |p: &PathData, other: &PathData| -> Vec<Point> {
|
||||
crossings_on(p, &[other]).unwrap().iter().map(|q| p.subpaths[0].segment(q.1).eval(q.2)).collect()
|
||||
};
|
||||
let both = crossings(&[&arc, &across], false).unwrap();
|
||||
let found = [
|
||||
on(&arc, &across),
|
||||
on(&across, &arc),
|
||||
both[0].iter().map(|q| arc.subpaths[0].segment(q.1).eval(q.2)).collect(),
|
||||
both[1].iter().map(|q| across.subpaths[0].segment(q.1).eval(q.2)).collect(),
|
||||
];
|
||||
for places in found {
|
||||
assert_eq!(places.len(), 2, "{gap}: {places:?}");
|
||||
for x in &exact {
|
||||
let off = places.iter().map(|p| p.distance(*x)).fold(f64::INFINITY, f64::min);
|
||||
assert!(off < 1e-6, "{gap}: {off} pt from {x:?}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn insert_at_keeps_the_shape_and_names_the_new_anchors() {
|
||||
let sp = line(&[(0.0, 0.0), (100.0, 0.0), (100.0, 100.0)], false);
|
||||
|
||||
@@ -9,7 +9,7 @@ use vectorcraft_color::cms::{self, Cms, Model, ProfileKind};
|
||||
use vectorcraft_color::swatch::REGISTRATION;
|
||||
use vectorcraft_color::{BlendMode, Color, GradientKind, Paint};
|
||||
use vectorcraft_doc::inks::{Link, StopPlates, inks, plates, spot_color, stop_inks, visit_node_colors};
|
||||
use vectorcraft_doc::overprint::{darken_overprints, is_white};
|
||||
use vectorcraft_doc::overprint::{darken_overprints, is_black_ink, is_white};
|
||||
use vectorcraft_doc::{AppearanceItem, ColorMode, Document, ImageBlob, Node, NodeKind};
|
||||
|
||||
use super::{DEFAULT_FREQUENCY, PrintInk, PrintSettings};
|
||||
@@ -135,17 +135,26 @@ impl<'a> Separator<'a> {
|
||||
|
||||
/// Whether paint `p` puts none of ink `plate` down: a solid color, a gradient whose every stop
|
||||
/// does, or a freeform gradient with color points whose every point does (points carry no
|
||||
/// swatch link). On PostScript plates, to within half a percent (the other inks a black may
|
||||
/// carry and still count as black, [`vectorcraft_doc::overprint::is_black_ink`]).
|
||||
/// swatch link). Any ink above zero puts ink down, except on PostScript plates for a color that
|
||||
/// counts as 100% black ([`vectorcraft_doc::overprint::is_black_ink`], as
|
||||
/// [`vectorcraft_doc::overprint::OverprintBlack::default`] judges it) and is not linked to a
|
||||
/// spot swatch, to Registration or to a swatch the document lacks: up to the half a percent of
|
||||
/// another ink such a black may carry counts as none.
|
||||
fn no_ink(&self, plate: &str, p: &Paint) -> bool {
|
||||
let none = if self.postscript { 0.005 } else { 0.0 };
|
||||
let process = |swatch: Option<&str>| swatch.is_none_or(|n| n != REGISTRATION && self.doc.swatch(n).is_some_and(|w| !w.spot));
|
||||
let none = |c: &Color, process: bool, ink: f32| ink <= 0.0 || (self.postscript && process && ink <= 0.005 && is_black_ink(c, 1.0, false));
|
||||
match p {
|
||||
Paint::Solid { color, swatch, tint } => self.ink(plate, color, swatch.as_deref().map(|s| (s, *tint))) <= none,
|
||||
Paint::Solid { color, swatch, tint } => {
|
||||
none(color, process(swatch.as_deref()), self.ink(plate, color, swatch.as_deref().map(|s| (s, *tint))))
|
||||
}
|
||||
Paint::Gradient(g) => match g.freeform.as_ref().filter(|f| g.gradient.kind == GradientKind::Freeform && !f.points.is_empty()) {
|
||||
Some(f) => f.points.iter().all(|pt| self.ink(plate, &pt.color, None) <= none),
|
||||
Some(f) => f.points.iter().all(|pt| none(&pt.color, true, self.ink(plate, &pt.color, None))),
|
||||
None => {
|
||||
!g.gradient.stops.is_empty()
|
||||
&& g.gradient.stops.iter().all(|s| self.stop_ink(plate, &s.color, s.swatch.as_deref().map(|n| (n, s.tint)), s.plates) <= none)
|
||||
&& g.gradient.stops.iter().all(|s| {
|
||||
let ink = self.stop_ink(plate, &s.color, s.swatch.as_deref().map(|n| (n, s.tint)), s.plates);
|
||||
none(&s.color, s.plates.is_none() && process(s.swatch.as_deref()), ink)
|
||||
})
|
||||
}
|
||||
},
|
||||
_ => false,
|
||||
@@ -156,7 +165,9 @@ impl<'a> Separator<'a> {
|
||||
/// overprinting character fills and strokes, that put none of ink `plate` down leave its plate
|
||||
/// as it is: they are drawn as nothing on it (white ones with `discard_white` aside, which
|
||||
/// knock out). A writer without blending modes (PostScript) then keeps the ink below them,
|
||||
/// where it would draw their Darken as a knockout.
|
||||
/// where it would draw their Darken as a knockout. One that puts any ink down is drawn, and on
|
||||
/// a PostScript plate its ink replaces the ink below, as a nonzero component of an overprinting
|
||||
/// color replaces the backdrop's with overprint mode 1 (ISO 32000-1, 11.7.4.2).
|
||||
fn clear_inkless_overprints(&self, plate: &str, a: &mut Arc<Node>, discard_white: bool) {
|
||||
let inkless = |overprint: bool, p: &Paint| overprint && !p.is_none() && !(discard_white && is_white(p)) && self.no_ink(plate, p);
|
||||
let n = Arc::make_mut(a);
|
||||
|
||||
@@ -747,7 +747,7 @@ fn overprint_black_keeps_the_cyan_under_near_and_freeform_blacks_on_postscript_p
|
||||
#[test]
|
||||
fn an_overprinting_fill_keeps_its_faint_ink_on_pdf_plates() {
|
||||
// 0.4% cyan beside 100% K, set to overprint: a PDF plate draws it with Darken, a PostScript
|
||||
// plate draws it as nothing (it has no blending modes).
|
||||
// plate (it has no blending modes) draws it as nothing, since the color counts as black.
|
||||
let mut square = Node::path(
|
||||
vectorcraft_doc::NodeId(0),
|
||||
shapes::rectangle(Rect::new(10.0, 15.0, 30.0, 35.0)),
|
||||
@@ -767,6 +767,79 @@ fn an_overprinting_fill_keeps_its_faint_ink_on_pdf_plates() {
|
||||
assert_eq!((fills(false), fills(true)), (2, 1), "the cyan plate as PDF, as PostScript");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn overprinting_paints_keep_their_faint_ink_on_postscript_plates() {
|
||||
// 0.4% cyan in a color that is not black, set to overprint, on a fill, a stroke, a character
|
||||
// fill, a linear gradient's stop and a freeform gradient's point: the cyan plate draws it on
|
||||
// PDF and PostScript plates alike. A magenta with no cyan at all draws as nothing.
|
||||
let faint = Color::cmyk(0.004, 0.5, 0.0, 0.0);
|
||||
let magenta = Color::cmyk(0.0, 0.5, 0.0, 0.0);
|
||||
let square = |x: f64, fill: Paint, stroke: Paint| {
|
||||
let mut n =
|
||||
Node::path(vectorcraft_doc::NodeId(0), shapes::rectangle(Rect::new(x, 15.0, x + 20.0, 35.0)), Appearance::basic(fill, stroke, 2.0));
|
||||
if let Some(f) = n.appearance.fill_mut() {
|
||||
f.overprint = true;
|
||||
}
|
||||
if let Some(s) = n.appearance.stroke_mut() {
|
||||
s.overprint = true;
|
||||
}
|
||||
n
|
||||
};
|
||||
let linear = GradientPaint::new(Gradient::new(GradientKind::Linear, vec![GradientStop::new(0.0, faint), GradientStop::new(1.0, magenta)]));
|
||||
let mut freeform =
|
||||
GradientPaint::new(Gradient::new(GradientKind::Freeform, vec![GradientStop::new(0.0, magenta), GradientStop::new(1.0, magenta)]));
|
||||
let points = vec![FreeformPoint::new(kurbo::Point::new(105.0, 20.0), magenta), FreeformPoint::new(kurbo::Point::new(115.0, 30.0), faint)];
|
||||
freeform.freeform = Some(Freeform { points, ..Default::default() });
|
||||
let style = vectorcraft_doc::CharStyle { fill: Paint::solid(faint), overprint_fill: true, ..Default::default() };
|
||||
let text = vectorcraft_doc::TextObject::point(vectorcraft_geom::Point::new(20.0, 60.0), "Hi", style);
|
||||
let d = over_cyan(vec![
|
||||
square(10.0, Paint::solid(faint), Paint::None),
|
||||
square(40.0, Paint::None, Paint::solid(faint)),
|
||||
square(70.0, Paint::Gradient(Box::new(linear)), Paint::None),
|
||||
square(100.0, Paint::Gradient(Box::new(freeform)), Paint::None),
|
||||
square(130.0, Paint::solid(magenta), Paint::None),
|
||||
Node::new(vectorcraft_doc::NodeId(0), NodeKind::Text(Box::new(text))),
|
||||
// A black linked to the spot swatch at a 0.4% tint: 0.4% on the spot plate, none on the cyan.
|
||||
square(160.0, Paint::Solid { color: Color::cmyk(0.0, 0.0, 0.0, 1.0), swatch: Some("Ink".into()), tint: 0.004 }, Paint::None),
|
||||
]);
|
||||
let opts = PrintOptions { settings: settings(json!({"output": {"mode": "separations"}})), postscript: true, ..Default::default() };
|
||||
let p = plan(&d, &opts).unwrap();
|
||||
let mut spot = vec![];
|
||||
p.plates[4].walk(|n| {
|
||||
spot.extend(n.appearance.fill().and_then(|f| f.paint.color()).map(|c| match c {
|
||||
Color::Gray { k } => (k * 1000.0).round(),
|
||||
c => panic!("{c:?}"),
|
||||
}))
|
||||
});
|
||||
assert!(spot.contains(&4.0), "the PostScript spot plate draws the spot tint: {spot:?}");
|
||||
// The fills, strokes and character fills the cyan plate draws, and the gray of the solid fills.
|
||||
let drawn = |postscript: bool| {
|
||||
let opts = PrintOptions { settings: settings(json!({"output": {"mode": "separations"}})), postscript, ..Default::default() };
|
||||
let p = plan(&d, &opts).unwrap();
|
||||
let (mut fills, mut strokes, mut chars, mut grays) = (0, 0, 0, vec![]);
|
||||
p.plates[0].walk(|n| {
|
||||
if let Some(f) = n.appearance.fill().filter(|f| !f.paint.is_none()) {
|
||||
fills += 1;
|
||||
if let Some(Color::Gray { k }) = f.paint.color() {
|
||||
grays.push((k * 1000.0).round());
|
||||
}
|
||||
}
|
||||
strokes += usize::from(n.appearance.stroke().is_some_and(|s| !s.paint.is_none()));
|
||||
if let NodeKind::Text(t) = &n.kind {
|
||||
chars += t.runs.iter().filter(|r| !r.style.fill.is_none()).count();
|
||||
}
|
||||
});
|
||||
(fills, strokes, chars, grays)
|
||||
};
|
||||
for postscript in [false, true] {
|
||||
let (fills, strokes, chars, grays) = drawn(postscript);
|
||||
let at = if postscript { "PostScript" } else { "PDF" };
|
||||
assert_eq!((strokes, chars), (1, 1), "{at}: the stroke and the character fill");
|
||||
assert_eq!(fills, 4, "{at}: the cyan, the faint fill and both gradients, not the magenta");
|
||||
assert_eq!(grays, [1000.0, 4.0], "{at}: the cyan and the faint fill's 0.4%");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn overprinting_type_leaves_the_inks_below_on_separations() {
|
||||
let style = vectorcraft_doc::CharStyle { fill: Paint::solid(Color::cmyk(0.0, 0.0, 0.0, 1.0)), ..Default::default() };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! Raster export: render a document region with [`RasterExportOptions`] (resolution, background,
|
||||
//! anti-aliasing) and encode it as PNG ([`png`]: resolution in `pHYs`, Adam7 interlacing), JPEG
|
||||
//! ([`jpeg`]: RGB, CMYK or grey, progressive, resolution and colour profile), lossless WebP, or
|
||||
//! ([`jpeg`]: RGB, CMYK or grey, progressive, resolution and colour profile), lossless or lossy WebP, or
|
||||
//! a palette image ([`quantize`]) as PNG-8 or [`gif`], [`tiff`] (RGB, CMYK or grey, LZW, either byte
|
||||
//! order, the profile), [`bmp`] (1–32 bits, RLE) or [`tga`]; [`web`] adds what Save for Web optimises
|
||||
//! further (web snap, colour table edits, lossy GIF, comments); [`psd`] writes layered bitmaps.
|
||||
@@ -49,8 +49,10 @@ pub struct RasterExportOptions {
|
||||
pub anti_alias: AntiAlias,
|
||||
/// PNG, PNG-8: Adam7 interlacing; GIF: interlaced rows.
|
||||
pub interlaced: bool,
|
||||
/// JPEG quality 0–100.
|
||||
/// JPEG quality 0–100, and lossy WebP's.
|
||||
pub quality: u8,
|
||||
/// WebP: lossless (`true`), or lossy at [`Self::quality`].
|
||||
pub webp_lossless: bool,
|
||||
/// JPEG colour model, coding and profile.
|
||||
pub jpeg: jpeg::JpegOptions,
|
||||
/// PNG-8 and GIF: the colour reduction (also BMP's at 1, 4 and 8 bits).
|
||||
@@ -76,6 +78,7 @@ impl Default for RasterExportOptions {
|
||||
anti_alias: AntiAlias::Art,
|
||||
interlaced: false,
|
||||
quality: 90,
|
||||
webp_lossless: true,
|
||||
jpeg: jpeg::JpegOptions::default(),
|
||||
palette: quantize::PaletteOptions::default(),
|
||||
tiff: tiff::TiffOptions::default(),
|
||||
@@ -125,7 +128,7 @@ impl RasterExportOptions {
|
||||
};
|
||||
jpeg::encode(&px, img.width, img.height, self.quality, Some(self.ppi), &self.jpeg)
|
||||
}
|
||||
RasterFormat::WebP => webp(img),
|
||||
RasterFormat::WebP => webp(img, (!self.webp_lossless).then_some(self.quality)),
|
||||
RasterFormat::Png8 | RasterFormat::Gif => {
|
||||
let ix = quantize::quantize(&img.to_straight(), img.width, img.height, &self.palette);
|
||||
match format {
|
||||
@@ -184,8 +187,9 @@ pub fn on_white(p: &[u8; 4]) -> [u8; 3] {
|
||||
[0, 1, 2].map(|i| ((u32::from(p[i]) * a + 255 * (255 - a) + 127) / 255) as u8)
|
||||
}
|
||||
|
||||
/// Lossless WebP.
|
||||
pub(crate) fn webp(img: &Rendered) -> Result<Vec<u8>, String> {
|
||||
/// WebP: lossless (`VP8L`) when `lossy_quality` is `None`, else lossy (`VP8 `, with an `ALPH`
|
||||
/// chunk when some pixels are not opaque) at that quality 0–100.
|
||||
pub(crate) fn webp(img: &Rendered, lossy_quality: Option<u8>) -> Result<Vec<u8>, String> {
|
||||
let src = craft_image_codecs::Image::from_raw(
|
||||
img.width,
|
||||
img.height,
|
||||
@@ -194,8 +198,40 @@ pub(crate) fn webp(img: &Rendered) -> Result<Vec<u8>, String> {
|
||||
img.to_straight(),
|
||||
)
|
||||
.map_err(|e| format!("WebP encoding failed: {e}"))?;
|
||||
let opts = craft_image_codecs::EncodeOptions { webp_lossless: true, ..craft_image_codecs::EncodeOptions::default() };
|
||||
craft_image_codecs::encode(&src, craft_image_codecs::Format::WebP, &opts).map_err(|e| format!("WebP encoding failed: {e}"))
|
||||
let opts = craft_image_codecs::EncodeOptions {
|
||||
webp_lossless: lossy_quality.is_none(),
|
||||
webp_quality: lossy_quality.unwrap_or(100).min(100),
|
||||
..craft_image_codecs::EncodeOptions::default()
|
||||
};
|
||||
let file = craft_image_codecs::encode(&src, craft_image_codecs::Format::WebP, &opts).map_err(|e| format!("WebP encoding failed: {e}"))?;
|
||||
if lossy_quality.is_some() && vp8_partition_at_limit(&file) {
|
||||
return Err("WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless".into());
|
||||
}
|
||||
Ok(file)
|
||||
}
|
||||
|
||||
/// The largest first-partition size a VP8 key frame's 19-bit size field holds (RFC 6386 §9.1).
|
||||
const VP8_FIRST_PARTITION_LIMIT: u32 = (1 << 19) - 1;
|
||||
|
||||
/// Does the `VP8 ` chunk of RIFF WebP `file` give its first partition the size limit? The encoder
|
||||
/// writes the limit for a larger partition too, and a decoder then reads the token partition from
|
||||
/// the wrong offset, so a frame at the limit is not written.
|
||||
fn vp8_partition_at_limit(file: &[u8]) -> bool {
|
||||
let mut at = 12usize;
|
||||
while let Some(head) = file.get(at..).and_then(|rest| rest.get(..8)) {
|
||||
let len = u32::from_le_bytes([head[4], head[5], head[6], head[7]]);
|
||||
if &head[..4] == b"VP8 " {
|
||||
return file.get(at + 8..).and_then(|rest| rest.get(..3)).is_some_and(|tag| {
|
||||
let tag = u32::from(tag[0]) | (u32::from(tag[1]) << 8) | (u32::from(tag[2]) << 16);
|
||||
tag >> 5 >= VP8_FIRST_PARTITION_LIMIT
|
||||
});
|
||||
}
|
||||
let Some(next) = usize::try_from(u64::from(len) + u64::from(len % 2) + 8).ok().and_then(|n| at.checked_add(n)) else {
|
||||
break;
|
||||
};
|
||||
at = next;
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
/// Bounds of the art an export draws: visible objects off template layers (guides left out),
|
||||
|
||||
@@ -202,6 +202,84 @@ fn backgrounds_are_opaque_or_transparent() {
|
||||
assert_eq!(webp.get_pixel(0, 0).0, [0, 0, 0, 255]);
|
||||
}
|
||||
|
||||
/// The chunk types of RIFF WebP file `file`, in order.
|
||||
fn webp_chunks(file: &[u8]) -> Vec<[u8; 4]> {
|
||||
assert_eq!((&file[..4], &file[8..12]), (&b"RIFF"[..], &b"WEBP"[..]));
|
||||
let mut chunks = Vec::new();
|
||||
let mut at = 12;
|
||||
while at + 8 <= file.len() {
|
||||
let len = u32::from_le_bytes([file[at + 4], file[at + 5], file[at + 6], file[at + 7]]) as usize;
|
||||
chunks.push([file[at], file[at + 1], file[at + 2], file[at + 3]]);
|
||||
at += 8 + len + len % 2;
|
||||
}
|
||||
chunks
|
||||
}
|
||||
|
||||
/// Lossy WebP is a `VP8 ` picture; transparent pixels stay transparent through an `ALPH` chunk
|
||||
/// in a `VP8X` file, and opaque art stays opaque.
|
||||
#[test]
|
||||
fn lossy_webp_keeps_transparent_pixels_transparent() {
|
||||
let d = circle_doc();
|
||||
let lossless = Renderer::new().export_region(&d, d.artboards[0].rect, RasterFormat::WebP, &RasterExportOptions::default()).unwrap();
|
||||
assert_eq!(webp_chunks(&lossless), [*b"VP8L"], "lossless by default");
|
||||
let o = RasterExportOptions { webp_lossless: false, quality: 75, ..Default::default() };
|
||||
let file = Renderer::new().export_region(&d, d.artboards[0].rect, RasterFormat::WebP, &o).unwrap();
|
||||
assert_eq!(webp_chunks(&file), [*b"VP8X", *b"ALPH", *b"VP8 "]);
|
||||
let img = export(&d, RasterFormat::WebP, &o);
|
||||
assert_eq!(img.dimensions(), (40, 30));
|
||||
assert_eq!(img.get_pixel(0, 0)[3], 0, "a corner outside the circle");
|
||||
let middle = img.get_pixel(20, 15);
|
||||
assert!(middle[3] == 255 && middle[0] < 24, "{middle:?}");
|
||||
// Opaque art on a background is a plain `VP8 ` file.
|
||||
let opaque = RasterExportOptions { background: Some([255; 3]), ..o };
|
||||
let file = Renderer::new().export_region(&d, d.artboards[0].rect, RasterFormat::WebP, &opaque).unwrap();
|
||||
assert_eq!(webp_chunks(&file), [*b"VP8 "]);
|
||||
}
|
||||
|
||||
/// A lossy frame's tag (RFC 6386 §9.1) holds its first partition's size in 19 bits. A frame whose
|
||||
/// size field is at that limit may hold a larger partition, so it is refused; frames below it
|
||||
/// decode with another decoder at every quality, a 1 × 1 image and transparent pixels included.
|
||||
#[test]
|
||||
fn lossy_webp_refuses_a_first_partition_at_the_size_limit() {
|
||||
let circle = circle_doc();
|
||||
let dot = Document::new(1.0, 1.0);
|
||||
for (d, background) in [(&circle, None), (&circle, Some([255; 3])), (&dot, Some([40, 80, 120]))] {
|
||||
for quality in [0, 50, 100] {
|
||||
let o = RasterExportOptions { webp_lossless: false, quality, background, ..Default::default() };
|
||||
let mut file = Renderer::new().export_region(d, d.artboards[0].rect, RasterFormat::WebP, &o).unwrap();
|
||||
let decoded = image::load_from_memory_with_format(&file, image::ImageFormat::WebP).unwrap();
|
||||
let rect = d.artboards[0].rect;
|
||||
assert_eq!((decoded.width(), decoded.height()), (rect.width() as u32, rect.height() as u32), "quality {quality}");
|
||||
assert!(!vp8_partition_at_limit(&file), "quality {quality}");
|
||||
let vp8 = chunk_offset(&file, b"VP8 ") + 8;
|
||||
let tag = u32::from(file[vp8]) | (u32::from(file[vp8 + 1]) << 8) | (u32::from(file[vp8 + 2]) << 16);
|
||||
let len = u32::from_le_bytes(file[vp8 - 4..vp8].try_into().unwrap());
|
||||
assert_eq!((tag & 1, &file[vp8 + 3..vp8 + 6]), (0, &[0x9d, 0x01, 0x2a][..]), "a key frame with its start code");
|
||||
assert!((tag >> 5) + 10 <= len, "the first partition fits in the chunk");
|
||||
// The size field at its limit.
|
||||
let at_limit = (tag & 0x1f) | (VP8_FIRST_PARTITION_LIMIT << 5);
|
||||
file[vp8..vp8 + 3].copy_from_slice(&at_limit.to_le_bytes()[..3]);
|
||||
assert!(vp8_partition_at_limit(&file), "quality {quality}");
|
||||
}
|
||||
}
|
||||
let lossless = Renderer::new().export_region(&circle, circle.artboards[0].rect, RasterFormat::WebP, &RasterExportOptions::default()).unwrap();
|
||||
assert!(!vp8_partition_at_limit(&lossless));
|
||||
// Cut short or with a chunk length past the end, the scan stops without a frame.
|
||||
for bad in [&b"RIFF\0\0\0\0WEBP"[..], b"RIFF\0\0\0\0WEBPVP8 ", b"RIFF\0\0\0\0WEBPXXXX\xff\xff\xff\xffVP8 \x04\0\0\0\xff\xff\xff\0", b""] {
|
||||
assert!(!vp8_partition_at_limit(bad), "{bad:?}");
|
||||
}
|
||||
}
|
||||
|
||||
/// The offset of the first chunk of type `ty` in RIFF WebP `file`.
|
||||
fn chunk_offset(file: &[u8], ty: &[u8; 4]) -> usize {
|
||||
let mut at = 12;
|
||||
while &file[at..at + 4] != ty {
|
||||
let len = u32::from_le_bytes(file[at + 4..at + 8].try_into().unwrap()) as usize;
|
||||
at += 8 + len + len % 2;
|
||||
}
|
||||
at
|
||||
}
|
||||
|
||||
/// #787: translucent art over opaque art (or a background) stays exactly opaque, its anti-aliased
|
||||
/// edges too, so the file is written as RGB.
|
||||
#[test]
|
||||
|
||||
@@ -419,7 +419,7 @@ impl Rendered {
|
||||
}
|
||||
/// Encode as lossless WebP.
|
||||
pub fn to_webp(&self) -> Result<Vec<u8>, String> {
|
||||
encode::webp(self)
|
||||
encode::webp(self, None)
|
||||
}
|
||||
/// Straight-alpha RGBA at (x, y).
|
||||
pub fn pixel(&self, x: u32, y: u32) -> [u8; 4] {
|
||||
|
||||
@@ -75,6 +75,7 @@ group = "Selection"
|
||||
shown_when = [
|
||||
"The Group Selection tool: each click selects the next enclosing group.",
|
||||
"Direct Selection with Alt held (Alt makes it Group Selection for the next click).",
|
||||
"Over a panel where a click or a drop adds something, such as the strip under the Gradient panel's ramp, where a click adds a stop, or the Layers panel's list while rows are Alt-dragged, where the drop adds copies (where the system has no copy cursor the app can show).",
|
||||
]
|
||||
hotspot = "The arrow's tip."
|
||||
look = "ArrowHollow with a plus badge."
|
||||
|
||||
@@ -267,6 +267,12 @@ impl VectorcraftApp {
|
||||
{
|
||||
self.ui.status = w.to_string();
|
||||
}
|
||||
// A renamed spot color swatch stays the Color Guide's base.
|
||||
if id == "swatch.edit"
|
||||
&& let (Some(from), Some(to)) = (params["name"].as_str(), v["name"].as_str())
|
||||
{
|
||||
crate::panels::color_guide::swatch_renamed(self, from, to);
|
||||
}
|
||||
if id == "file.new" {
|
||||
self.ui.status.clear();
|
||||
// New Document's Pixel preview mode (Overprint Preview is the engine's).
|
||||
|
||||
+174
-25
@@ -82,10 +82,8 @@ pub fn app_bar(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
ui.add_space(2.0);
|
||||
// With the macOS menu bar the menus are at the top of the screen instead.
|
||||
let menus_end = if app.services.native_menu.is_some() { ui.cursor().min.x } else { menus::menu_bar(app, ui) };
|
||||
// The right-side group fills the space after the menus from the right; when it runs
|
||||
// short, Discord goes first (it is also under Help), then Explore tutorials (also
|
||||
// Window › Learn), then the search icon (the palette stays under its shortcut), then
|
||||
// the workspace switcher narrows.
|
||||
// The right-side group fills the space after the menus from the right, in the order
|
||||
// [`fit_right_group`] gives.
|
||||
let full = ui.max_rect();
|
||||
let right_edge = if captions_right > 0.0 { full.right() - captions_right - 10.0 } else { full.right() };
|
||||
let right = egui::Rect::from_min_max(egui::pos2(menus_end + 8.0, full.top()), egui::pos2(right_edge, full.bottom()));
|
||||
@@ -97,21 +95,22 @@ pub fn app_bar(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
let text = ui.painter().layout_no_wrap(label.text().to_string(), egui::FontId::proportional(12.0), t.warning);
|
||||
text.size().x + 2.0 * ui.spacing().button_padding.x + 8.0 + ui.spacing().item_spacing.x
|
||||
});
|
||||
let room = (right.width() - safe_w).max(0.0);
|
||||
let switcher = safe.is_none() || room >= 64.0 + 8.0;
|
||||
// Built-in workspace names translate; the user's own stay as typed.
|
||||
let ws_name =
|
||||
if crate::workspaces::is_builtin(&app.ui.workspace) { tl!(&app.ui.workspace).to_string() } else { app.ui.workspace.clone() };
|
||||
let ws = ui.painter().layout_no_wrap(ws_name, egui::FontId::proportional(12.0), t.text);
|
||||
let ws_w = (ws.size().x + 36.0).clamp(112.0, 190.0);
|
||||
let gap = ui.spacing().item_spacing.x;
|
||||
// The search icon, as in PhotoCraft: shown while a minimal switcher fits beside it.
|
||||
let icon = 28.0;
|
||||
let search = switcher && room >= 64.0 + 8.0 + gap + icon;
|
||||
let ws_w = ws_w.min(room - 8.0 - gap - if search { icon } else { 0.0 }).max(64.0);
|
||||
// Explore tutorials, beside the search icon, opens the Learn panel.
|
||||
let learn = search && room >= ws_w + 8.0 + 2.0 * (gap + icon);
|
||||
let discord = learn && room >= ws_w + 8.0 + 2.0 * (gap + icon) + 10.0 + gap + crate::community::discord_width(ui, false);
|
||||
let shortcut = menus::shortcut_of("help.commandPalette").map(menus::shown_shortcut);
|
||||
let field = SearchField::new(ui, &t, shortcut);
|
||||
let fit = fit_right_group(&RightWidths {
|
||||
room: (right.width() - safe_w).max(0.0),
|
||||
safe_mode: safe.is_some(),
|
||||
switcher: (ws.size().x + 36.0).clamp(112.0, 190.0),
|
||||
field: field.width,
|
||||
icon: BAR_ICON,
|
||||
gap: ui.spacing().item_spacing.x,
|
||||
community: crate::community::discord_width(ui, false),
|
||||
});
|
||||
let (switcher, ws_w, learn, discord) = (fit.switcher, fit.switcher_w, fit.learn, fit.community);
|
||||
let mut rui = ui.new_child(egui::UiBuilder::new().max_rect(right).layout(egui::Layout::right_to_left(egui::Align::Center)));
|
||||
let ui = &mut rui;
|
||||
// Workspace switcher: shows the current workspace, opens Window → Workspace.
|
||||
@@ -131,19 +130,33 @@ pub fn app_bar(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
ui.add_space(8.0);
|
||||
}
|
||||
// Search → command palette (its shortcut opens it too).
|
||||
if search {
|
||||
let tip = match menus::shortcut_of("help.commandPalette") {
|
||||
Some(sc) => format!("{} ({})", tl!("Search commands, tools, panels and effects"), menus::shown_shortcut(sc)),
|
||||
None => tl!("Search commands, tools, panels and effects").to_string(),
|
||||
};
|
||||
if widgets::icon_button(ui, "search", &tip, app.ui.palette_open, icon).clicked() {
|
||||
app.ui.palette_open = !app.ui.palette_open;
|
||||
app.ui.palette_query.clear();
|
||||
}
|
||||
let with_shortcut = |text: &str| match &field.shortcut {
|
||||
Some(sc) => format!("{text} ({sc})"),
|
||||
None => text.to_string(),
|
||||
};
|
||||
let tip = with_shortcut(tl!("Search commands, tools, panels and effects"));
|
||||
let name = with_shortcut(tl!("Search commands"));
|
||||
// The field and the icon toggle the palette as its shortcut does, and like the shortcut
|
||||
// they do nothing while a dialog is open, so they are drawn disabled then.
|
||||
let enabled = app.ui.dialog.is_none();
|
||||
let open = app.ui.palette_open;
|
||||
let clicked = ui
|
||||
.add_enabled_ui(enabled, |ui| match fit.search {
|
||||
Search::Field => field.show(ui, &t, &name, &tip, open).clicked(),
|
||||
Search::Icon => {
|
||||
let (_, resp) = ui.allocate_exact_size(vec2(BAR_ICON, BAR_ICON), Sense::click());
|
||||
widgets::paint_icon_button_named(ui, resp, "search", &name, &tip, open).clicked()
|
||||
}
|
||||
Search::Hidden => false,
|
||||
})
|
||||
.inner;
|
||||
if clicked && enabled {
|
||||
app.ui.palette_open = !app.ui.palette_open;
|
||||
app.ui.palette_query.clear();
|
||||
}
|
||||
if learn {
|
||||
let shown = crate::panels::learn::visible(&app.ui);
|
||||
if widgets::icon_button(ui, "graduation-cap", tl!("Explore tutorials"), shown, icon).clicked()
|
||||
if widgets::icon_button(ui, "graduation-cap", tl!("Explore tutorials"), shown, BAR_ICON).clicked()
|
||||
&& let Err(e) = app.run("window.learn", json!({}))
|
||||
{
|
||||
app.ui.status = e;
|
||||
@@ -168,6 +181,142 @@ pub fn app_bar(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
}
|
||||
}
|
||||
|
||||
/// The side of the app bar's square icon buttons (the search icon, Explore tutorials).
|
||||
const BAR_ICON: f32 = 28.0;
|
||||
/// The narrowest the workspace switcher gets.
|
||||
const MIN_SWITCHER: f32 = 64.0;
|
||||
|
||||
/// How the app bar shows the search that opens the command palette.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
enum Search {
|
||||
/// A field with the magnifier, "Search commands" and the palette's shortcut.
|
||||
Field,
|
||||
/// The magnifier alone.
|
||||
Icon,
|
||||
/// Not in the bar; the palette stays under its shortcut and Help › Search Commands….
|
||||
Hidden,
|
||||
}
|
||||
|
||||
/// The widths [`fit_right_group`] fits into `room`, in points.
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
struct RightWidths {
|
||||
/// The room after the menus, less the Safe Mode label's.
|
||||
room: f32,
|
||||
/// Whether the bar shows the Safe Mode label.
|
||||
safe_mode: bool,
|
||||
/// The workspace switcher's full width.
|
||||
switcher: f32,
|
||||
/// The search field's width.
|
||||
field: f32,
|
||||
/// The side of a square icon button.
|
||||
icon: f32,
|
||||
/// The space between two controls.
|
||||
gap: f32,
|
||||
/// The community button's width.
|
||||
community: f32,
|
||||
}
|
||||
|
||||
/// What the right-hand group of the app bar shows.
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
struct RightGroup {
|
||||
/// Whether the workspace switcher shows.
|
||||
switcher: bool,
|
||||
/// The workspace switcher's width.
|
||||
switcher_w: f32,
|
||||
/// How the search shows.
|
||||
search: Search,
|
||||
/// Whether Explore tutorials shows.
|
||||
learn: bool,
|
||||
/// Whether the community button shows.
|
||||
community: bool,
|
||||
}
|
||||
|
||||
/// The right-hand group for the room it has. As the room runs short, the community button goes first
|
||||
/// (it is also under Help), then Explore tutorials (also Window › Learn), then the search field becomes the
|
||||
/// search icon, then the workspace switcher narrows to [`MIN_SWITCHER`], then the icon goes. In Safe
|
||||
/// Mode the label's width is taken first, and the switcher (also under Window › Workspace) goes when
|
||||
/// a minimal one does not fit.
|
||||
fn fit_right_group(w: &RightWidths) -> RightGroup {
|
||||
let room = w.room;
|
||||
let switcher = !w.safe_mode || room >= MIN_SWITCHER + 8.0;
|
||||
let icon = switcher && room >= MIN_SWITCHER + 8.0 + w.gap + w.icon;
|
||||
let field = icon && room >= w.switcher + 8.0 + w.gap + w.field;
|
||||
let search = if field {
|
||||
Search::Field
|
||||
} else if icon {
|
||||
Search::Icon
|
||||
} else {
|
||||
Search::Hidden
|
||||
};
|
||||
let search_w = match search {
|
||||
Search::Field => w.gap + w.field,
|
||||
Search::Icon => w.gap + w.icon,
|
||||
Search::Hidden => 0.0,
|
||||
};
|
||||
let switcher_w = w.switcher.min(room - 8.0 - search_w).max(MIN_SWITCHER);
|
||||
let learn_end = switcher_w + 8.0 + search_w + w.gap + w.icon;
|
||||
let learn = field && room >= learn_end;
|
||||
let community = learn && room >= learn_end + 10.0 + w.gap + w.community;
|
||||
RightGroup { switcher, switcher_w, search, learn, community }
|
||||
}
|
||||
|
||||
/// The app bar's search field: a button drawn as a field. The command palette's popup holds the
|
||||
/// only text field.
|
||||
struct SearchField {
|
||||
hint: Arc<egui::Galley>,
|
||||
/// The palette's shortcut as the menus show it; none when the user cleared it.
|
||||
shortcut: Option<String>,
|
||||
key: Option<Arc<egui::Galley>>,
|
||||
width: f32,
|
||||
}
|
||||
|
||||
impl SearchField {
|
||||
/// Space from the field's left edge to the hint text (the magnifier sits in it).
|
||||
const TEXT_LEFT: f32 = 26.0;
|
||||
/// The widest the field gets.
|
||||
const MAX_WIDTH: f32 = 220.0;
|
||||
|
||||
fn new(ui: &Ui, t: &Tokens, shortcut: Option<String>) -> SearchField {
|
||||
let hint = ui.painter().layout_no_wrap(tl!("Search commands").to_string(), egui::FontId::proportional(12.0), t.text_dim);
|
||||
let text_w = Self::TEXT_LEFT + hint.size().x + 8.0;
|
||||
// A shortcut that leaves no room for the hint in the widest field is left to the tooltip.
|
||||
let key = shortcut
|
||||
.as_ref()
|
||||
.map(|s| ui.painter().layout_no_wrap(s.clone(), egui::FontId::proportional(11.0), t.text_dim))
|
||||
.filter(|k| text_w + 12.0 + k.size().x <= Self::MAX_WIDTH);
|
||||
let key_w = key.as_ref().map_or(0.0, |k| 12.0 + k.size().x);
|
||||
let width = (text_w + key_w + 24.0).clamp(120.0, Self::MAX_WIDTH);
|
||||
SearchField { hint, shortcut, key, width }
|
||||
}
|
||||
|
||||
/// Draws the field. A click, or Enter or Space with the keyboard on it, clicks it. Screen
|
||||
/// readers get a button called `name`, and hovering it shows `tip`.
|
||||
fn show(self, ui: &mut Ui, t: &Tokens, name: &str, tip: &str, open: bool) -> egui::Response {
|
||||
let (r, resp) = ui.allocate_exact_size(vec2(self.width, WIDGET_H), Sense::click());
|
||||
let fill = if open {
|
||||
t.tool_active
|
||||
} else if resp.hovered() {
|
||||
t.hover
|
||||
} else {
|
||||
t.input
|
||||
};
|
||||
let border = if resp.has_focus() { t.accent } else { t.input_border };
|
||||
ui.painter().rect(r, CornerRadius::same(4), fill, Stroke::new(1.0, border), egui::StrokeKind::Inside);
|
||||
icons::paint(ui, "search", egui::Rect::from_center_size(r.left_center() + vec2(14.0, 0.0), vec2(14.0, 14.0)), t.icon);
|
||||
let mut text_right = r.right() - 8.0;
|
||||
if let Some(key) = self.key {
|
||||
let at = egui::pos2(text_right - key.size().x, r.center().y - key.size().y / 2.0);
|
||||
text_right = at.x - 12.0;
|
||||
ui.painter().with_clip_rect(r).galley(at, key, t.text_dim);
|
||||
}
|
||||
let clip = egui::Rect::from_min_max(r.min, egui::pos2(text_right.max(r.left()), r.bottom()));
|
||||
let at = egui::pos2(r.left() + Self::TEXT_LEFT, r.center().y - self.hint.size().y / 2.0);
|
||||
ui.painter().with_clip_rect(clip).galley(at, self.hint, t.text_dim);
|
||||
resp.widget_info(|| widgets::icon_button_info(ui.is_enabled(), open, name));
|
||||
resp.on_hover_text(tip)
|
||||
}
|
||||
}
|
||||
|
||||
/// Whether the window shows the system's title bar instead of the app drawing its own
|
||||
/// ([`VectorcraftApp::desktop_frame`]): Windows with Preferences › User Interface › System Title
|
||||
/// Bar, and Linux whenever the desktop draws the frame, with or without the preference. The
|
||||
|
||||
@@ -159,6 +159,412 @@ fn hints_name_keys_as_the_menus_do() {
|
||||
}
|
||||
}
|
||||
|
||||
/// The widths of the app bar's right-hand group used by the fitting tests.
|
||||
fn right_widths(room: f32, safe_mode: bool) -> super::RightWidths {
|
||||
super::RightWidths { room, safe_mode, switcher: 150.0, field: 170.0, icon: 28.0, gap: 8.0, community: 80.0 }
|
||||
}
|
||||
|
||||
/// What the group shows, in words, with the switcher's width as full, narrower or minimal.
|
||||
fn right_stage(g: &super::RightGroup) -> String {
|
||||
let switcher = match g.switcher_w {
|
||||
_ if !g.switcher => "no switcher",
|
||||
w if w >= 150.0 => "full switcher",
|
||||
w if w > super::MIN_SWITCHER => "narrower switcher",
|
||||
_ => "minimal switcher",
|
||||
};
|
||||
format!("community {}, learn {}, {:?}, {switcher}", g.community, g.learn, g.search)
|
||||
}
|
||||
|
||||
/// As the app bar's room runs short, the community button goes first, then Explore tutorials, then the search
|
||||
/// field becomes the icon, then the workspace switcher narrows to its minimum, then the icon goes.
|
||||
/// Whatever shows fits in the room, down to the minimal switcher alone.
|
||||
#[test]
|
||||
fn the_app_bar_gives_up_its_right_hand_controls_in_order() {
|
||||
let mut stages: Vec<String> = Vec::new();
|
||||
for room in (0..=700).rev().map(|r| r as f32) {
|
||||
let w = right_widths(room, false);
|
||||
let g = super::fit_right_group(&w);
|
||||
let stage = right_stage(&g);
|
||||
if stages.last() != Some(&stage) {
|
||||
stages.push(stage);
|
||||
}
|
||||
let search = match g.search {
|
||||
super::Search::Field => w.gap + w.field,
|
||||
super::Search::Icon => w.gap + w.icon,
|
||||
super::Search::Hidden => 0.0,
|
||||
};
|
||||
let learn = if g.learn { w.gap + w.icon } else { 0.0 };
|
||||
let community = if g.community { 10.0 + w.gap + w.community } else { 0.0 };
|
||||
let used = g.switcher_w + 8.0 + search + learn + community;
|
||||
assert!(used <= room || g.switcher_w == super::MIN_SWITCHER && g.search == super::Search::Hidden, "{room}: {g:?} needs {used}");
|
||||
}
|
||||
assert_eq!(
|
||||
stages,
|
||||
[
|
||||
"community true, learn true, Field, full switcher",
|
||||
"community false, learn true, Field, full switcher",
|
||||
"community false, learn false, Field, full switcher",
|
||||
"community false, learn false, Icon, full switcher",
|
||||
"community false, learn false, Icon, narrower switcher",
|
||||
"community false, learn false, Icon, minimal switcher",
|
||||
// Once the icon has gone, the switcher takes the room it leaves.
|
||||
"community false, learn false, Hidden, narrower switcher",
|
||||
"community false, learn false, Hidden, minimal switcher",
|
||||
]
|
||||
);
|
||||
// In Safe Mode the label's width is taken first (not counted in `room`), and the switcher goes
|
||||
// when a minimal one does not fit.
|
||||
let safe = |room| right_stage(&super::fit_right_group(&right_widths(room, true)));
|
||||
assert_eq!(safe(700.0), "community true, learn true, Field, full switcher");
|
||||
assert_eq!(safe(72.0), "community false, learn false, Hidden, minimal switcher");
|
||||
assert_eq!(safe(71.0), "community false, learn false, Hidden, no switcher");
|
||||
}
|
||||
|
||||
/// What screen readers call the app bar's search field, and the icon it becomes, before the shortcut.
|
||||
const SEARCH_NAME: &str = "Search commands";
|
||||
|
||||
/// A native menu bar that draws nothing.
|
||||
struct NoMenus;
|
||||
impl crate::native_menu::Backend for NoMenus {
|
||||
fn sync(&mut self, _: &crate::native_menu::MenuBar) {}
|
||||
fn drain(&mut self) -> Vec<crate::native_menu::Event> {
|
||||
Vec::new()
|
||||
}
|
||||
}
|
||||
|
||||
/// The app bar drawn alone, `width` points wide.
|
||||
struct AppBar {
|
||||
app: crate::VectorcraftApp,
|
||||
ctx: egui::Context,
|
||||
width: f32,
|
||||
/// Handle the app's keys before the bar and show the command palette after it, as the app's
|
||||
/// frame does. Off, Tab moves the keyboard focus through the bar's controls, as with a screen
|
||||
/// reader.
|
||||
keys: bool,
|
||||
}
|
||||
|
||||
/// The app bar's search control, as a screen reader and the painter see it.
|
||||
#[derive(Debug)]
|
||||
struct SearchSeen {
|
||||
name: String,
|
||||
rect: egui::Rect,
|
||||
texts: Vec<String>,
|
||||
}
|
||||
|
||||
impl AppBar {
|
||||
fn new(width: f32) -> AppBar {
|
||||
crate::i18n::set_current(crate::i18n::Lang::EN);
|
||||
let ctx = egui::Context::default();
|
||||
ctx.enable_accesskit();
|
||||
crate::theme::install_fonts(&ctx);
|
||||
let app = crate::VectorcraftApp::new(Session::new(), Default::default());
|
||||
crate::shortcut_editor::sync(&app.ui);
|
||||
AppBar { app, ctx, width, keys: false }
|
||||
}
|
||||
|
||||
/// One frame; the accessibility nodes and the texts painted, with where each is.
|
||||
fn frame(&mut self, events: Vec<egui::Event>) -> (Vec<egui::accesskit::Node>, Vec<(String, egui::Rect)>) {
|
||||
fn walk(s: &egui::Shape, v: &mut Vec<(String, egui::Rect)>) {
|
||||
match s {
|
||||
egui::Shape::Text(t) => v.push((t.galley.text().to_string(), egui::Rect::from_min_size(t.pos, t.galley.size()))),
|
||||
egui::Shape::Vec(s) => s.iter().for_each(|s| walk(s, v)),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
let screen = egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(self.width, 600.0));
|
||||
let (app, keys) = (&mut self.app, self.keys);
|
||||
let mut out = self.ctx.run_ui(egui::RawInput { events, screen_rect: Some(screen), ..Default::default() }, |ui| {
|
||||
if keys {
|
||||
crate::shortcuts::handle(app, ui.ctx());
|
||||
}
|
||||
super::app_bar(app, ui);
|
||||
if keys {
|
||||
crate::palette::show(app, ui.ctx());
|
||||
}
|
||||
});
|
||||
out.textures_delta.clear();
|
||||
let mut texts = vec![];
|
||||
out.shapes.iter().for_each(|c| walk(&c.shape, &mut texts));
|
||||
(out.platform_output.accesskit_update.map(|u| u.nodes.into_iter().map(|(_, n)| n).collect()).unwrap_or_default(), texts)
|
||||
}
|
||||
|
||||
/// The search control after two frames, if the bar shows it.
|
||||
fn search(&mut self) -> Option<SearchSeen> {
|
||||
self.frame(vec![]);
|
||||
let (nodes, texts) = self.frame(vec![]);
|
||||
let node = nodes.iter().find(|n| n.label().is_some_and(|l| l.starts_with(SEARCH_NAME)))?;
|
||||
let b = node.bounds()?;
|
||||
let rect = egui::Rect::from_min_max(egui::pos2(b.x0 as f32, b.y0 as f32), egui::pos2(b.x1 as f32, b.y1 as f32));
|
||||
// Without the icon set loaded, a test frame draws an icon as a warning sign; leave it out.
|
||||
let mut texts: Vec<(String, egui::Rect)> =
|
||||
texts.into_iter().filter(|(t, r)| rect.expand(0.5).contains_rect(*r) && !t.starts_with('\u{26a0}')).collect();
|
||||
texts.sort_by(|a, b| a.1.left().total_cmp(&b.1.left()));
|
||||
let texts = texts.into_iter().map(|(t, _)| t).collect();
|
||||
Some(SearchSeen { name: node.label().unwrap_or_default().to_string(), rect, texts })
|
||||
}
|
||||
|
||||
/// Where the in-window menus end: the right edge of the Help menu's title, if the bar shows it.
|
||||
fn menus_end(&mut self) -> Option<f32> {
|
||||
self.frame(vec![]);
|
||||
let nodes = self.frame(vec![]).0;
|
||||
nodes.iter().filter(|n| n.label() == Some("Help")).filter_map(|n| n.bounds()).map(|b| b.x1 as f32).reduce(f32::max)
|
||||
}
|
||||
|
||||
fn has(&mut self, name: &str) -> bool {
|
||||
self.frame(vec![]);
|
||||
self.frame(vec![]).0.iter().any(|n| n.label() == Some(name))
|
||||
}
|
||||
|
||||
fn click(&mut self, at: egui::Pos2) {
|
||||
let press = |pressed| egui::Event::PointerButton { pos: at, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() };
|
||||
self.frame(vec![egui::Event::PointerMoved(at), press(true)]);
|
||||
self.frame(vec![press(false)]);
|
||||
}
|
||||
|
||||
/// Whether the widget at `rect` has the keyboard focus.
|
||||
fn focused_at(&self, rect: egui::Rect) -> bool {
|
||||
self.ctx.memory(|m| m.focused()).and_then(|id| self.ctx.read_response(id)).is_some_and(|r| r.rect == rect)
|
||||
}
|
||||
|
||||
/// A press and release of `key`; Space also types a space, as a keyboard does.
|
||||
fn key(&mut self, key: egui::Key) {
|
||||
let event = |pressed| egui::Event::Key { key, physical_key: None, pressed, repeat: false, modifiers: Default::default() };
|
||||
let mut press = vec![event(true)];
|
||||
if key == egui::Key::Space {
|
||||
press.push(egui::Event::Text(" ".into()));
|
||||
}
|
||||
self.frame(press);
|
||||
self.frame(vec![event(false)]);
|
||||
}
|
||||
}
|
||||
|
||||
/// A wide app bar shows a search field with the palette's shortcut in it, and screen readers get a
|
||||
/// button named [`SEARCH_NAME`] with the shortcut.
|
||||
#[test]
|
||||
fn a_wide_app_bar_shows_a_search_field_with_the_palette_shortcut() {
|
||||
let mut bar = AppBar::new(1400.0);
|
||||
let shortcut = crate::menus::shown_shortcut("Cmd+Shift+/");
|
||||
let seen = bar.search().expect("the search field shows");
|
||||
assert_eq!(seen.name, format!("{SEARCH_NAME} ({shortcut})"));
|
||||
assert!(seen.rect.width() >= 120.0 && seen.rect.width() <= 220.0, "a field, not the 28-point icon: {seen:?}");
|
||||
assert_eq!(seen.texts, [SEARCH_NAME.to_string(), shortcut], "{seen:?}");
|
||||
assert!(bar.has("Explore tutorials"));
|
||||
}
|
||||
|
||||
/// The field shows the palette's shortcut as the user set it, and no shortcut once it is cleared.
|
||||
#[test]
|
||||
fn the_search_field_follows_the_palettes_shortcut() {
|
||||
let mut bar = AppBar::new(1400.0);
|
||||
crate::keymap::set_override(&mut bar.app.ui.shortcut_overrides, "help.commandPalette", "Alt+F9");
|
||||
crate::shortcut_editor::sync(&bar.app.ui);
|
||||
let rebound = crate::menus::shown_shortcut("Alt+F9");
|
||||
let seen = bar.search().expect("the search field shows");
|
||||
assert_eq!(seen.name, format!("{SEARCH_NAME} ({rebound})"));
|
||||
assert_eq!(seen.texts, [SEARCH_NAME.to_string(), rebound], "{seen:?}");
|
||||
crate::keymap::set_override(&mut bar.app.ui.shortcut_overrides, "help.commandPalette", "");
|
||||
crate::shortcut_editor::sync(&bar.app.ui);
|
||||
let seen = bar.search().expect("the search field shows");
|
||||
assert_eq!(seen.name, SEARCH_NAME);
|
||||
assert_eq!(seen.texts, [SEARCH_NAME], "{seen:?}");
|
||||
bar.app.ui.shortcut_overrides.clear();
|
||||
crate::shortcut_editor::sync(&bar.app.ui);
|
||||
}
|
||||
|
||||
/// A shortcut too long to sit beside "Search commands" in the widest field is left to the tooltip
|
||||
/// and the screen-reader name, and "Search commands" stays readable.
|
||||
#[test]
|
||||
fn a_long_shortcut_leaves_the_search_hint_readable() {
|
||||
crate::i18n::set_current(crate::i18n::Lang::EN);
|
||||
let ctx = egui::Context::default();
|
||||
crate::theme::install_fonts(&ctx);
|
||||
let long = format!("Ctrl+Alt+Shift+{}", "PageDown".repeat(4));
|
||||
let mut fields = vec![];
|
||||
for _ in 0..2 {
|
||||
let mut out = ctx.run_ui(egui::RawInput::default(), |ui| {
|
||||
let t = Tokens::get(ui.ctx());
|
||||
fields = [Some("Ctrl+Shift+/".to_string()), Some(long.clone()), None]
|
||||
.into_iter()
|
||||
.map(|s| {
|
||||
let f = super::SearchField::new(ui, &t, s);
|
||||
(f.width, f.hint.size().x, f.key.as_ref().map(|k| k.size().x), f.shortcut.clone())
|
||||
})
|
||||
.collect();
|
||||
});
|
||||
out.textures_delta.clear();
|
||||
}
|
||||
let [(short_w, hint, short_key, _), (long_w, _, long_key, long_shortcut), (none_w, _, none_key, _)] = &fields[..] else {
|
||||
panic!("three fields: {fields:?}");
|
||||
};
|
||||
let short_key = short_key.expect("a short shortcut is shown");
|
||||
assert!(*short_w <= 220.0 && 26.0 + hint + 12.0 + short_key + 8.0 <= *short_w, "the hint and the shortcut fit side by side: {fields:?}");
|
||||
assert_eq!((*long_key, long_shortcut.as_deref()), (None, Some(long.as_str())), "a long one is left to the tooltip and the name");
|
||||
assert!(*long_w <= 220.0 && 26.0 + hint + 8.0 <= *long_w, "{fields:?}");
|
||||
assert!(none_key.is_none() && *none_w >= 120.0, "{fields:?}");
|
||||
}
|
||||
|
||||
/// A click on the field, or on the icon it becomes in a narrow bar, opens the command palette with an
|
||||
/// empty query, and a second click closes it, as the palette's shortcut does. While a dialog is open
|
||||
/// neither does anything, as the shortcut does.
|
||||
#[test]
|
||||
fn a_click_on_the_search_field_opens_the_palette() {
|
||||
for icon in [false, true] {
|
||||
let mut bar = AppBar::new(1400.0);
|
||||
if icon {
|
||||
let narrow = (300..1400).rev().step_by(10).find(|w| {
|
||||
bar.width = *w as f32;
|
||||
bar.search().is_some_and(|s| s.rect.width() == 28.0)
|
||||
});
|
||||
assert!(narrow.is_some(), "a narrow bar shows the icon");
|
||||
}
|
||||
let at = bar.search().expect("the search control shows").rect.center();
|
||||
bar.app.ui.palette_query = "old".into();
|
||||
bar.click(at);
|
||||
assert!(bar.app.ui.palette_open, "icon: {icon}");
|
||||
assert_eq!(bar.app.ui.palette_query, "", "icon: {icon}");
|
||||
bar.app.ui.palette_query = "typed".into();
|
||||
bar.click(at);
|
||||
assert!(!bar.app.ui.palette_open, "a second click closes it (icon: {icon})");
|
||||
assert_eq!(bar.app.ui.palette_query, "", "icon: {icon}");
|
||||
bar.app.ui.dialog = Some(crate::state::Dialog::new("about", json!({})));
|
||||
bar.click(at);
|
||||
assert!(!bar.app.ui.palette_open, "not over a dialog (icon: {icon})");
|
||||
}
|
||||
}
|
||||
|
||||
/// The icon a narrow bar shows has the field's screen-reader name, and while a dialog is open screen
|
||||
/// readers find the field and the icon disabled.
|
||||
#[test]
|
||||
fn the_search_icon_has_the_fields_name_and_both_are_disabled_under_a_dialog() {
|
||||
let shortcut = crate::menus::shown_shortcut("Cmd+Shift+/");
|
||||
for icon in [false, true] {
|
||||
let mut bar = AppBar::new(1400.0);
|
||||
if icon {
|
||||
let narrow = (300..1400).rev().step_by(10).find(|w| {
|
||||
bar.width = *w as f32;
|
||||
bar.search().is_some_and(|s| s.rect.width() == 28.0)
|
||||
});
|
||||
assert!(narrow.is_some(), "a narrow bar shows the icon");
|
||||
}
|
||||
let disabled = |bar: &mut AppBar| {
|
||||
bar.frame(vec![]);
|
||||
let nodes = bar.frame(vec![]).0;
|
||||
let node = nodes.iter().find(|n| n.label().is_some_and(|l| l.starts_with(SEARCH_NAME))).expect("the search control shows");
|
||||
(node.label().unwrap_or_default().to_string(), node.is_disabled())
|
||||
};
|
||||
assert_eq!(disabled(&mut bar), (format!("{SEARCH_NAME} ({shortcut})"), false), "icon: {icon}");
|
||||
bar.app.ui.dialog = Some(crate::state::Dialog::new("about", json!({})));
|
||||
assert_eq!(disabled(&mut bar), (format!("{SEARCH_NAME} ({shortcut})"), true), "icon: {icon}");
|
||||
}
|
||||
}
|
||||
|
||||
/// The keyboard focus reaches the field, Enter or Space opens the palette and does nothing else, and
|
||||
/// Tab then moves the focus on. This holds with the app's keys handled, the palette drawn after the
|
||||
/// bar, a document open, and an object selected with the Selection tool, whose Enter otherwise
|
||||
/// opens Move. In the app, Tab with no field focused shows and hides the panels instead of moving
|
||||
/// the focus, so the focus reaches the bar the way a screen reader moves it.
|
||||
#[test]
|
||||
fn the_keyboard_opens_the_palette_from_the_search_field() {
|
||||
let cases =
|
||||
[(egui::Key::Enter, 0), (egui::Key::Space, 0), (egui::Key::Enter, 1), (egui::Key::Space, 1), (egui::Key::Enter, 2), (egui::Key::Space, 2)];
|
||||
for (key, setup) in cases {
|
||||
let document = setup > 0;
|
||||
let mut bar = AppBar::new(1400.0);
|
||||
let field = bar.search().expect("the search field shows").rect;
|
||||
assert!(field.width() >= 120.0, "a field, not the icon: {field:?}");
|
||||
let mut reached = false;
|
||||
for _ in 0..40 {
|
||||
bar.key(egui::Key::Tab);
|
||||
if bar.focused_at(field) {
|
||||
reached = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
assert!(reached, "Tab reaches the search field");
|
||||
bar.keys = true;
|
||||
if document {
|
||||
bar.app.run("file.new", json!({"width": 100, "height": 100})).unwrap();
|
||||
}
|
||||
if setup == 2 {
|
||||
let id = bar.app.session.execute("shape.rectangle", &json!({"x": 10, "y": 10, "width": 50, "height": 30})).unwrap()["id"].clone();
|
||||
bar.app.select_tool("selection");
|
||||
bar.app.session.execute("select.set", &json!({"ids": [id]})).unwrap();
|
||||
}
|
||||
// The app's keys leave the focus on the field.
|
||||
bar.frame(vec![]);
|
||||
assert!(bar.focused_at(field), "{key:?} (setup {setup})");
|
||||
assert!(!bar.app.ui.palette_open);
|
||||
let status = bar.app.ui.status.clone();
|
||||
bar.key(key);
|
||||
// The key opens the palette and goes no further: it does not pick the first result, type a
|
||||
// space into the palette's field or open Move.
|
||||
assert!(bar.app.ui.palette_open, "{key:?} opens the palette (setup {setup})");
|
||||
assert!(bar.app.ui.dialog.is_none(), "{key:?} opened no dialog (setup {setup})");
|
||||
assert_eq!(bar.app.ui.palette_query, "", "{key:?} (setup {setup})");
|
||||
assert!(bar.app.ui.recent_commands.is_empty() && bar.app.ui.status == status, "{key:?} ran nothing (setup {setup})");
|
||||
}
|
||||
// Tab moves the focus off the field with the app's keys handled.
|
||||
let mut bar = AppBar::new(1400.0);
|
||||
let field = bar.search().expect("the search field shows").rect;
|
||||
for _ in 0..40 {
|
||||
if bar.focused_at(field) {
|
||||
break;
|
||||
}
|
||||
bar.key(egui::Key::Tab);
|
||||
}
|
||||
assert!(bar.focused_at(field), "Tab reaches the search field at {field:?}");
|
||||
bar.keys = true;
|
||||
let panels = (bar.app.ui.dock, bar.app.ui.toolbar);
|
||||
bar.key(egui::Key::Tab);
|
||||
assert!(!bar.focused_at(field), "Tab leaves the field");
|
||||
assert_eq!((bar.app.ui.dock, bar.app.ui.toolbar), panels, "Tab on the field does not hide the panels");
|
||||
}
|
||||
|
||||
/// As the window narrows, the search field becomes the icon after Explore tutorials has gone and
|
||||
/// before the icon goes, never overlapping the menus: with a long workspace name, with the menus in
|
||||
/// the system's menu bar, and with the window's own caption buttons.
|
||||
#[test]
|
||||
fn a_narrowing_app_bar_turns_the_search_field_into_the_icon() {
|
||||
for case in ["default", "long workspace name", "native menus", "caption buttons"] {
|
||||
let mut bar = AppBar::new(1400.0);
|
||||
match case {
|
||||
"long workspace name" => bar.app.ui.workspace = "A workspace with a very long name indeed".into(),
|
||||
"native menus" => bar.app.services.native_menu = Some(crate::native_menu::NativeMenu::new(Box::new(NoMenus))),
|
||||
"caption buttons" => bar.app.custom_titlebar = true,
|
||||
_ => {}
|
||||
}
|
||||
assert_eq!(bar.menus_end().is_some(), case != "native menus", "{case}: the in-window menus show");
|
||||
// 0: gone, 1: icon, 2: field.
|
||||
let mut last = 2;
|
||||
let mut seen_icon = false;
|
||||
for width in (300..=1400).rev().step_by(10) {
|
||||
bar.width = width as f32;
|
||||
let learn = bar.has("Explore tutorials");
|
||||
let search = bar.search();
|
||||
let now = match &search {
|
||||
Some(s) if s.rect.width() >= 120.0 => 2,
|
||||
Some(s) => {
|
||||
assert_eq!(s.rect.width(), 28.0, "{case} at {width}");
|
||||
assert!(s.texts.is_empty(), "the icon has no text: {case} at {width}");
|
||||
1
|
||||
}
|
||||
None => 0,
|
||||
};
|
||||
assert!(width < 1400 || now == 2, "{case}: a wide bar shows the field");
|
||||
assert!(now <= last, "{case} at {width}: the search came back as the bar narrowed");
|
||||
assert!(!learn || now == 2, "{case} at {width}: Explore tutorials outlasted the field");
|
||||
if let Some(s) = &search {
|
||||
assert!(s.rect.right() <= width as f32, "{case} at {width}: {s:?}");
|
||||
if let Some(menus_end) = bar.menus_end() {
|
||||
assert!(s.rect.left() >= menus_end, "{case} at {width}: the search overlaps the menus ending at {menus_end}: {s:?}");
|
||||
}
|
||||
}
|
||||
seen_icon |= now == 1;
|
||||
last = now;
|
||||
}
|
||||
assert!(seen_icon, "{case}: the field becomes the icon before it goes");
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct StatusText {
|
||||
text: String,
|
||||
|
||||
@@ -789,6 +789,27 @@ pub fn os_cursors(build: bool, wayland: bool) -> bool {
|
||||
build && !wayland
|
||||
}
|
||||
|
||||
/// The cursor a panel shows where a click or a drop adds something, such as a stop under the
|
||||
/// Gradient panel's ramp or a copy of rows Alt-dragged in the Layers panel (#8217): the white arrow
|
||||
/// with a plus that Group Selection shows for a click that adds the next group. Windows has no system copy cursor (winit shows the plain arrow for
|
||||
/// `CursorIcon::Copy`), so where the window shows glyphs as OS cursors ([`os_cursors`]) the panel
|
||||
/// hands it this glyph; elsewhere (macOS, Wayland, the web, `VECTORCRAFT_SYSTEM_CURSORS`) the
|
||||
/// system's copy cursor shows (#8241). Set every frame it shows: the canvas and egui reset it.
|
||||
pub(crate) fn set_add_cursor(app: &mut crate::VectorcraftApp, ctx: &egui::Context) {
|
||||
ctx.set_cursor_icon(egui::CursorIcon::Copy);
|
||||
if add_cursor_is_a_glyph(app) {
|
||||
// As the canvas sizes its glyphs (User Interface › Scale Cursor Proportional to UI).
|
||||
let ui_scale = if app.session.prefs.scale_cursor_with_ui { 1.0 } else { ctx.zoom_factor() };
|
||||
ctx.set_cursor_image(app.canvas.cursors.get(Cursor::GroupSelection, ctx.pixels_per_point() / ui_scale));
|
||||
}
|
||||
}
|
||||
|
||||
/// Does [`set_add_cursor`] hand the OS its glyph (rather than ask for the system copy cursor)?
|
||||
/// Where the window shows glyphs as OS cursors, unless `VECTORCRAFT_SYSTEM_CURSORS` opts out.
|
||||
pub(crate) fn add_cursor_is_a_glyph(app: &crate::VectorcraftApp) -> bool {
|
||||
std::env::var_os("VECTORCRAFT_SYSTEM_CURSORS").is_none() && os_cursors(OS_CURSORS, app.services.wayland)
|
||||
}
|
||||
|
||||
/// Does the window hide the pointer only while it is the key window? macOS does: winit hides it with
|
||||
/// a cursor rect holding a transparent cursor, and macOS applies the rect only in the key window.
|
||||
/// Over a window behind another app or under a sheet, the system pointer shows (#2020).
|
||||
|
||||
@@ -180,6 +180,9 @@ use crate::{VectorcraftApp, widgets};
|
||||
|
||||
type DialogResult = Result<Value, String>;
|
||||
|
||||
/// A dialog's Reset ([`DialogSpec::reset`]).
|
||||
type ResetFn = fn(&VectorcraftApp, &mut Dialog) -> Result<(), String>;
|
||||
|
||||
/// The shared dialog frame's inner margin, and the least room it leaves at the window's edges.
|
||||
const MARGIN: i8 = 22;
|
||||
const EDGE_GAP: f32 = 8.0;
|
||||
@@ -220,8 +223,8 @@ pub(crate) struct DialogSpec {
|
||||
pub alternate: Option<(&'static str, &'static str)>,
|
||||
/// Puts the fields back to their defaults. While Alt (Option on macOS) is held, the Cancel
|
||||
/// button of a dialog with an `ok` reads Reset; Reset (or `ui.dialogReset`) runs this and the
|
||||
/// dialog stays open.
|
||||
pub reset: Option<fn(&VectorcraftApp, &mut Dialog)>,
|
||||
/// dialog stays open. An error leaves the dialog as it was.
|
||||
pub reset: Option<ResetFn>,
|
||||
pub min_width: f32,
|
||||
pub max_width: Option<f32>,
|
||||
/// The body runs a live preview interaction that Cancel rolls back.
|
||||
@@ -730,12 +733,12 @@ pub(crate) fn can_reset(app: &VectorcraftApp) -> bool {
|
||||
}
|
||||
|
||||
/// Reset (`ui.dialogReset`, or Cancel while Alt or Option is held): the open dialog's fields go
|
||||
/// back to their defaults and it stays open → the dialog; an error when no dialog is open or the
|
||||
/// open one has no Reset.
|
||||
/// back to their defaults and it stays open → the dialog; an error when no dialog is open, the
|
||||
/// open one has no Reset, or its Reset fails (the dialog is then left as it was).
|
||||
pub(crate) fn reset(app: &mut VectorcraftApp) -> DialogResult {
|
||||
let Some(mut d) = app.ui.dialog.clone() else { return Err("no dialog open".into()) };
|
||||
let Some(reset) = spec(&d.kind).reset else { return Err("the open dialog has no Reset".into()) };
|
||||
reset(app, &mut d);
|
||||
reset(app, &mut d)?;
|
||||
let out = serde_json::to_value(&d).unwrap_or_default();
|
||||
app.ui.dialog = Some(d);
|
||||
Ok(out)
|
||||
|
||||
@@ -201,10 +201,35 @@ fn choices(command: &str, key: &str) -> Option<form::Choices> {
|
||||
(crate::addons::pathtools::COMMON_TANGENTS, "tangents") => Some(crate::addons::pathtools::TANGENT_KINDS),
|
||||
(crate::addons::image::REMOVE_BACKGROUND | crate::addons::image::COLOR_MASK, "background") => Some(crate::addons::image::BACKGROUNDS),
|
||||
(crate::addons::image::REMOVE_BACKGROUND | crate::addons::image::COLOR_MASK, "match") => Some(crate::addons::image::MATCHES),
|
||||
("object.rasterize", "antiAlias") => Some(RASTERIZE_ANTI_ALIAS),
|
||||
("object.rasterize", "background") => Some(RASTERIZE_BACKGROUNDS),
|
||||
("object.mesh.create", "appearance") => Some(MESH_APPEARANCES),
|
||||
("object.repeat.options", "gridType") => Some(REPEAT_GRID_TYPES),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Object › Rasterize › Anti-aliasing: the modes `vectorcraft_render::AntiAlias` names, with its
|
||||
/// labels, as the Rasterize effect's dialog lists them (`effect.rs`, `own_choices`).
|
||||
const RASTERIZE_ANTI_ALIAS: form::Choices = &[("None", "none"), ("Art Optimized", "art"), ("Type Optimized", "type")];
|
||||
|
||||
/// Object › Rasterize › Background, as Document Raster Effects Settings and the Rasterize effect
|
||||
/// list it. A color the command was given another way (black, a hex color) shows as it is.
|
||||
const RASTERIZE_BACKGROUNDS: form::Choices = &[("White", "white"), ("Transparent", "transparent")];
|
||||
|
||||
/// Object › Create Gradient Mesh › Appearance: the values `object.mesh.create` takes.
|
||||
const MESH_APPEARANCES: form::Choices = &[("Flat", "flat"), ("To Center", "center"), ("To Edge", "edge")];
|
||||
|
||||
/// Repeat Options › Grid Type of a grid repeat: the tile types, labeled as the Pattern Options
|
||||
/// panel labels them (`panels/pattern_options.rs`, `TILE_LABELS`).
|
||||
const REPEAT_GRID_TYPES: form::Choices = &[
|
||||
("Grid", "grid"),
|
||||
("Brick by Row", "brickByRow"),
|
||||
("Brick by Column", "brickByColumn"),
|
||||
("Hex by Column", "hexByColumn"),
|
||||
("Hex by Row", "hexByRow"),
|
||||
];
|
||||
|
||||
/// Object › Rasterize › Color Model: the values `object.rasterize` takes, the document's own
|
||||
/// colour model first (#5660).
|
||||
fn rasterize_color_models(command: &str, key: &str, cmyk: bool) -> Option<form::Choices> {
|
||||
@@ -688,4 +713,147 @@ mod tests {
|
||||
h.event(egui::Event::PointerButton { pos: ok, button, pressed: false, modifiers });
|
||||
h.run_steps(3);
|
||||
}
|
||||
|
||||
/// The dialog that is open in `app`, drawn by a kittest harness (the first frame installs the
|
||||
/// fonts).
|
||||
fn dialog_harness(app: VectorcraftApp) -> egui_kittest::Harness<'static, VectorcraftApp> {
|
||||
let mut fonts = false;
|
||||
let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(1100.0, 900.0)).build_ui_state(
|
||||
move |ui, app: &mut VectorcraftApp| {
|
||||
if !std::mem::replace(&mut fonts, true) {
|
||||
crate::theme::install_fonts(ui.ctx());
|
||||
return;
|
||||
}
|
||||
crate::dialogs::show(app, ui.ctx());
|
||||
},
|
||||
app,
|
||||
);
|
||||
h.run_steps(5);
|
||||
h
|
||||
}
|
||||
|
||||
/// Opens the dropdown labeled `label` and picks `choice` in it: the field must be a dropdown,
|
||||
/// not a text field.
|
||||
fn pick(h: &mut egui_kittest::Harness<'_, VectorcraftApp>, label: &str, choice: &str) {
|
||||
use egui::accesskit::Role;
|
||||
use egui_kittest::kittest::Queryable;
|
||||
assert!(h.query_by_role_and_label(Role::TextInput, label).is_none(), "{label} is not a text field");
|
||||
h.get_by_role_and_label(Role::ComboBox, label).click();
|
||||
h.run_steps(3);
|
||||
h.get_by_label(choice).click();
|
||||
h.run_steps(3);
|
||||
}
|
||||
|
||||
/// The choices this dialog lists for Rasterize, Create Gradient Mesh and Repeat Options are the
|
||||
/// values their commands take (#8020, #7991): each one runs, and every language with complete
|
||||
/// menus has a row for each label.
|
||||
#[test]
|
||||
fn choice_fields_list_the_values_their_commands_take() {
|
||||
use vectorcraft_doc::pattern::TileType;
|
||||
use vectorcraft_render::AntiAlias;
|
||||
let listed = |command: &str, key: &str| choices(command, key).unwrap_or_else(|| panic!("{command} {key}: a choice"));
|
||||
let aa: Vec<(&str, &str)> = AntiAlias::ALL.iter().map(|a| (a.label(), a.id())).collect();
|
||||
assert_eq!(listed("object.rasterize", "antiAlias"), aa.as_slice());
|
||||
for (_, value) in listed("object.rasterize", "background") {
|
||||
assert!(vectorcraft_doc::Background::parse(value).is_some(), "{value}");
|
||||
}
|
||||
for (label, value) in listed("object.repeat.options", "gridType") {
|
||||
let tile = TileType::parse(value, None).unwrap_or_else(|| panic!("{value}"));
|
||||
assert_eq!((tile.id(), tile.label()), (*value, *label));
|
||||
}
|
||||
let run = |command: &str, key: &str, value: &str| {
|
||||
let mut s = Session::new();
|
||||
s.execute("file.new", &json!({"width": 100, "height": 100})).unwrap();
|
||||
let id = s.execute("shape.rectangle", &json!({"x": 10, "y": 10, "width": 20, "height": 20})).unwrap()["id"].clone();
|
||||
if command == "object.repeat.options" {
|
||||
s.execute("object.repeat.grid", &json!({"ids": [id], "rows": 2, "cols": 2})).unwrap();
|
||||
}
|
||||
s.execute(command, &json!({ key: value })).unwrap_or_else(|e| panic!("{command} {key} {value}: {e}"));
|
||||
};
|
||||
let fields = [
|
||||
("object.rasterize", "antiAlias"),
|
||||
("object.rasterize", "background"),
|
||||
("object.mesh.create", "appearance"),
|
||||
("object.repeat.options", "gridType"),
|
||||
];
|
||||
for (command, key) in fields {
|
||||
for (label, value) in listed(command, key) {
|
||||
run(command, key, value);
|
||||
for lang in crate::i18n::Lang::all().filter(|l| l.complete_menus()) {
|
||||
assert!(crate::i18n::has(lang, label), "{}: {label}", lang.code());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Object › Rasterize… shows Anti Alias and Background as dropdowns of the values
|
||||
/// `object.rasterize` takes. OK rasterizes with the picked ones as one undo step, and a value
|
||||
/// the dialog doesn't list (black) shows as it is and is sent unchanged.
|
||||
#[test]
|
||||
fn rasterize_anti_alias_and_background_are_dropdowns() {
|
||||
let corner = |app: &VectorcraftApp| {
|
||||
let st = app.session.active().unwrap();
|
||||
let key = st.selection.objects.iter().find_map(|id| match st.doc.node(*id).map(|n| &n.kind) {
|
||||
Some(NodeKind::Image(i)) => Some(i.key.clone()),
|
||||
_ => None,
|
||||
});
|
||||
let decoded = craft_image_codecs::decode(&st.doc.images[&key.expect("the ellipse became an image")].bytes).unwrap();
|
||||
image::RgbaImage::from_raw(decoded.width(), decoded.height(), decoded.to_rgba8()).unwrap().get_pixel(0, 0).0
|
||||
};
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({"width": 200, "height": 200})).unwrap();
|
||||
let id = app.run("shape.ellipse", json!({"x": 10, "y": 10, "width": 40, "height": 40})).unwrap()["id"].as_u64().unwrap();
|
||||
app.run("paint.setFill", json!({"color": "#ff0000", "ids": [id]})).unwrap();
|
||||
app.run("select.set", json!({"ids": [id]})).unwrap();
|
||||
let steps = app.session.active().unwrap().history.undo.len();
|
||||
crate::menus::invoke(&mut app, "object.rasterize", json!({}));
|
||||
let d = app.ui.dialog.as_ref().unwrap();
|
||||
assert_eq!((d.str("antiAlias"), d.str("background")), ("art".into(), "transparent".into()));
|
||||
let mut h = dialog_harness(app);
|
||||
pick(&mut h, "Anti Alias:", "Type Optimized");
|
||||
pick(&mut h, "Background:", "White");
|
||||
let d = h.state().ui.dialog.as_ref().unwrap();
|
||||
assert_eq!((d.str("antiAlias"), d.str("background")), ("type".into(), "white".into()));
|
||||
let app = h.state_mut();
|
||||
crate::dialogs::confirm(app).unwrap();
|
||||
assert_eq!(app.session.active().unwrap().history.undo.len(), steps + 1, "one undo step");
|
||||
assert_eq!(corner(app), [255, 255, 255, 255], "a white background");
|
||||
// A background the dialog doesn't list stays as it is.
|
||||
app.run("edit.undo", json!({})).unwrap();
|
||||
app.run("select.set", json!({"ids": [id]})).unwrap();
|
||||
crate::menus::invoke(app, "object.rasterize", json!({}));
|
||||
app.ui.dialog.as_mut().unwrap().fields.insert("background".into(), json!("black"));
|
||||
frame(app);
|
||||
assert_eq!(app.ui.dialog.as_ref().unwrap().str("background"), "black", "drawing the dropdown keeps it");
|
||||
crate::dialogs::confirm(app).unwrap();
|
||||
assert_eq!(corner(app), [0, 0, 0, 255], "a black background");
|
||||
}
|
||||
|
||||
/// Create Gradient Mesh… shows Appearance, and Repeat Options for a grid repeat its Grid Type,
|
||||
/// as dropdowns of the values their commands take; OK applies the picked one.
|
||||
#[test]
|
||||
fn mesh_appearance_and_repeat_grid_type_are_dropdowns() {
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({"width": 200, "height": 200})).unwrap();
|
||||
app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 50, "height": 50})).unwrap();
|
||||
let entries = crate::menus::menu_entries(&app);
|
||||
let item = entries.iter().find(|e| e.path == ["Object"] && e.label == "Create Gradient Mesh…").expect("listed");
|
||||
let (cmd, p) = crate::menus::click_target(&item.label, item.command.as_deref().unwrap(), &item.params);
|
||||
crate::menus::invoke(&mut app, &cmd, p);
|
||||
let mut h = dialog_harness(app);
|
||||
pick(&mut h, "Appearance:", "To Center");
|
||||
let app = h.state_mut();
|
||||
assert_eq!(app.ui.dialog.as_ref().unwrap().str("appearance"), "center");
|
||||
crate::dialogs::confirm(app).unwrap();
|
||||
let st = app.session.active().unwrap();
|
||||
assert!(st.selection.objects.iter().any(|id| matches!(st.doc.node(*id).map(|n| &n.kind), Some(NodeKind::Mesh(_)))), "a mesh");
|
||||
|
||||
let mut h = dialog_harness(grid_options_app());
|
||||
pick(&mut h, "Grid Type:", "Brick by Row");
|
||||
let app = h.state_mut();
|
||||
assert_eq!(app.ui.dialog.as_ref().unwrap().str("gridType"), "brickByRow");
|
||||
crate::dialogs::confirm(app).unwrap();
|
||||
let fields = crate::panels::pattern_options::repeat_fields(app).unwrap();
|
||||
assert_eq!(fields["gridType"], json!("brickByRow"));
|
||||
}
|
||||
}
|
||||
@@ -189,9 +189,9 @@ pub fn open(app: &mut VectorcraftApp) {
|
||||
}
|
||||
|
||||
/// The options format `id` starts with in Format Settings: the raster options dialogs' defaults
|
||||
/// (without quality and image maps: the rows choose quality, a map is another file), the SVG
|
||||
/// Options' first-use ones (without artboards and images: a linked image is another file), or the
|
||||
/// default PDF preset.
|
||||
/// (without image maps, a map being another file, and without quality but WebP's: JPEG rows choose
|
||||
/// their quality), the SVG Options' first-use ones (without artboards and images: a linked image is
|
||||
/// another file), or the default PDF preset.
|
||||
fn defaults(app: &VectorcraftApp, id: &str) -> Map<String, Value> {
|
||||
let mut o = match (id, fileio::format(id)) {
|
||||
("svg", _) => svg_options::first_use(),
|
||||
@@ -199,9 +199,12 @@ fn defaults(app: &VectorcraftApp, id: &str) -> Map<String, Value> {
|
||||
(_, Some(f)) => png_options::defaults(app, f),
|
||||
_ => Map::new(),
|
||||
};
|
||||
for k in ["quality", "imageMap", "useArtboards", "images"] {
|
||||
for k in ["imageMap", "useArtboards", "images"] {
|
||||
o.remove(k);
|
||||
}
|
||||
if id != "webp" {
|
||||
o.remove("quality");
|
||||
}
|
||||
o
|
||||
}
|
||||
|
||||
|
||||
@@ -136,10 +136,11 @@ fn preview_command(app: &VectorcraftApp, d: &Dialog) -> Option<(String, Value)>
|
||||
|
||||
/// Reset (Cancel with Alt or Option held): every option goes back to the Flare tool's default
|
||||
/// (`FLARE_OPTIONS`, with Rays and Rings on). The dialog keeps a click's `x` and `y`, so OK still draws there.
|
||||
fn reset(_: &VectorcraftApp, d: &mut Dialog) {
|
||||
fn reset(_: &VectorcraftApp, d: &mut Dialog) -> Result<(), String> {
|
||||
if let Value::Object(defaults) = vectorcraft_tools::create("flare").options() {
|
||||
d.fields.extend(defaults);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// OK: set the tool's options; opened by a click, draw a flare there with them.
|
||||
|
||||
@@ -40,9 +40,10 @@ pub fn open(app: &mut VectorcraftApp) -> Value {
|
||||
}
|
||||
|
||||
/// Reset: the center and 0.
|
||||
fn reset(_: &VectorcraftApp, d: &mut Dialog) {
|
||||
fn reset(_: &VectorcraftApp, d: &mut Dialog) -> Result<(), String> {
|
||||
d.fields.insert("pivot".into(), json!(CENTER));
|
||||
d.fields.insert("rotate".into(), json!(0.0));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool {
|
||||
@@ -61,8 +62,10 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool {
|
||||
ui.add_space(8.0);
|
||||
let r = widgets::flat_button(ui, tl!("Reset"), 64.0);
|
||||
r.widget_info(|| egui::WidgetInfo::labeled(egui::Role::Button, ui.is_enabled(), tl!("Reset")));
|
||||
if r.clicked() {
|
||||
reset(app, d);
|
||||
if r.clicked()
|
||||
&& let Err(e) = reset(app, d)
|
||||
{
|
||||
app.status(e);
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//! The raster export options: PNG Options (resolution, background, anti-aliasing, interlaced),
|
||||
//! JPEG Options (no transparency; colour model, quality 0–10, method and scans, profile, image
|
||||
//! map), WebP Options, and PNG-8 and GIF Options (the palette: colour reduction, colours, dither,
|
||||
//! map), WebP Options (lossless, or lossy at a quality 0–100), and PNG-8 and GIF Options (the palette: colour reduction, colours, dither,
|
||||
//! transparency and matte), TIFF, BMP and Targa Options ([`super::tiff_bmp_tga`]) and PSD Options
|
||||
//! ([`super::psd_options`]). Fields
|
||||
//! are `document.export` params (format, path, artboard choice…); `__`-prefixed ones are the
|
||||
@@ -39,6 +39,10 @@ const MATTES: [&str; 3] = ["none", "white", "black"];
|
||||
const MATTE_LABELS: [&str; 4] = ["None", "White", "Black", "Other"];
|
||||
/// JPEG quality on the dialog's 0–10 scale: the band each step falls in.
|
||||
const QUALITY_BANDS: [&str; 11] = ["Low", "Low", "Low", "Medium", "Medium", "Medium", "High", "High", "Maximum", "Maximum", "Maximum"];
|
||||
/// WebP compression labels: `lossless` true, then false.
|
||||
const WEBP_COMPRESSION_LABELS: [&str; 2] = ["Lossless", "Lossy"];
|
||||
/// The lossy WebP quality a new export starts with (0–100).
|
||||
const WEBP_QUALITY: u8 = 90;
|
||||
|
||||
/// The dialog kind of a raster format (`pngOptions`, `jpgOptions`, `webpOptions`, `gifOptions`,
|
||||
/// `png8Options`).
|
||||
@@ -81,6 +85,9 @@ pub(super) fn defaults(app: &VectorcraftApp, f: &Format) -> Map<String, Value> {
|
||||
"png" => {
|
||||
o.insert("interlaced".into(), json!(false));
|
||||
}
|
||||
"webp" => {
|
||||
o.extend([("lossless".into(), json!(true)), ("quality".into(), json!(WEBP_QUALITY))]);
|
||||
}
|
||||
"jpg" => {
|
||||
let model = if cmyk { ColorModel::Cmyk } else { ColorModel::Rgb };
|
||||
let defaults = jpeg::JpegOptions::default();
|
||||
@@ -207,11 +214,7 @@ pub(super) fn option_rows(ui: &mut egui::Ui, d: &mut Dialog, id: &str, screens:
|
||||
}
|
||||
"jpg" => jpeg_rows(ui, d, &label, screens),
|
||||
"gif" | "png8" => palette_rows(ui, d, &label),
|
||||
"webp" => {
|
||||
ui.label("");
|
||||
label(ui, tl!("Lossless (lossy WebP isn't available yet)"));
|
||||
ui.end_row();
|
||||
}
|
||||
"webp" => webp_rows(ui, d, &label),
|
||||
"psd" => psd_options::rows(ui, d, &label),
|
||||
id => tiff_bmp_tga::rows(ui, d, id, &label),
|
||||
}
|
||||
@@ -252,6 +255,26 @@ fn quality_row(ui: &mut egui::Ui, d: &mut Dialog, label: &dyn Fn(&mut egui::Ui,
|
||||
ui.end_row();
|
||||
}
|
||||
|
||||
/// The WebP Options rows: Lossless or Lossy compression, and the quality 0–100 that Lossy uses
|
||||
/// (dimmed while Lossless is chosen, keeping its value).
|
||||
fn webp_rows(ui: &mut egui::Ui, d: &mut Dialog, label: &dyn Fn(&mut egui::Ui, &str) -> egui::Response) {
|
||||
label(ui, tl!("Compression:"));
|
||||
let lossless = d.fields.get("lossless").and_then(Value::as_bool).unwrap_or(true);
|
||||
if let Some(i) = widgets::dropdown(ui, "ro-webp", WEBP_COMPRESSION_LABELS[usize::from(!lossless)], &WEBP_COMPRESSION_LABELS, 150.0) {
|
||||
d.fields.insert("lossless".into(), json!(i == 0));
|
||||
}
|
||||
ui.end_row();
|
||||
|
||||
label(ui, tl!("Quality:"));
|
||||
let mut q = d.f64("quality", f64::from(WEBP_QUALITY)).round().clamp(0.0, 100.0) as u8;
|
||||
ui.add_enabled_ui(!lossless, |ui| {
|
||||
if widgets::slider(ui, egui::Slider::new(&mut q, 0..=100)).changed() {
|
||||
d.fields.insert("quality".into(), json!(q));
|
||||
}
|
||||
});
|
||||
ui.end_row();
|
||||
}
|
||||
|
||||
/// The JPEG method, and its scans when progressive.
|
||||
fn method_row(ui: &mut egui::Ui, d: &mut Dialog, label: &dyn Fn(&mut egui::Ui, &str) -> egui::Response) {
|
||||
label(ui, tl!("Method:"));
|
||||
|
||||
@@ -101,11 +101,12 @@ fn remembered(app: &VectorcraftApp) -> WebSettings {
|
||||
/// pending Done (`discard`, which a failed Done leaves), the preset name being typed and the
|
||||
/// selected color table entry are dropped. The view, zoom, connection speed and `path` stay,
|
||||
/// nothing is remembered or written, and the dialog stays open.
|
||||
fn reset(app: &VectorcraftApp, d: &mut Dialog) {
|
||||
fn reset(app: &VectorcraftApp, d: &mut Dialog) -> Result<(), String> {
|
||||
for key in ["preset", "discard", "__presetName", "__color"] {
|
||||
d.fields.remove(key);
|
||||
}
|
||||
d.fields.extend(settings_fields(&remembered(app)));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// The settings as dialog fields.
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
//! `document.pdfSettings`. Save Preset… names the settings as a preset (`pdf.preset.save`).
|
||||
//! Opened from Export As with Use Artboards off (`__artBounds`), the dialog has no Artboards
|
||||
//! section, and OK writes one page of the visible art's bounds through [`io::export`]; opened
|
||||
//! from Export Selection (`__selection` too), the page is the selection's crop.
|
||||
//! from Export Selection (`__selection` too), the page is the selection's crop. While Alt (Option
|
||||
//! on macOS) is held, Cancel reads Reset, which puts the options back to the chosen preset's
|
||||
//! settings and leaves the dialog open (`ui.dialogReset`).
|
||||
//!
|
||||
//! The same dialog edits a preset (kind `pdfPreset`, from Edit → PDF Presets): a `name` and
|
||||
//! `description` instead of the preset and artboards, and OK saves the preset.
|
||||
@@ -30,8 +32,15 @@ use crate::{VectorcraftApp, io, widgets};
|
||||
|
||||
pub(super) const KIND: &str = "savePdf";
|
||||
|
||||
pub(super) const SPEC: DialogSpec =
|
||||
DialogSpec { heading: |_| tl!("Save PDF").into(), body, confirm, ok: Some("Save PDF"), inputs: |_| &["path"], ..DialogSpec::FORM };
|
||||
pub(super) const SPEC: DialogSpec = DialogSpec {
|
||||
heading: |_| tl!("Save PDF").into(),
|
||||
body,
|
||||
confirm,
|
||||
ok: Some("Save PDF"),
|
||||
inputs: |_| &["path"],
|
||||
reset: Some(reset),
|
||||
..DialogSpec::FORM
|
||||
};
|
||||
|
||||
/// The dialog kind of the preset editor (New / Edit in Edit → PDF Presets).
|
||||
pub(super) const PRESET_KIND: &str = "pdfPreset";
|
||||
@@ -502,13 +511,33 @@ fn preset_rows(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) {
|
||||
fn apply_preset(app: &mut VectorcraftApp, d: &mut Dialog, name: &str) {
|
||||
match settings_fields(app, &json!({ "preset": name })) {
|
||||
Ok(settings) => {
|
||||
d.fields.extend(settings);
|
||||
replace_settings(d, settings);
|
||||
d.fields.insert("preset".into(), json!(name));
|
||||
}
|
||||
Err(e) => app.status(e),
|
||||
}
|
||||
}
|
||||
|
||||
/// The UI-only fields that stand for options: the Security section's password checkboxes.
|
||||
const OPTION_FLAGS: [&str; 2] = ["__requireOpenPassword", "__restrictPermissions"];
|
||||
|
||||
/// Replace every option with `settings` (from [`settings_fields`]), the password checkboxes
|
||||
/// included. The preset, the artboard choice, the path and the other UI-only fields (the section,
|
||||
/// the Save Preset name) stay.
|
||||
fn replace_settings(d: &mut Dialog, settings: Map<String, Value>) {
|
||||
d.fields.retain(|k, _| matches!(k.as_str(), "preset" | "range" | "path") || (k.starts_with("__") && !OPTION_FLAGS.contains(&k.as_str())));
|
||||
d.fields.extend(settings);
|
||||
}
|
||||
|
||||
/// Reset (Cancel with Alt or Option held): the options go back to the chosen preset's settings, as
|
||||
/// choosing that preset sets them, and the dialog stays open. A preset that can no longer be found
|
||||
/// (a saved one deleted while the dialog is open) is an error, and the dialog is left as it is.
|
||||
fn reset(app: &VectorcraftApp, d: &mut Dialog) -> Result<(), String> {
|
||||
let settings = settings_fields(app, &json!({ "preset": d.str("preset") }))?;
|
||||
replace_settings(d, settings);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// General: the options, then the artboards (Save PDF) or the description (preset editor).
|
||||
fn general(ui: &mut egui::Ui, d: &mut Dialog, editor: bool) {
|
||||
heading(ui, tl!("Options"));
|
||||
|
||||
@@ -346,6 +346,74 @@ fn presets_reset_the_settings_and_fields_fall_back_to_defaults() {
|
||||
assert!(app.run("ui.savePdfDialog", json!({"compatibility": "1.0"})).is_err(), "bad options are refused");
|
||||
}
|
||||
|
||||
/// Reset (`ui.dialogReset`, or Cancel with Alt or Option held) puts every option back to the
|
||||
/// chosen preset's settings, passwords and their checkboxes included, and keeps the preset, the
|
||||
/// path, the artboard range, the section and the dialog. After another preset is chosen, Reset
|
||||
/// goes back to that one, and choosing it also clears the password checkboxes.
|
||||
#[test]
|
||||
fn reset_puts_the_chosen_presets_settings_back_and_keeps_the_path_and_artboards() {
|
||||
let (mut app, written, _) = app();
|
||||
app.run("pdf.preset.save", json!({"name": "Mine", "compatibility": "1.5", "marks": {"trim": true}})).unwrap();
|
||||
app.run("ui.savePdfDialog", json!({"path": "/tmp/reset.pdf", "preset": "Mine"})).unwrap();
|
||||
set_field(&mut app, "__allArtboards", json!(false));
|
||||
set_field(&mut app, "range", json!("2"));
|
||||
set_field(&mut app, "__section", json!("Security"));
|
||||
set_field(&mut app, "compatibility", json!("1.7"));
|
||||
set_field(&mut app, "marks.trim", json!(false));
|
||||
set_field(&mut app, "compression.color.ppi", json!(72));
|
||||
set_field(&mut app, OPEN_PASSWORD, json!("secret"));
|
||||
set_field(&mut app, "__restrictPermissions", json!(true));
|
||||
let r = app.run("ui.dialogReset", json!({})).unwrap();
|
||||
assert_eq!(r["kind"], KIND);
|
||||
let d = app.ui.dialog.as_ref().expect("Reset leaves the dialog open");
|
||||
assert_eq!(get(d, "compatibility"), "1.5");
|
||||
assert_eq!(get(d, "marks.trim"), true);
|
||||
assert_eq!(get(d, "compression.color.ppi"), 300.0, "a nested option goes back too");
|
||||
assert_eq!(get(d, OPEN_PASSWORD).as_str().unwrap_or_default(), "", "the password is cleared");
|
||||
assert!(!d.fields.contains_key("__restrictPermissions"), "the checkbox is cleared");
|
||||
assert_eq!(
|
||||
(d.str("preset"), d.str("path"), d.str("range"), d.str("__section")),
|
||||
("Mine".to_string(), "/tmp/reset.pdf".to_string(), "2".to_string(), "Security".to_string())
|
||||
);
|
||||
assert!(!d.bool("__allArtboards"));
|
||||
|
||||
let mut d = d.clone();
|
||||
d.fields.insert("__requireOpenPassword".into(), json!(true));
|
||||
apply_preset(&mut app, &mut d, pdf::DEFAULT_PRESET);
|
||||
assert!(!d.fields.contains_key("__requireOpenPassword"), "choosing a preset clears the checkbox");
|
||||
app.ui.dialog = Some(d);
|
||||
set_field(&mut app, "compatibility", json!("1.4"));
|
||||
app.run("ui.dialogReset", json!({})).unwrap();
|
||||
let d = app.ui.dialog.as_ref().expect("the dialog stays open");
|
||||
assert_eq!(d.str("preset"), pdf::DEFAULT_PRESET);
|
||||
assert_eq!(get(d, "compatibility"), "1.7");
|
||||
assert_eq!(get(d, "marks.trim"), false);
|
||||
// OK writes the reset options to the kept path and range.
|
||||
super::super::confirm(&mut app).unwrap();
|
||||
let w = written.borrow();
|
||||
assert_eq!((w.len(), w[0].0.as_str()), (1, "/tmp/reset.pdf"));
|
||||
assert!(w[0].1.starts_with(b"%PDF-1.7"));
|
||||
assert_eq!(vectorcraft_pdf::import(&w[0].1).unwrap().artboards.len(), 1, "range 2");
|
||||
}
|
||||
|
||||
/// Reset with a saved preset deleted while the dialog is open is an error naming the preset, and
|
||||
/// it leaves the options and the password as they are rather than switching to another preset's.
|
||||
#[test]
|
||||
fn reset_with_a_deleted_preset_is_an_error_and_keeps_the_options() {
|
||||
let (mut app, _, _) = app();
|
||||
app.run("pdf.preset.save", json!({"name": "Gone", "compatibility": "1.5"})).unwrap();
|
||||
app.run("ui.savePdfDialog", json!({"preset": "Gone"})).unwrap();
|
||||
set_field(&mut app, "compatibility", json!("1.6"));
|
||||
set_field(&mut app, OPEN_PASSWORD, json!("secret"));
|
||||
app.run("pdf.preset.delete", json!({"name": "Gone"})).unwrap();
|
||||
let e = app.run("ui.dialogReset", json!({})).unwrap_err();
|
||||
assert!(e.contains("unknown PDF preset `Gone`"), "{e}");
|
||||
let d = app.ui.dialog.as_ref().expect("the dialog stays open");
|
||||
assert_eq!(d.str("preset"), "Gone");
|
||||
assert_eq!(get(d, "compatibility"), "1.6");
|
||||
assert_eq!(get(d, OPEN_PASSWORD), "secret");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn marks_and_bleeds_reach_the_pdf() {
|
||||
let (mut app, written, _) = app();
|
||||
|
||||
@@ -402,7 +402,15 @@ fn linked_size_form(ui: &mut egui::Ui, d: &mut Dialog, unit: Unit) {
|
||||
let mut rows: Option<egui::Rect> = None;
|
||||
egui::Grid::new("shape-size-dlg").num_columns(3).spacing([10.0, 8.0]).show(ui, |ui| {
|
||||
for (key, label) in [("width", "Width:"), ("height", "Height:")] {
|
||||
let row = form::row_label(ui, label);
|
||||
let row = if key == "height" && d.kind == "ellipse" {
|
||||
let (row, pressed) = height_label_button(ui, label);
|
||||
if pressed {
|
||||
copy_width_to_height(d);
|
||||
}
|
||||
row
|
||||
} else {
|
||||
form::row_label(ui, label)
|
||||
};
|
||||
if ui.label_inputs_by(row.id, |ui| form::length(ui, d, key, unit, form::FIELD_W)) {
|
||||
follow_link(d, key);
|
||||
}
|
||||
@@ -424,6 +432,8 @@ fn linked_size_form(ui: &mut egui::Ui, d: &mut Dialog, unit: Unit) {
|
||||
let resp = ui.interact(rect, ui.scope_id().with("shape-size-link"), egui::Sense::click());
|
||||
let icon = if on { "link" } else { "link-2-off" };
|
||||
if widgets::paint_icon_button(ui, resp, icon, "Constrain Width and Height Proportions", on).clicked() {
|
||||
// Enter on the focused button turns the link on or off; it does not also press OK.
|
||||
ui.input_mut(|i| i.consume_key(egui::Modifiers::NONE, egui::Key::Enter));
|
||||
d.fields.insert(LINK.into(), json!(!on));
|
||||
sync_link(ui.ctx(), d);
|
||||
}
|
||||
@@ -469,6 +479,61 @@ fn follow_link(d: &mut Dialog, typed: &str) {
|
||||
}
|
||||
}
|
||||
|
||||
/// The Ellipse dialog's Height label: a button drawn as the other rows' labels are. Whether it was
|
||||
/// pressed: a click, or Enter or Space while it has the keyboard focus; that Enter does not also
|
||||
/// press OK. A click whose press took the focus from a field that then refused its text (Width
|
||||
/// left empty or not a distance) does not count, as such a click on OK does not. Screen readers
|
||||
/// read it as the button "Height:" (which also names the Height field) with the description "Copy
|
||||
/// Width to Height".
|
||||
fn height_label_button(ui: &mut egui::Ui, label: &str) -> (egui::Response, bool) {
|
||||
let t = crate::theme::Tokens::get(ui.ctx());
|
||||
let text = egui::RichText::new(tl!(label)).color(t.text_dim);
|
||||
let resp = ui.add(egui::Button::new(text).frame(false)).on_hover_cursor(egui::CursorIcon::PointingHand);
|
||||
let resp = resp.on_hover_text(tl!("Copy Width to Height"));
|
||||
let press = resp.id.with("press-pass");
|
||||
if resp.contains_pointer() && ui.input(|i| i.pointer.any_pressed()) {
|
||||
let pass = ui.ctx().cumulative_pass_nr();
|
||||
ui.data_mut(|m| m.insert_temp(press, pass));
|
||||
}
|
||||
if !resp.clicked() {
|
||||
// A press let go without a click (dragged off the button) leaves no press behind.
|
||||
if ui.input(|i| i.pointer.any_released()) {
|
||||
ui.data_mut(|m| m.remove::<u64>(press));
|
||||
}
|
||||
return (resp, false);
|
||||
}
|
||||
ui.input_mut(|i| i.consume_key(egui::Modifiers::NONE, egui::Key::Enter));
|
||||
let (pressed_at, refused_at, refused_now) = ui.data_mut(|m| {
|
||||
let pressed_at = m.get_temp::<u64>(press);
|
||||
m.remove::<u64>(press);
|
||||
(pressed_at, m.get_temp::<u64>(widgets::dialog_reject_pass()), m.get_temp::<bool>(widgets::dialog_reject_commit_flag()))
|
||||
});
|
||||
let refused = refused_now == Some(true) || matches!((refused_at, pressed_at), (Some(r), Some(p)) if r >= p);
|
||||
(resp, !refused)
|
||||
}
|
||||
|
||||
/// Height takes the Width the dialog holds (help page "Draw ellipses",
|
||||
/// <https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf#page=140>).
|
||||
/// A Width that is missing, empty, not a distance or not finite leaves Height as it is. With the
|
||||
/// link on, the link keeps the circle from then on (proportions 1 : 1), or keeps no proportions
|
||||
/// when Width is 0; the link stays on.
|
||||
fn copy_width_to_height(d: &mut Dialog) {
|
||||
let width = match d.fields.get("width") {
|
||||
Some(Value::Number(n)) => n.as_f64(),
|
||||
Some(Value::String(s)) => Unit::Points.parse(s),
|
||||
_ => None,
|
||||
};
|
||||
let Some(width) = width.filter(|w| w.is_finite()) else { return };
|
||||
d.fields.insert("height".into(), json!(width));
|
||||
if d.bool(LINK) {
|
||||
if width != 0.0 {
|
||||
d.fields.insert(RATIO.into(), json!(1.0));
|
||||
} else {
|
||||
d.fields.remove(RATIO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The Ellipse dialog's Anchors: the nearest whole number from 2 to 1000 (4, a live ellipse, when
|
||||
/// left empty or not a number).
|
||||
fn ellipse_anchors(d: &Dialog) -> u64 {
|
||||
@@ -1063,6 +1128,237 @@ mod tests {
|
||||
assert_eq!(ellipse_anchors(h.state().ui.dialog.as_ref().unwrap()), 4);
|
||||
}
|
||||
|
||||
/// A harness drawing `app`'s dialog, with the app's fonts installed on its first frame.
|
||||
fn dialog_harness(app: VectorcraftApp) -> egui_kittest::Harness<'static, VectorcraftApp> {
|
||||
let mut fonts = false;
|
||||
let mut h = egui_kittest::Harness::builder().with_size(egui::vec2(1100.0, 900.0)).build_ui_state(
|
||||
move |ui, app: &mut VectorcraftApp| {
|
||||
if !std::mem::replace(&mut fonts, true) {
|
||||
crate::theme::install_fonts(ui.ctx());
|
||||
return;
|
||||
}
|
||||
super::super::show(app, ui.ctx());
|
||||
},
|
||||
app,
|
||||
);
|
||||
h.run_steps(5);
|
||||
h
|
||||
}
|
||||
|
||||
/// The dialog's Width and Height in points.
|
||||
fn dialog_size(h: &egui_kittest::Harness<'_, VectorcraftApp>) -> (f64, f64) {
|
||||
let d = h.state().ui.dialog.as_ref().expect("the dialog is open");
|
||||
(d.f64("width", -1.0), d.f64("height", -1.0))
|
||||
}
|
||||
|
||||
/// Replaces the text of the field named `name` with `text` and leaves it with Tab.
|
||||
fn retype(h: &mut egui_kittest::Harness<'_, VectorcraftApp>, name: &str, text: &str) {
|
||||
use egui::accesskit::Role;
|
||||
use egui_kittest::kittest::Queryable;
|
||||
let all = egui::Modifiers { ctrl: true, command: true, ..Default::default() };
|
||||
h.get_by_role_and_label(Role::TextInput, name).focus();
|
||||
h.run_steps(2);
|
||||
h.key_press_modifiers(all, egui::Key::A);
|
||||
h.get_by_role_and_label(Role::TextInput, name).type_text(text);
|
||||
h.run_steps(2);
|
||||
h.key_press(egui::Key::Tab);
|
||||
h.run_steps(2);
|
||||
}
|
||||
|
||||
/// In the Ellipse dialog, a click on the word Height copies Width into Height, also a Width
|
||||
/// typed and not yet committed; the fields keep their names. Cancel discards it; OK draws the
|
||||
/// circle as one undo step.
|
||||
#[test]
|
||||
fn clicking_height_in_the_ellipse_dialog_copies_width_into_height() {
|
||||
use egui::accesskit::Role;
|
||||
use egui_kittest::kittest::{NodeT, Queryable};
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({"width": 300, "height": 300})).unwrap();
|
||||
super::super::open_tool_dialog(&mut app, "ellipse", json!({"x": 10.0, "y": 10.0}));
|
||||
let d = app.ui.dialog.as_mut().unwrap();
|
||||
d.fields.insert("width".into(), json!(80.0));
|
||||
d.fields.insert("height".into(), json!(30.0));
|
||||
let mut h = dialog_harness(app);
|
||||
h.check_accessibility();
|
||||
let button = h.get_by_role_and_label(Role::Button, "Height:");
|
||||
assert_eq!(button.accesskit_node().description().as_deref(), Some("Copy Width to Height"));
|
||||
h.get_by_role_and_label(Role::Button, "Height:").click();
|
||||
h.run_steps(2);
|
||||
assert_eq!(dialog_size(&h), (80.0, 80.0));
|
||||
let d = h.state().ui.dialog.as_ref().unwrap();
|
||||
assert!(!d.bool(LINK) && !d.fields.contains_key(RATIO), "the link stays off");
|
||||
// The value fields keep their names.
|
||||
h.get_by_role_and_label(Role::TextInput, "Width:");
|
||||
h.get_by_role_and_label(Role::TextInput, "Height:");
|
||||
|
||||
// A Width typed and not committed with Enter or Tab is the one copied.
|
||||
let all = egui::Modifiers { ctrl: true, command: true, ..Default::default() };
|
||||
h.get_by_role_and_label(Role::TextInput, "Width:").focus();
|
||||
h.run_steps(2);
|
||||
h.key_press_modifiers(all, egui::Key::A);
|
||||
h.get_by_role_and_label(Role::TextInput, "Width:").type_text("50 pt");
|
||||
h.run_steps(2);
|
||||
h.get_by_role_and_label(Role::Button, "Height:").click();
|
||||
h.run_steps(3);
|
||||
assert_eq!(dialog_size(&h), (50.0, 50.0));
|
||||
|
||||
// A Width the field refuses when the click takes its focus (not a distance, or empty)
|
||||
// is not copied: Height keeps its value.
|
||||
h.state_mut().ui.dialog.as_mut().unwrap().fields.insert("height".into(), json!(30.0));
|
||||
h.run_steps(2);
|
||||
for typed in ["wide", ""] {
|
||||
h.get_by_role_and_label(Role::TextInput, "Width:").focus();
|
||||
h.run_steps(2);
|
||||
h.key_press_modifiers(all, egui::Key::A);
|
||||
if typed.is_empty() {
|
||||
h.key_press(egui::Key::Backspace);
|
||||
} else {
|
||||
h.get_by_role_and_label(Role::TextInput, "Width:").type_text(typed);
|
||||
}
|
||||
h.run_steps(2);
|
||||
h.get_by_role_and_label(Role::Button, "Height:").click();
|
||||
h.run_steps(3);
|
||||
assert_eq!(dialog_size(&h), (50.0, 30.0), "{typed:?}");
|
||||
}
|
||||
// The field shows its value again, and the next click copies it.
|
||||
h.get_by_role_and_label(Role::Button, "Height:").click();
|
||||
h.run_steps(3);
|
||||
assert_eq!(dialog_size(&h), (50.0, 50.0));
|
||||
|
||||
// A Height typed and not committed does not outlast the copy: a distance is replaced by
|
||||
// Width, and a Height the field refuses keeps the copy from happening, as it keeps OK from
|
||||
// confirming.
|
||||
for (typed, after) in [("70 pt", (50.0, 50.0)), ("tall", (50.0, 30.0))] {
|
||||
h.state_mut().ui.dialog.as_mut().unwrap().fields.insert("height".into(), json!(30.0));
|
||||
h.run_steps(2);
|
||||
h.get_by_role_and_label(Role::TextInput, "Height:").focus();
|
||||
h.run_steps(2);
|
||||
h.key_press_modifiers(all, egui::Key::A);
|
||||
h.get_by_role_and_label(Role::TextInput, "Height:").type_text(typed);
|
||||
h.run_steps(2);
|
||||
h.get_by_role_and_label(Role::Button, "Height:").click();
|
||||
h.run_steps(3);
|
||||
assert_eq!(dialog_size(&h), after, "{typed:?}");
|
||||
}
|
||||
|
||||
// Cancel: nothing is drawn.
|
||||
let undo = |h: &egui_kittest::Harness<'_, VectorcraftApp>| h.state().session.active().unwrap().history.undo.len();
|
||||
let before = undo(&h);
|
||||
crate::dialogs::cancel(h.state_mut());
|
||||
h.run_steps(2);
|
||||
assert!(h.state().session.doc().unwrap().doc.layers[0].children().unwrap().is_empty());
|
||||
assert_eq!(undo(&h), before);
|
||||
|
||||
// OK: one circle, one undo step.
|
||||
super::super::open_tool_dialog(h.state_mut(), "ellipse", json!({"x": 10.0, "y": 10.0}));
|
||||
h.state_mut().ui.dialog.as_mut().unwrap().fields.insert("width".into(), json!(64.0));
|
||||
h.run_steps(2);
|
||||
h.get_by_role_and_label(Role::Button, "Height:").click();
|
||||
h.run_steps(2);
|
||||
super::super::confirm(h.state_mut()).unwrap();
|
||||
assert!(h.state().ui.dialog.is_none());
|
||||
assert_eq!(undo(&h), before + 1);
|
||||
let doc = &h.state().session.doc().unwrap().doc;
|
||||
let b = doc.layers[0].children().unwrap()[0].geometric_bounds().unwrap();
|
||||
assert!((b.width() - 64.0).abs() < 1e-6 && (b.height() - 64.0).abs() < 1e-6, "{b:?}");
|
||||
}
|
||||
|
||||
/// The Height button works from the keyboard: Space and Enter copy Width into Height, and
|
||||
/// that Enter does not press OK. With the link on, the link stays on and keeps the circle when
|
||||
/// Width is typed next; a Width of 0 is copied and leaves the link no proportions to keep.
|
||||
#[test]
|
||||
fn the_ellipse_height_button_copies_width_from_the_keyboard_and_keeps_the_link_round() {
|
||||
use egui::accesskit::Role;
|
||||
use egui_kittest::kittest::Queryable;
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({"width": 300, "height": 300})).unwrap();
|
||||
super::super::open_tool_dialog(&mut app, "ellipse", json!({"x": 10.0, "y": 10.0}));
|
||||
let d = app.ui.dialog.as_mut().unwrap();
|
||||
d.fields.insert("width".into(), json!(80.0));
|
||||
d.fields.insert("height".into(), json!(20.0));
|
||||
d.fields.insert(LINK.into(), json!(true));
|
||||
let mut h = dialog_harness(app);
|
||||
assert_eq!(h.state().ui.dialog.as_ref().unwrap().f64(RATIO, 0.0), 0.25);
|
||||
h.get_by_role_and_label(Role::Button, "Height:").focus();
|
||||
h.run_steps(2);
|
||||
h.key_press(egui::Key::Space);
|
||||
h.run_steps(2);
|
||||
assert_eq!(dialog_size(&h), (80.0, 80.0));
|
||||
let d = h.state().ui.dialog.as_ref().unwrap();
|
||||
assert!(d.bool(LINK), "the link stays on");
|
||||
assert_eq!(d.f64(RATIO, 0.0), 1.0);
|
||||
// The link now keeps the circle.
|
||||
retype(&mut h, "Width:", "40 pt");
|
||||
assert_eq!(dialog_size(&h), (40.0, 40.0));
|
||||
|
||||
// Enter on the button copies, and the dialog stays open.
|
||||
h.state_mut().ui.dialog.as_mut().unwrap().fields.insert("width".into(), json!(0.0));
|
||||
h.run_steps(2);
|
||||
h.get_by_role_and_label(Role::Button, "Height:").focus();
|
||||
h.run_steps(2);
|
||||
h.key_press(egui::Key::Enter);
|
||||
h.run_steps(2);
|
||||
assert!(h.state().ui.dialog.is_some(), "Enter on the Height button does not press OK");
|
||||
assert_eq!(dialog_size(&h), (0.0, 0.0));
|
||||
let d = h.state().ui.dialog.as_ref().unwrap();
|
||||
assert!(d.bool(LINK) && !d.fields.contains_key(RATIO), "no proportions to keep at 0");
|
||||
assert!(h.state().session.doc().unwrap().doc.layers[0].children().unwrap().is_empty());
|
||||
}
|
||||
|
||||
/// Enter on the focused link button turns the link on and leaves the dialog open, as Space does.
|
||||
#[test]
|
||||
fn enter_on_the_link_button_turns_the_link_on_without_pressing_ok() {
|
||||
use egui::accesskit::Role;
|
||||
use egui_kittest::kittest::Queryable;
|
||||
const LINK_NAME: &str = "Constrain Width and Height Proportions";
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({"width": 300, "height": 300})).unwrap();
|
||||
super::super::open_tool_dialog(&mut app, "rectangle", json!({"x": 10.0, "y": 10.0}));
|
||||
let mut h = dialog_harness(app);
|
||||
assert!(!h.state().ui.dialog.as_ref().unwrap().bool(LINK));
|
||||
h.get_by_role_and_label(Role::Button, LINK_NAME).focus();
|
||||
h.run_steps(2);
|
||||
h.key_press(egui::Key::Enter);
|
||||
h.run_steps(2);
|
||||
let d = h.state().ui.dialog.as_ref().expect("Enter on the link button does not press OK");
|
||||
assert!(d.bool(LINK));
|
||||
assert!(h.state().session.doc().unwrap().doc.layers[0].children().unwrap().is_empty());
|
||||
}
|
||||
|
||||
/// Rectangle and Rounded Rectangle keep plain Width and Height labels.
|
||||
#[test]
|
||||
fn only_the_ellipse_dialog_has_the_height_button() {
|
||||
use egui::accesskit::Role;
|
||||
use egui_kittest::kittest::Queryable;
|
||||
for kind in ["rectangle", "roundedRectangle"] {
|
||||
let mut app = VectorcraftApp::new(Session::new(), Default::default());
|
||||
app.run("file.new", json!({"width": 300, "height": 300})).unwrap();
|
||||
super::super::open_tool_dialog(&mut app, kind, json!({"x": 10.0, "y": 10.0}));
|
||||
let h = dialog_harness(app);
|
||||
h.get_by_role_and_label(Role::TextInput, "Height:");
|
||||
assert!(h.query_by_role_and_label(Role::Button, "Height:").is_none(), "{kind}");
|
||||
}
|
||||
}
|
||||
|
||||
/// A Width that is missing, empty, not a distance or not finite leaves Height as it is; a
|
||||
/// Width with a unit is copied in points, and 0 is copied.
|
||||
#[test]
|
||||
fn copying_width_takes_only_a_width_that_reads() {
|
||||
for width in [None, Some(json!("")), Some(json!("wide")), Some(json!("inf")), Some(json!(null)), Some(json!(true))] {
|
||||
let mut d = Dialog::new("ellipse", json!({"height": 30.0}));
|
||||
if let Some(w) = width.clone() {
|
||||
d.fields.insert("width".into(), w);
|
||||
}
|
||||
copy_width_to_height(&mut d);
|
||||
assert_eq!(d.fields.get("height"), Some(&json!(30.0)), "{width:?}");
|
||||
}
|
||||
for (width, want) in [(json!("1 in"), 72.0), (json!(0), 0.0), (json!(12.5), 12.5)] {
|
||||
let mut d = Dialog::new("ellipse", json!({"width": width.clone(), "height": 30.0}));
|
||||
copy_width_to_height(&mut d);
|
||||
assert_eq!(d.f64("height", -1.0), want, "{width}");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ellipse_anchors_take_the_nearest_whole_number_from_2_to_1000() {
|
||||
let d = |v: Value| Dialog::new("ellipse", json!({ "anchors": v }));
|
||||
|
||||
@@ -2524,6 +2524,31 @@ fn flare_options_alt_turns_cancel_into_reset() {
|
||||
);
|
||||
}
|
||||
|
||||
/// While Alt is held, Save PDF's Cancel button reads Reset; Reset puts the chosen preset's settings
|
||||
/// back and leaves the dialog open with its path, letting Alt go shows Cancel again, and Cancel
|
||||
/// closes the dialog.
|
||||
#[test]
|
||||
fn save_pdf_alt_turns_cancel_into_reset() {
|
||||
let mut app = app();
|
||||
app.run("ui.savePdfDialog", json!({"path": "/tmp/alt.pdf"})).unwrap();
|
||||
app.ui.dialog.as_mut().unwrap().fields.insert("compatibility".into(), json!("1.4"));
|
||||
let mut f = Frames::new();
|
||||
f.button(&mut app, "Cancel");
|
||||
f.run(&mut app, vec![egui::Event::ModifiersChanged(egui::Modifiers::ALT)]);
|
||||
let reset = f.button(&mut app, "Reset");
|
||||
let texts = f.texts(&mut app);
|
||||
assert!(!texts.iter().any(|(t, _)| t == "Cancel"), "Reset takes Cancel's place: {texts:?}");
|
||||
f.press(&mut app, reset, true);
|
||||
f.press(&mut app, reset, false);
|
||||
let d = app.ui.dialog.as_ref().expect("Reset leaves the dialog open");
|
||||
assert_eq!((d.str("compatibility"), d.str("path")), ("1.7".to_string(), "/tmp/alt.pdf".to_string()));
|
||||
f.run(&mut app, vec![egui::Event::ModifiersChanged(egui::Modifiers::NONE)]);
|
||||
let cancel = f.button(&mut app, "Cancel");
|
||||
f.press(&mut app, cancel, true);
|
||||
f.press(&mut app, cancel, false);
|
||||
assert!(app.ui.dialog.is_none(), "Cancel closes the dialog");
|
||||
}
|
||||
|
||||
/// While Alt is held, Save for Web's Cancel button reads Reset; Reset puts the remembered settings
|
||||
/// back without remembering anything and leaves the dialog open, and letting Alt go shows Cancel again.
|
||||
#[test]
|
||||
|
||||
@@ -101,13 +101,48 @@ fn text_export_options_write_the_stories() {
|
||||
assert_eq!((path.as_str(), bytes.as_slice()), ("/out/Untitled-1.txt", &b"Hello\r\nthere\r\n"[..]));
|
||||
}
|
||||
|
||||
/// WebP Options: Lossless by default, with the Quality slider disabled; Lossy enables it, and OK
|
||||
/// writes a lossy file at that quality, without a note.
|
||||
#[test]
|
||||
fn webp_options_say_the_file_is_lossless() {
|
||||
let (mut app, _) = app(1);
|
||||
fn webp_options_choose_lossless_or_lossy_at_a_quality() {
|
||||
use crate::widgets::accessibility_tests::tree;
|
||||
use egui::accesskit::Role;
|
||||
let quality_disabled = |app: &mut VectorcraftApp| {
|
||||
let t = tree(|ui| show(app, ui.ctx()));
|
||||
t.iter().find(|n| n.role() == Role::Slider).expect("the Quality slider").is_disabled()
|
||||
};
|
||||
let (mut app, written) = app(1);
|
||||
app.run("file.exportAs", json!({"format": "webp"})).unwrap();
|
||||
confirm(&mut app).unwrap();
|
||||
assert_eq!(kind(&app), Some("webpOptions"));
|
||||
let d = app.ui.dialog.as_ref().unwrap();
|
||||
assert_eq!((&d.fields["lossless"], &d.fields["quality"]), (&json!(true), &json!(90)));
|
||||
assert!(quality_disabled(&mut app), "Quality applies to Lossy");
|
||||
frame(&mut app);
|
||||
confirm(&mut app).unwrap();
|
||||
assert_eq!(&written.borrow()[0].1[12..16], b"VP8L", "lossless by default");
|
||||
|
||||
app.run("file.exportAs", json!({"format": "webp"})).unwrap();
|
||||
confirm(&mut app).unwrap();
|
||||
set(&mut app, "lossless", json!(false));
|
||||
set(&mut app, "quality", json!(40));
|
||||
assert!(!quality_disabled(&mut app), "Lossy enables Quality");
|
||||
frame(&mut app);
|
||||
// The dialog's options, as `document.export` takes them.
|
||||
let mut options = app.ui.dialog.as_ref().unwrap().fields.clone();
|
||||
options.retain(|k, _| !k.starts_with("__") && k != "path");
|
||||
let r = confirm(&mut app).unwrap();
|
||||
assert_eq!(r["warnings"], json!([]), "{r}");
|
||||
let file = written.borrow().last().unwrap().1.clone();
|
||||
assert!(file.windows(4).any(|w| w == b"VP8 ") && !file.windows(4).any(|w| w == b"VP8L"), "lossy");
|
||||
// The file is the one `document.export` writes with those options at quality 40.
|
||||
let at = |app: &mut VectorcraftApp, q: u8| {
|
||||
let mut p = options.clone();
|
||||
p.insert("quality".into(), json!(q));
|
||||
vectorcraft_format::base64_decode(app.run("document.export", serde_json::Value::Object(p)).unwrap()["dataBase64"].as_str().unwrap()).unwrap()
|
||||
};
|
||||
assert_eq!(file, at(&mut app, 40));
|
||||
assert_ne!(file, at(&mut app, 90));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -592,6 +592,7 @@ font-technology Variable Променливи
|
||||
Consolidate All Windows Обединяване на всички прозорци
|
||||
Constrain Angle Заключване на ъгъла
|
||||
Constrain Width and Height Proportions Запазване на пропорциите на ширина и височина
|
||||
Copy Width to Height Копиране на ширината във височината
|
||||
Construction Guides Конструкционни водачи
|
||||
Contextual Alternates Контекстни алтернативи
|
||||
Contextual Task Bar Контекстна лента със задачи
|
||||
@@ -670,6 +671,9 @@ font-technology Variable Променливи
|
||||
Create from Selection Създаване от селекцията
|
||||
Create From: Създаване от:
|
||||
Create Gradient Mesh… Създаване на градиентна мрежа…
|
||||
Flat Плоско
|
||||
To Center Към центъра
|
||||
To Edge Към ръба
|
||||
Create Graph Създаване на диаграма
|
||||
Create New Layer Създаване на нов слой
|
||||
Create New Sublayer Създаване на нов подслой
|
||||
@@ -1956,7 +1960,8 @@ font-technology Variable Променливи
|
||||
Lock Others Заключване на другите
|
||||
Lock Slices Заключване на фрагментите
|
||||
Lock Station Point Заключване на базовата точка
|
||||
Lossless (lossy WebP isn't available yet) Без загуба (загубеният WebP все още не е наличен)
|
||||
Lossless Без загуба
|
||||
Lossy Със загуба
|
||||
Lossy: С загуба:
|
||||
Low Ниско
|
||||
lowercase малки букви
|
||||
@@ -2974,6 +2979,38 @@ digits Malayalam Малаялам
|
||||
Responsive Адаптивен
|
||||
Restore Възстановяване
|
||||
Restore every preference to its default (applied on OK) Възстановяване на всички настройки по подразбиране (прилага се при ОПК)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Показва върху платното лента с команди за селекцията или инструмента; тя се скрива по време на влачене и в режим на презентация.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Колко далеч клавиш със стрелка премества селекцията; с Shift я премества десет пъти по-далеч.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. Ъгълът на осите, по които преместват клавишите със стрелки и към които Shift ограничава рисуването и преместването.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. Радиусът на ъгъла, с който рисува инструментът „Закръглен правоъгълник“; промяната на радиуса по време на рисуване променя и тази стойност.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Колко надясно и надолу „Поставяне“ премества копието, когато не е зададена позиция, например от скрипт; „Поставяне“ в приложението го поставя в центъра на изгледа.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Спира инструмента „Перо“ да изтрива опорната точка, върху която щракнете на избран контур, или да добавя точка там, където щракнете върху сегмента му.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Инструментите за рисуване показват показалец във форма на кръст вместо иконата си; Caps Lock прави същото, докато е включен.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Показва подсказка, когато показалецът спре върху бутон или поле, които имат такава.
|
||||
Shows a warning before a script you choose runs. Показва предупреждение, преди да се изпълни скрипт, който изберете.
|
||||
Smooths the edges of artwork on the canvas. Изглажда ръбовете на графиката върху платното.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. „Селекция › Същото › Цвят на запълване“, „Цвят на щриха“ и „Запълване и щрих“ намират само същия нюанс на глобална или плътна мостра, а не всеки неин нюанс.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Показва началния екран, когато няма отворен документ; ако е изключено, прозорецът остава празен, докато не щракнете „Начало“.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Измерва обектите заедно с щрихите и ефектите, които променят формата, за размер, позиция и подравняване; сенките, сиянията и замъгляванията не се измерват.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. При мащаб 100 % един инч от документа заема 96 екранни точки вместо 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Двойно щракване върху група, контур или изображение с инструмента „Селекция“ ги отваря в режим на изолация.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Запълванията и щрихите с мостра се трансформират заедно с графиката, освен ако трансформацията или менюто на панела „Трансформиране“ не избере друго.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Радиусите на динамичните ъгли се мащабират заедно с графиката, освен ако мащабирането не избере друго.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Дебелините на щрихите, тиретата и разстоянията на ефектите се мащабират заедно с графиката, освен ако мащабирането не избере друго.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. Колелцето на мишката мащабира платното, вместо да го превърта.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Колелцето на мишката с натиснат Cmd/Ctrl превърта платното настрани.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Влаченето настрани върху етикета на числово поле променя стойността на полето.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Жест за завъртане с два пръста върху тъчпад завърта изгледа на платното.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Задържането на клавишната комбинация на инструмент го избира, докато я пуснете, а след това отново се избира предишният инструмент.
|
||||
Shows the bounding box while you move the selection or draw a shape. Показва ограничителната рамка, докато премествате селекцията или рисувате форма.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. „Създаване на режещи знаци“ рисува знаци в японски стил вместо в римски.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Новата графика взема само запълването и щриха на селекцията; ако е изключено, взема целия облик на избрания обект.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Промяната на ширината или височината в панела „Трансформиране“, панела „Свойства“ или контролния панел пропорционално променя другия размер.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Свойствата на динамичен правоъгълник показват едно поле „Радиус на ъгъла“ за четирите ъгъла; ако е изключено, всеки ъгъл има свое поле.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Какво трансформират промените в панела „Трансформиране“: обекта, плочките на мострата му или и двете; „По подразбиране“ следва „Трансформиране на плочките на мострата“.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Когато е избран един екземпляр на символ, панелът „Трансформиране“ използва регистрационната точка на символа като опорна точка.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Затъмнява платното извън работните области, докато инструментът „Работна област“ е активен.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Когато „Затъмняване на областта извън работната област“ е включено, областта извън работните области остава тъмна, докато влачите с инструмента „Работна област“.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. Единицата за новите документи от вградените размери, освен тези в пиксели, и за отворените файлове без записана единица; ако я изберете тук и натиснете ОК, тя става и единица на активния документ.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Дебелините на щрихите, тиретата и междините се показват в тази единица и въведените за тях числа се четат в нея.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Размерите на текста, междуредието и отстъпът на базовата линия се показват в тази единица и въведените за тях числа се четат в нея.
|
||||
@@ -3200,6 +3237,7 @@ digits Malayalam Малаялам
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} от {n} резултат. Продължете да пишете, за да ги стесните.|{shown} от {n} резултата. Продължете да пишете, за да ги стесните.
|
||||
Recent Commands Последни команди
|
||||
No recent commands Няма последни команди
|
||||
Search commands Търсене на команди
|
||||
Search Commands… Търсене на команди…
|
||||
Secondary Вторичен
|
||||
Section Symbol Символ за раздел
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -218,6 +218,9 @@
|
||||
Mask Maska
|
||||
Rasterize… Rasteriziraj…
|
||||
Create Gradient Mesh… Kreiraj gradijentnu mrežu…
|
||||
Flat Ravno
|
||||
To Center Prema sredini
|
||||
To Edge Prema ivici
|
||||
Create Object Mosaic… Kreiraj mozaik objekata…
|
||||
Vector Halftone… Vektorski polutonovi…
|
||||
Create Trim Marks Kreiraj oznake za obrezivanje
|
||||
@@ -1304,6 +1307,7 @@ lighting Light Svjetlo
|
||||
Search commands, tools, panels and effects Pretraži naredbe, alate, panele i efekte
|
||||
Style: Stil:
|
||||
Switch workspace Promijeni radni prostor
|
||||
Search commands Pretraži naredbe
|
||||
Show all open documents Prikaži sve otvorene dokumente
|
||||
Use Koristite
|
||||
the object to select | objekat za odabir |
|
||||
@@ -2825,7 +2829,8 @@ digits Malayalam Malajalam
|
||||
Hide Video Rulers Sakrij video ravnala
|
||||
Client-side (.html) Na strani klijenta (.html)
|
||||
Color Reduction: Smanjenje boja:
|
||||
Lossless (lossy WebP isn't available yet) Bez gubitaka (WebP s gubicima još nije dostupan)
|
||||
Lossless Bez gubitaka
|
||||
Lossy S gubicima
|
||||
Scans: Skenovi:
|
||||
Server-side (.map) Na strani servera (.map)
|
||||
{format} Options Opcije za {format}
|
||||
@@ -3888,6 +3893,7 @@ theme Appearance Izgled
|
||||
Command Click to Select Objects Behind Command-klik za odabir objekata iza
|
||||
Constrain Angle Ograniči ugao
|
||||
Constrain Width and Height Proportions Zadrži proporcije širine i visine
|
||||
Copy Width to Height Kopiraj širinu u visinu
|
||||
Construction Guides Konstrukcijske vodilice
|
||||
Curvature Tool Alat zakrivljenost
|
||||
Data Recovery Oporavak podataka
|
||||
@@ -4410,6 +4416,38 @@ font-technology Variable Varijabilni
|
||||
Preferences Postavke
|
||||
Previous Prethodno
|
||||
Restore every preference to its default (applied on OK) Vrati svaku postavku na zadanu vrijednost (primjenjuje se na U redu)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Prikazuje na platnu traku s naredbama za odabir ili alat; skriva se dok prevlačite i u načinu prezentacije.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Koliko daleko tipka sa strelicom pomjera odabir; uz Shift ga pomjera deset puta dalje.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. Ugao osa duž kojih pomjeraju tipke sa strelicama i na koje Shift ograničava crtanje i pomjeranje.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. Poluprečnik ugla kojim crta alat Zaobljeni pravougaonik; promjena poluprečnika tokom crtanja mijenja i ovu vrijednost.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Koliko udesno i nadolje Zalijepi pomjera kopiju kada položaj nije zadan, na primjer iz skripte; Zalijepi u aplikaciji je stavlja u sredinu prikaza.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Sprječava da alat Pero briše sidrenu tačku na koju kliknete na odabranoj putanji ili dodaje tačku tamo gdje kliknete na njen segment.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Alati za crtanje prikazuju pokazivač u obliku krstića umjesto svoje ikone; Caps Lock čini isto dok je uključen.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Prikazuje savjet kada se pokazivač zadrži na dugmetu ili polju koje ga ima.
|
||||
Shows a warning before a script you choose runs. Prikazuje upozorenje prije nego što se pokrene skripta koju odaberete.
|
||||
Smooths the edges of artwork on the canvas. Izglađuje rubove grafike na platnu.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. Odabir › Isto › Boja ispune, Boja poteza i Ispuna i potez pronalaze samo istu nijansu globalnog ili spot uzorka, a ne bilo koju njegovu nijansu.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Prikazuje početni ekran kada nijedan dokument nije otvoren; kada je isključeno, prozor ostaje prazan dok ne kliknete Početna.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Mjeri objekte zajedno s potezima i efektima koji mijenjaju oblik za veličinu, položaj i poravnanje; sjene, sjaj i zamućenja se ne mjere.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. Pri zumu od 100% jedan inč dokumenta zauzima 96 tačaka ekrana umjesto 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Dvostruki klik na grupu, putanju ili sliku alatom Odabir otvara ih u načinu izolacije.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Ispune i potezi s uzorkom transformišu se zajedno s grafikom, osim ako transformacija ili meni panela Transformiši ne odabere drugačije.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Poluprečnici dinamičnih uglova skaliraju se zajedno s grafikom, osim ako skaliranje ne odabere drugačije.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Debljine poteza, crtice i udaljenosti efekata skaliraju se zajedno s grafikom, osim ako skaliranje ne odabere drugačije.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. Točkić miša zumira platno umjesto da ga pomjera.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Točkić miša uz pritisnut Cmd/Ctrl pomjera platno u stranu.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Prevlačenje u stranu po oznaci brojčanog polja mijenja vrijednost polja.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Pokret rotacije s dva prsta na dodirnoj podlozi rotira prikaz platna.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Držanje prečice alata bira taj alat dok je ne pustite, a zatim se ponovo bira prethodni alat.
|
||||
Shows the bounding box while you move the selection or draw a shape. Prikazuje granični okvir dok pomjerate odabir ili crtate oblik.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. Kreiraj oznake za obrezivanje crta oznake u japanskom stilu umjesto rimskih.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Nova grafika preuzima samo ispunu i potez odabira; kada je isključeno, preuzima cijeli izgled odabranog objekta.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Promjena širine ili visine u panelu Transformiši, panelu Svojstva ili kontrolnom panelu proporcionalno mijenja drugu dimenziju.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Svojstva dinamičnog pravougaonika prikazuju jedno polje Poluprečnik ugla za sva četiri ugla; kada je isključeno, svaki ugao ima svoje polje.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Šta transformišu izmjene u panelu Transformiši: objekat, pločice njegovog uzorka ili oboje; Zadano prati Transformiši pločice uzorka.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Kada je odabrana jedna instanca simbola, panel Transformiši koristi tačku registracije simbola kao referentnu tačku.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Zatamnjuje platno izvan radnih ploča dok je alat Radna ploča aktivan.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Kada je uključeno Zatamni područje izvan radne ploče, područje izvan radnih ploča ostaje tamno dok prevlačite alatom Radna ploča.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. Jedinica za nove dokumente ugrađenih veličina, osim onih u pikselima, i za otvorene datoteke bez zapisane jedinice; ako je odaberete ovdje i kliknete U redu, postaje i jedinica aktivnog dokumenta.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Debljine poteza, crtice i razmaci prikazuju se u ovoj jedinici, a brojevi uneseni za njih čitaju se u njoj.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Veličine teksta, prored i pomak osnovne linije prikazuju se u ovoj jedinici, a brojevi uneseni za njih čitaju se u njoj.
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -884,6 +884,7 @@ antiAlias Sharp Nítid
|
||||
Constrain Restringeix
|
||||
Constrain Angle Angle de restricció
|
||||
Constrain Width and Height Proportions Restringeix les proporcions d’amplada i alçada
|
||||
Copy Width to Height Copia l’amplada a l’alçada
|
||||
Construction Guides Guies de construcció
|
||||
Contextual Alternates Alternatives contextuals
|
||||
Contextual Task Bar Barra de tasques contextual
|
||||
@@ -989,6 +990,9 @@ antiAlias Sharp Nítid
|
||||
Create from Selection Crea a partir de la selecció
|
||||
Create From: Crea a partir de:
|
||||
Create Gradient Mesh… Crea una malla de degradat…
|
||||
Flat Pla
|
||||
To Center Cap al centre
|
||||
To Edge Cap a la vora
|
||||
Create Graph Crea un gràfic
|
||||
Create New Fields by Crea camps nous mitjançant
|
||||
Create New Layer Crea una capa nova
|
||||
@@ -2561,7 +2565,8 @@ digits Malayalam Malaiàlam
|
||||
Long Lines Línies llargues
|
||||
Long Strokes Traços llargs
|
||||
Longest: El més llarg:
|
||||
Lossless (lossy WebP isn't available yet) Sense pèrdua (el WebP amb pèrdua encara no està disponible)
|
||||
Lossless Sense pèrdua
|
||||
Lossy Amb pèrdua
|
||||
Lossy: Amb pèrdua:
|
||||
Low Baix
|
||||
Low Fidelity Photo Foto de baixa fidelitat
|
||||
@@ -3804,6 +3809,38 @@ digits Malayalam Malaiàlam
|
||||
Responsive Adaptatiu
|
||||
Restore Restaura
|
||||
Restore every preference to its default (applied on OK) Restaura cada preferència al seu valor predeterminat (s’aplica en prémer D’acord)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Mostra al llenç una barra d’ordres per a la selecció o l’eina; s’amaga mentre arrossegueu i en el mode de presentació.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Quant mou la selecció una tecla de fletxa; amb Maj, la mou deu vegades més.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. L’angle dels eixos al llarg dels quals mouen les tecles de fletxa i als quals Maj restringeix el dibuix i el moviment.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. El radi de cantonada amb què dibuixa l’eina Rectangle arrodonit; canviar el radi mentre dibuixeu també canvia aquest valor.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Quant desplaça Enganxa la còpia cap a la dreta i cap avall quan no es dona cap posició, com des d’un script; Enganxa a l’aplicació la centra a la vista.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Impedeix que l’eina Ploma suprimeixi el punt d’ancoratge on feu clic en un traçat seleccionat o n’afegeixi un on feu clic al seu segment.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Les eines de dibuix mostren un punter en creu en lloc de la seva icona; Bloq Maj fa el mateix mentre està activat.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Mostra un consell quan el punter s’atura sobre un botó o un camp que en té.
|
||||
Shows a warning before a script you choose runs. Mostra un avís abans que s’executi un script que trieu.
|
||||
Smooths the edges of artwork on the canvas. Suavitza les vores de la il·lustració al llenç.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. Selecció › Igual › Color de farciment, Color del traç i Farciment i traç només coincideixen amb el mateix matís d’una mostra global o de tinta plana, no amb qualsevol matís seu.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Mostra la pantalla d’inici quan no hi ha cap document obert; desactivada, la finestra queda buida fins que feu clic a Inici.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Mesura els objectes amb els traços i els efectes que en canvien la forma per a la mida, la posició i l’alineació; les ombres, les lluïsors i els desenfocaments no es mesuren.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. Amb un zoom del 100 %, una polzada del document ocupa 96 punts de pantalla en lloc de 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Fer doble clic en un grup, traçat o imatge amb l’eina Selecció l’obre en mode d’aïllament.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Els farciments i traços de motiu es transformen amb la il·lustració, tret que una transformació o el menú del panell Transforma triï una altra cosa.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Els radis de cantonada dinàmics s’escalen amb la il·lustració, tret que l’escalat triï una altra cosa.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Els gruixos de traç, els guions i les distàncies dels efectes s’escalen amb la il·lustració, tret que l’escalat triï una altra cosa.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. La roda del ratolí fa zoom al llenç en lloc de desplaçar-lo.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. La roda del ratolí amb Cmd/Ctrl premut desplaça el llenç en horitzontal.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Arrossegar en horitzontal sobre l’etiqueta d’un camp numèric canvia el valor del camp.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Un gest de rotació amb dos dits al trackpad gira la vista del llenç.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Mantenir premuda la drecera d’una eina la tria fins que la deixeu anar, i després es torna a triar l’eina anterior.
|
||||
Shows the bounding box while you move the selection or draw a shape. Mostra el quadre delimitador mentre moveu la selecció o dibuixeu una forma.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. Crea marques de retall dibuixa marques d’estil japonès en lloc de romanes.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. La il·lustració nova pren només el farciment i el traç de la selecció; desactivada, pren tota l’aparença de l’objecte seleccionat.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Canviar l’amplada o l’alçada al panell Transforma, al panell Propietats o al panell Control canvia l’altra proporcionalment.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Les propietats d’un rectangle dinàmic mostren un sol camp Radi de cantonada per a les quatre cantonades; desactivada, cada cantonada té el seu propi camp.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Què transformen els canvis al panell Transforma: l’objecte, les peces del seu motiu o tots dos; Predeterminat segueix Transforma les peces del motiu.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Amb una instància de símbol seleccionada, el panell Transforma fa servir el punt de registre del símbol com a punt de referència.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Enfosqueix el llenç fora dels taulers mentre l’eina Tauler està activa.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Amb Enfosqueix la regió fora del tauler activat, l’àrea fora dels taulers continua fosca mentre arrossegueu amb l’eina Tauler.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. La unitat dels documents nous de mides predefinides, excepte les mides en píxels, i dels fitxers oberts que no registren cap unitat; si la trieu aquí i feu clic a D’acord, també passa a ser la unitat del document actiu.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Els gruixos de traç, els guions i els espais es mostren en aquesta unitat, i els nombres que s’hi escriuen es llegeixen en aquesta unitat.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Les mides del text, l’interlineat i el desplaçament de la línia de base es mostren en aquesta unitat, i els nombres que s’hi escriuen es llegeixen en aquesta unitat.
|
||||
@@ -4129,6 +4166,7 @@ digits Malayalam Malaiàlam
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} de {n} resultat. Continueu escrivint per reduir-los.|{shown} de {n} resultats. Continueu escrivint per reduir-los.
|
||||
Recent Commands Ordres recents
|
||||
No recent commands No hi ha ordres recents
|
||||
Search commands Cerca ordres
|
||||
Search Commands… Cerca ordres…
|
||||
Search Fonts Folder Cerca a la carpeta de tipus de lletra
|
||||
Searching… Cercant…
|
||||
@@ -7899,6 +7937,7 @@ breakText Glyphs Glifs
|
||||
@msg Too many Revolve faces for visibility evaluation Massa cares de Revolució per avaluar-ne la visibilitat
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft llegeix com a màxim {ASE_MAX_ENTRIES} colors i grups d’un fitxer d’intercanvi de mostres, i aquesta biblioteca en té {entries}
|
||||
@msg WebP encoding failed: {e} La codificació WebP ha fallat: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless La codificació WebP ha fallat: la imatge és massa gran per a WebP amb pèrdua: reduïu la resolució o trieu Sense pèrdua
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `index` must be a whole number `index` ha de ser un nombre enter
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -224,6 +224,9 @@
|
||||
Mask Maska
|
||||
Rasterize… Rastrovat…
|
||||
Create Gradient Mesh… Vytvořit přechodovou síť…
|
||||
Flat Ploché
|
||||
To Center Ke středu
|
||||
To Edge K okraji
|
||||
Create Object Mosaic… Vytvořit mozaiku objektů…
|
||||
Vector Halftone… Vektorový polotón…
|
||||
Create Trim Marks Vytvořit značky ořezu
|
||||
@@ -1328,6 +1331,7 @@ lighting Light Světlo
|
||||
Search commands, tools, panels and effects Hledat příkazy, nástroje, panely a efekty
|
||||
Style: Styl:
|
||||
Switch workspace Přepnout pracovní prostor
|
||||
Search commands Hledat příkazy
|
||||
Show all open documents Zobrazit všechny otevřené dokumenty
|
||||
Use Příkazem
|
||||
the object to select | na objekt jej vybere |
|
||||
@@ -2909,7 +2913,8 @@ digits Malayalam Malajálamské
|
||||
Hide Video Rulers Skrýt video pravítka
|
||||
Client-side (.html) Na straně klienta (.html)
|
||||
Color Reduction: Redukce barev:
|
||||
Lossless (lossy WebP isn't available yet) Bezeztrátový (ztrátový WebP zatím není k dispozici)
|
||||
Lossless Bezeztrátový
|
||||
Lossy Ztrátový
|
||||
Scans: Průchody:
|
||||
Server-side (.map) Na straně serveru (.map)
|
||||
{format} Options Možnosti {format}
|
||||
@@ -3990,6 +3995,7 @@ theme Appearance Motiv
|
||||
Command Click to Select Objects Behind Kliknutím s Cmd vybírat objekty vzadu
|
||||
Constrain Angle Úhel omezení
|
||||
Constrain Width and Height Proportions Zachovat proporce šířky a výšky
|
||||
Copy Width to Height Kopírovat šířku do výšky
|
||||
Construction Guides Konstrukční vodítka
|
||||
Curvature Tool Nástroj Zakřivení
|
||||
Data Recovery Obnovení dat
|
||||
@@ -4514,6 +4520,38 @@ font-technology Variable Variabilní
|
||||
Preferences Předvolby
|
||||
Previous Předchozí
|
||||
Restore every preference to its default (applied on OK) Obnovit všechny předvolby na výchozí hodnoty (použije se po OK)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Zobrazí na plátně lištu příkazů pro výběr nebo nástroj; při tažení a v režimu prezentace se skryje.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Jak daleko klávesa se šipkou posune výběr; s klávesou Shift ho posune desetkrát dál.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. Úhel os, podél kterých posouvají klávesy se šipkami a ke kterým Shift váže kreslení a přesouvání.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. Poloměr rohu, kterým kreslí nástroj Zaoblený obdélník; změna poloměru během kreslení změní i tuto hodnotu.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Jak daleko doprava a dolů Vložit posune kopii, když není zadána poloha, například ze skriptu; Vložit v aplikaci ji umístí doprostřed zobrazení.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Zabrání nástroji Pero odstranit kotvicí bod, na který klepnete na vybrané cestě, nebo přidat bod tam, kde klepnete na její segment.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Kreslicí nástroje zobrazí místo své ikony nitkový kříž; Caps Lock udělá totéž, dokud je zapnutý.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Zobrazí tip, když ukazatel spočine na tlačítku nebo poli, které ho má.
|
||||
Shows a warning before a script you choose runs. Zobrazí upozornění před spuštěním skriptu, který zvolíte.
|
||||
Smooths the edges of artwork on the canvas. Vyhladí okraje kresby na plátně.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. Výběr › Stejné › Barva výplně, Barva tahu a Výplň a tah najdou jen stejný odstín globálního nebo přímého vzorku, ne libovolný jeho odstín.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Zobrazí domovskou obrazovku, když není otevřený žádný dokument; když je vypnuto, okno zůstane prázdné, dokud neklepnete na Domů.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Měří objekty včetně tahů a efektů měnících tvar pro velikost, polohu a zarovnání; stíny, záře a rozostření se neměří.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. Při zvětšení 100 % zabere jeden palec dokumentu 96 obrazovkových bodů místo 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Poklepání na skupinu, cestu nebo obraz nástrojem Výběr je otevře v izolačním režimu.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Výplně a tahy se vzorkem se transformují s kresbou, pokud transformace nebo nabídka panelu Transformace nezvolí jinak.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Poloměry živých rohů se mění s velikostí kresby, pokud změna velikosti nezvolí jinak.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Tloušťky tahů, čárky a vzdálenosti efektů se mění s velikostí kresby, pokud změna velikosti nezvolí jinak.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. Kolečko myši plátno zvětšuje a zmenšuje místo posouvání.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Kolečko myši s podrženou klávesou Cmd/Ctrl posouvá plátno do stran.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Tažení do stran po popisku číselného pole mění hodnotu pole.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Gesto otočení dvěma prsty na trackpadu otáčí zobrazení plátna.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Podržení zkratky nástroje vybere nástroj, dokud ji nepustíte, a pak se znovu vybere předchozí nástroj.
|
||||
Shows the bounding box while you move the selection or draw a shape. Zobrazí ohraničovací rámeček, když přesouváte výběr nebo kreslíte tvar.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. Vytvořit značky ořezu nakreslí značky v japonském stylu místo římských.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Nová kresba převezme jen výplň a tah výběru; když je vypnuto, převezme celý vzhled vybraného objektu.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Změna šířky nebo výšky v panelu Transformace, v panelu Vlastnosti nebo v ovládacím panelu úměrně změní i druhý rozměr.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Vlastnosti živého obdélníku zobrazí jedno pole Poloměr rohu pro všechny čtyři rohy; když je vypnuto, má každý roh vlastní pole.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Co úpravy v panelu Transformace transformují: objekt, dlaždice jeho vzorku nebo obojí; Výchozí se řídí volbou Transformovat dlaždice vzorku.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Když je vybraná jedna instance symbolu, panel Transformace použije registrační bod symbolu jako referenční bod.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Ztmaví plátno mimo pracovní plochy, dokud je aktivní nástroj Pracovní plocha.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Když je zapnuto Ztmavit oblast mimo pracovní plochu, zůstane oblast mimo pracovní plochy tmavá i při tažení nástrojem Pracovní plocha.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. Jednotka nových dokumentů z vestavěných velikostí kromě velikostí v obrazových bodech a otevřených souborů bez uložené jednotky; když ji zde zvolíte a kliknete na OK, nastaví se i jako jednotka aktivního dokumentu.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Tloušťky tahů, čárky a mezery se zobrazují v této jednotce a čísla pro ně zadaná se v ní čtou.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Velikosti písma, proklad a posun účaří se zobrazují v této jednotce a čísla pro ně zadaná se v ní čtou.
|
||||
@@ -7806,6 +7844,7 @@ breakText Glyphs Glyfy
|
||||
@msg Too many Revolve faces for visibility evaluation Rotační těleso má příliš mnoho stěn pro výpočet viditelnosti
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft čte ze souboru pro výměnu vzorníku nejvýše {ASE_MAX_ENTRIES} barev a skupin a tato knihovna jich má {entries}
|
||||
@msg WebP encoding failed: {e} kódování WebP selhalo: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless kódování WebP selhalo: obrázek je pro ztrátový WebP příliš velký: snižte rozlišení nebo zvolte Bezeztrátový
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view` je smallThumb, mediumThumb, largeThumb, smallList nebo largeList
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -1007,6 +1007,7 @@ liquify-list-end {0}, {1} {0} og {1}
|
||||
@msg Trap: more than {_1} pairs of objects lie close enough to trap, or too many objects share a horizontal range; trap fewer objects at a time Trap: mere end {_1} par objekter ligger tæt nok til overfyldning, eller for mange objekter deler et vandret område; anvend Trap på færre objekter ad gangen
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft læser højst {ASE_MAX_ENTRIES} farver og grupper fra en farveprøveudvekslingsfil, og dette bibliotek har {entries}
|
||||
@msg WebP encoding failed: {e} WebP-kodning mislykkedes: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless WebP-kodning mislykkedes: billedet er for stort til WebP med tab: sænk opløsningen, eller vælg Tabsfri
|
||||
@msg Weed Box and Lines: no weeding line fits outside the art, and the weed box is off Lugeramme og lugelinjer: ingen lugelinje passer uden for grafikken, og lugerammen er slået fra
|
||||
@msg \\ at end of pattern \\ i slutningen af mønsteret
|
||||
@msg `alignOn` cannot be empty `alignOn` må ikke være tom
|
||||
@@ -2904,6 +2905,9 @@ liquify-list-end {0}, {1} {0} og {1}
|
||||
Mask Maskér
|
||||
Rasterize… Rasterisér…
|
||||
Create Gradient Mesh… Opret gradientnet…
|
||||
Flat Flad
|
||||
To Center Mod midten
|
||||
To Edge Mod kanten
|
||||
Create Object Mosaic… Opret objektmosaik…
|
||||
Vector Halftone… Vektorhalvtone…
|
||||
Create Trim Marks Opret beskæringsmærker
|
||||
@@ -3924,6 +3928,7 @@ lighting Light Lys
|
||||
Search commands, tools, panels and effects Søg i kommandoer, værktøjer, paneler og effekter
|
||||
Style: Typografi:
|
||||
Switch workspace Skift arbejdsområde
|
||||
Search commands Søg i kommandoer
|
||||
Show all open documents Vis alle åbne dokumenter
|
||||
Use Brug
|
||||
the object to select | på objektet for at markere det |
|
||||
@@ -5376,7 +5381,8 @@ digits Malayalam Malayalam
|
||||
Hide Video Rulers Skjul videolinealer
|
||||
Client-side (.html) Klientbaseret (.html)
|
||||
Color Reduction: Farvereduktion:
|
||||
Lossless (lossy WebP isn't available yet) Tabsfri (WebP med tab er ikke tilgængelig endnu)
|
||||
Lossless Tabsfri
|
||||
Lossy Med tab
|
||||
Scans: Scanninger:
|
||||
Server-side (.map) Serverbaseret (.map)
|
||||
{format} Options Indstillinger for {format}
|
||||
@@ -6406,6 +6412,7 @@ theme Appearance Udseende
|
||||
Command Click to Select Objects Behind Command-klik for at markere objekter bagved
|
||||
Constrain Angle Fastlåsningsvinkel
|
||||
Constrain Width and Height Proportions Fasthold forholdet mellem bredde og højde
|
||||
Copy Width to Height Kopiér bredde til højde
|
||||
Construction Guides Konstruktionshjælpelinjer
|
||||
Curvature Tool Krumningsværktøj
|
||||
Data Recovery Datgendannelse
|
||||
@@ -6907,6 +6914,38 @@ font-technology Variable Variable
|
||||
Preferences Præferencer
|
||||
Previous Forrige
|
||||
Restore every preference to its default (applied on OK) Gendan alle præferencer til standard (anvendes ved OK)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Viser en bjælke med kommandoer for markeringen eller værktøjet på lærredet; den skjules, mens du trækker, og i præsentationstilstand.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Hvor langt en piletast flytter markeringen; med Skift flytter den ti gange så langt.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. Vinklen på de akser, som piletasterne flytter langs, og som Skift låser tegning og flytning til.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. Den hjørneradius, som værktøjet Afrundet rektangel tegner med; ændrer du radius under tegning, ændres denne værdi også.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Hvor langt til højre og ned Indsæt flytter kopien, når der ikke er angivet en position, som fra et script; Indsæt i appen placerer den midt i visningen.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Forhindrer værktøjet Pen i at slette det ankerpunkt, du klikker på en markeret sti, eller tilføje et, hvor du klikker på dens segment.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Tegneværktøjer viser en trådkorsmarkør i stedet for deres ikon; Caps Lock gør det samme, mens den er slået til.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Viser et tip, når markøren hviler på en knap eller et felt, der har et.
|
||||
Shows a warning before a script you choose runs. Viser en advarsel, før et script, du vælger, køres.
|
||||
Smooths the edges of artwork on the canvas. Udglatter kanterne på grafikken på lærredet.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. Markér › Samme › Fyldfarve, Stregfarve og Fyld og streg finder kun samme nuance af en global farveprøve eller staffagefarve, ikke en hvilken som helst nuance af den.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Viser startskærmen, når intet dokument er åbent; når den er slået fra, forbliver vinduet tomt, indtil du klikker på Home.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Måler objekter med deres streger og formændrende effekter til størrelse, position og justering; skygger, glød og sløringer måles ikke.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. Ved 100 % zoom fylder en tomme af dokumentet 96 skærmpunkter i stedet for 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Dobbeltklik på en gruppe, en sti eller et billede med værktøjet Markering åbner det i isolationstilstand.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Mønsterfyld og -streger transformeres med grafikken, medmindre en transformation eller menuen i panelet Transformér vælger andet.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Live-hjørneradier skaleres med grafikken, medmindre skaleringen vælger andet.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Stregtykkelser, streger i stiplede linjer og effektafstande skaleres med grafikken, medmindre skaleringen vælger andet.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. Musehjulet zoomer lærredet i stedet for at rulle det.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Musehjulet med Cmd/Ctrl holdt nede ruller lærredet sidelæns.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Når du trækker sidelæns på et talfelts etiket, ændres feltets værdi.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. En rotationsbevægelse med to fingre på en pegeplade roterer visningen af lærredet.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Når du holder et værktøjs genvejstast nede, er værktøjet valgt, indtil du slipper, og derefter vælges det forrige værktøj igen.
|
||||
Shows the bounding box while you move the selection or draw a shape. Viser afgrænsningsboksen, mens du flytter markeringen eller tegner en form.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. Opret beskæringsmærker tegner mærker i japansk stil i stedet for romerske.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Ny grafik får kun markeringens fyld og streg; når den er slået fra, får den hele det markerede objekts udseende.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Ændrer du bredden eller højden i panelet Transformér, panelet Egenskaber eller kontrolpanelet, ændres den anden forholdsmæssigt.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Egenskaberne for et live-rektangel viser ét felt Hjørneradius for alle fire hjørner; når den er slået fra, har hvert hjørne sit eget felt.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Hvad ændringer i panelet Transformér transformerer: objektet, dets mønsterfliser eller begge; Standard følger Transformer mønsterfliser.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Når én symbolforekomst er markeret, bruger panelet Transformér symbolets registreringspunkt som referencepunkt.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Gør lærredet uden for kunstpladerne mørkere, mens værktøjet Kunstplade er aktivt.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Når Ton området uden for kunstpladen ned er slået til, forbliver området uden for kunstpladerne mørkt, mens du trækker med værktøjet Kunstplade.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. Enheden for nye dokumenter i de indbyggede størrelser, bortset fra størrelser i pixels, og for åbnede filer, der ikke angiver en enhed; vælger du den her og klikker på OK, får det aktive dokument også denne enhed.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Stregtykkelser, streger og mellemrum vises i denne enhed, og tal, der skrives til dem, læses i den.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Tekststørrelser, linjeafstand og grundlinjeforskydning vises i denne enhed, og tal, der skrives til dem, læses i den.
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -180,6 +180,8 @@ antiAlias Sharp Scharf
|
||||
Crisp Klar
|
||||
Strong Stark
|
||||
Anti-aliasing: Glättung:
|
||||
Art Optimized Für Grafik optimiert
|
||||
Type Optimized Für Text optimiert
|
||||
Any Kind Beliebige Art
|
||||
Font Technology Schrifttechnologie
|
||||
font-technology Variable Variabel
|
||||
@@ -585,6 +587,7 @@ font-technology Variable Variabel
|
||||
Consolidate All Windows Alle Fenster zusammenführen
|
||||
Constrain Angle Winkelbeschränkung
|
||||
Constrain Width and Height Proportions Proportionen von Breite und Höhe beibehalten
|
||||
Copy Width to Height Breite in Höhe kopieren
|
||||
Construction Guides Konstruktionslinien
|
||||
Contextual Alternates Kontextbedingte Varianten
|
||||
Contextual Task Bar Kontextbezogene Taskleiste
|
||||
@@ -670,6 +673,9 @@ font-technology Variable Variabel
|
||||
Create from Selection Aus Auswahl erstellen
|
||||
Create From: Erstellen aus:
|
||||
Create Gradient Mesh… Verlaufsgitter erstellen…
|
||||
Flat Flach
|
||||
To Center Zur Mitte
|
||||
To Edge Zum Rand
|
||||
Create Graph Diagramm erstellen
|
||||
Create New Layer Neue Ebene erstellen
|
||||
Create New Sublayer Neue Unterebene erstellen
|
||||
@@ -2036,7 +2042,8 @@ file-filter Templates Vorlagen
|
||||
Lock Others Andere sperren
|
||||
Lock Slices Slices sperren
|
||||
Lock Station Point Standpunkt sperren
|
||||
Lossless (lossy WebP isn't available yet) Verlustfrei (verlustbehaftetes WebP ist noch nicht verfügbar)
|
||||
Lossless Verlustfrei
|
||||
Lossy Verlustbehaftet
|
||||
Lossy: Verlustbehaftet:
|
||||
Low Niedrig
|
||||
lowercase kleinbuchstaben
|
||||
@@ -3024,6 +3031,38 @@ digits Malayalam Malayalam
|
||||
Responsive Responsiv
|
||||
Restore Wiederherstellen
|
||||
Restore every preference to its default (applied on OK) Alle Voreinstellungen auf ihre Standardwerte zurücksetzen (wird bei OK angewendet)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Zeigt auf der Arbeitsfläche eine Leiste mit Befehlen für die Auswahl oder das Werkzeug; sie wird beim Ziehen und im Präsentationsmodus ausgeblendet.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Wie weit eine Pfeiltaste die Auswahl verschiebt; mit Umschalt verschiebt sie sie zehnmal so weit.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. Der Winkel der Achsen, entlang derer Pfeiltasten verschieben und an die Umschalt das Zeichnen und Verschieben bindet.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. Der Eckenradius, mit dem das Werkzeug „Abgerundetes Rechteck“ zeichnet; wird der Radius beim Zeichnen geändert, ändert sich auch dieser Wert.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Wie weit „Einfügen“ die Kopie nach rechts und unten versetzt, wenn keine Position angegeben ist, etwa aus einem Skript; „Einfügen“ in der App setzt sie in die Mitte der Ansicht.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Verhindert, dass der Zeichenstift einen angeklickten Ankerpunkt eines ausgewählten Pfads löscht oder an einem angeklickten Segment einen hinzufügt.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Zeichenwerkzeuge zeigen statt ihres Symbols ein Fadenkreuz; die Feststelltaste bewirkt dasselbe, solange sie aktiv ist.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Zeigt einen Tipp an, wenn der Zeiger auf einer Schaltfläche oder einem Feld mit Tipp ruht.
|
||||
Shows a warning before a script you choose runs. Zeigt eine Warnung an, bevor ein von Ihnen gewähltes Skript ausgeführt wird.
|
||||
Smooths the edges of artwork on the canvas. Glättet die Kanten des Bildmaterials auf der Arbeitsfläche.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. „Auswahl › Gleich › Flächenfarbe“, „Konturfarbe“ und „Fläche und Kontur“ finden nur denselben Farbton eines globalen oder Volltonfarbfelds, nicht jeden Farbton davon.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Zeigt den Startbildschirm, wenn kein Dokument geöffnet ist; ist die Option aus, bleibt das Fenster leer, bis Sie auf „Start“ klicken.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Misst Objekte für Größe, Position und Ausrichtung mit ihren Konturen und formverändernden Effekten; Schatten, Schein und Weichzeichnungen werden nicht gemessen.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. Bei 100 % Zoom nimmt ein Zoll des Dokuments 96 statt 72 Bildschirmpunkte ein.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Ein Doppelklick mit dem Auswahl-Werkzeug auf eine Gruppe, einen Pfad oder ein Bild öffnet sie im Isolationsmodus.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Musterflächen und -konturen werden mit dem Bildmaterial transformiert, sofern die Transformation oder das Menü des Bedienfelds „Transformieren“ nichts anderes wählt.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Live-Eckenradien skalieren mit dem Bildmaterial, sofern die Skalierung nichts anderes wählt.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Konturstärken, Striche und Effektabstände skalieren mit dem Bildmaterial, sofern die Skalierung nichts anderes wählt.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. Das Mausrad zoomt die Arbeitsfläche, statt sie zu scrollen.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Mit gedrückter Befehls-/Strg-Taste scrollt das Mausrad die Arbeitsfläche seitwärts.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Seitliches Ziehen auf der Beschriftung eines Zahlenfelds ändert den Wert des Felds.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Eine Drehgeste mit zwei Fingern auf einem Trackpad dreht die Ansicht der Arbeitsfläche.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Solange Sie das Tastaturkürzel eines Werkzeugs gedrückt halten, ist dieses Werkzeug gewählt; danach wird wieder das vorherige gewählt.
|
||||
Shows the bounding box while you move the selection or draw a shape. Zeigt den Begrenzungsrahmen an, während Sie die Auswahl verschieben oder eine Form zeichnen.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. „Schnittmarken erstellen“ zeichnet japanische statt römische Marken.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Neues Bildmaterial übernimmt nur Fläche und Kontur der Auswahl; ist die Option aus, übernimmt es das gesamte Aussehen des ausgewählten Objekts.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Wenn Sie Breite oder Höhe im Bedienfeld „Transformieren“, im Bedienfeld „Eigenschaften“ oder im Steuerungsbedienfeld ändern, ändert sich der andere Wert proportional.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Die Eigenschaften eines Live-Rechtecks zeigen ein Feld „Eckenradius“ für alle vier Ecken; ist die Option aus, hat jede Ecke ihr eigenes Feld.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Was Änderungen im Bedienfeld „Transformieren“ transformieren: das Objekt, seine Musterkacheln oder beides; „Standard“ folgt „Musterkacheln transformieren“.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Ist eine Symbolinstanz ausgewählt, verwendet das Bedienfeld „Transformieren“ den Registrierungspunkt des Symbols als Referenzpunkt.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Dunkelt die Arbeitsfläche außerhalb der Zeichenflächen ab, solange das Zeichenflächen-Werkzeug aktiv ist.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Ist „Bereich außerhalb der Zeichenfläche abblenden“ an, bleibt der Bereich außerhalb der Zeichenflächen dunkel, während Sie mit dem Zeichenflächen-Werkzeug ziehen.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. Die Einheit für neue Dokumente in den integrierten Größen außer Pixelgrößen und für geöffnete Dateien ohne gespeicherte Einheit; wenn Sie sie hier wählen und auf OK klicken, erhält auch das aktive Dokument diese Einheit.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Konturstärken, Striche und Lücken werden in dieser Einheit angezeigt, und dafür eingegebene Zahlen werden in ihr gelesen.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Schriftgrade, Zeilenabstand und Grundlinienversatz werden in dieser Einheit angezeigt, und dafür eingegebene Zahlen werden in ihr gelesen.
|
||||
@@ -3264,6 +3303,7 @@ digits Malayalam Malayalam
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} von {n} Ergebnis. Tippen Sie weiter, um sie einzugrenzen.|{shown} von {n} Ergebnissen. Tippen Sie weiter, um sie einzugrenzen.
|
||||
Recent Commands Zuletzt verwendete Befehle
|
||||
No recent commands Keine zuletzt verwendeten Befehle
|
||||
Search commands Befehle suchen
|
||||
Search Commands… Befehle suchen…
|
||||
Secondary Sekundär
|
||||
Section Symbol Paragrafenzeichen
|
||||
@@ -9271,6 +9311,7 @@ breakText Glyphs Glyphen
|
||||
@msg Too many Revolve faces for visibility evaluation Zu viele Kreiseln-Flächen für die Sichtbarkeitsberechnung
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft liest höchstens {ASE_MAX_ENTRIES} Farben und Gruppen aus einer Farbfeld-Austauschdatei, und diese Bibliothek hat {entries}
|
||||
@msg WebP encoding failed: {e} WebP-Kodierung fehlgeschlagen: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless WebP-Kodierung fehlgeschlagen: Das Bild ist für verlustbehaftetes WebP zu groß: Verringern Sie die Auflösung oder wählen Sie Verlustfrei
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view` ist smallThumb, mediumThumb, largeThumb, smallList oder largeList
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -566,6 +566,7 @@ font-technology Variable Μεταβλητές
|
||||
Consolidate All Windows Συγχώνευση όλων των παραθύρων
|
||||
Constrain Angle Περιορισμός γωνίας
|
||||
Constrain Width and Height Proportions Διατήρηση αναλογιών πλάτους και ύψους
|
||||
Copy Width to Height Αντιγραφή πλάτους στο ύψος
|
||||
Construction Guides Οδηγοί κατασκευής
|
||||
Contextual Alternates Εναλλακτικοί χαρακτήρες βάσει συμφραζομένων
|
||||
Contextual Task Bar Γραμμή εργασιών βάσει περιβάλλοντος
|
||||
@@ -651,6 +652,9 @@ font-technology Variable Μεταβλητές
|
||||
Create from Selection Δημιουργία από επιλογή
|
||||
Create From: Δημιουργία από:
|
||||
Create Gradient Mesh… Δημιουργία πλέγματος ντεγκραντέ…
|
||||
Flat Επίπεδο
|
||||
To Center Προς το κέντρο
|
||||
To Edge Προς την ακμή
|
||||
Create Graph Δημιουργία γραφήματος
|
||||
Create New Layer Δημιουργία νέου επιπέδου
|
||||
Create New Sublayer Δημιουργία νέου υποεπιπέδου
|
||||
@@ -3105,7 +3109,8 @@ theme Appearance Εμφάνιση
|
||||
Lock Grid Κλείδωμα πλέγματος
|
||||
Lock Others Κλείδωμα υπόλοιπων
|
||||
Lock Station Point Κλείδωμα σταθερού σημείου
|
||||
Lossless (lossy WebP isn't available yet) Χωρίς απώλειες (το WebP με απώλειες δεν υποστηρίζεται ακόμη)
|
||||
Lossless Χωρίς απώλειες
|
||||
Lossy Με απώλειες
|
||||
Lossy: Με απώλειες:
|
||||
lowercase πεζά
|
||||
LZW Compression Συμπίεση LZW
|
||||
@@ -3839,6 +3844,38 @@ digits Malayalam Μαλαγιάλαμ
|
||||
Reshape Type Area Αναδιαμόρφωση περιοχής κειμένου
|
||||
Responsive Αποκρινόμενο
|
||||
Restore every preference to its default (applied on OK) Επαναφορά όλων των προτιμήσεων στις προεπιλογές τους (εφαρμογή με το Εντάξει)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Εμφανίζει στον καμβά μια γραμμή εντολών για την επιλογή ή το εργαλείο· κρύβεται όσο σύρετε και στη λειτουργία παρουσίασης.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Πόσο μετακινεί την επιλογή ένα πλήκτρο βέλους· με το Shift τη μετακινεί δέκα φορές περισσότερο.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. Η γωνία των αξόνων κατά μήκος των οποίων μετακινούν τα πλήκτρα βέλους και στους οποίους το Shift περιορίζει τη σχεδίαση και τη μετακίνηση.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. Η ακτίνα γωνίας με την οποία σχεδιάζει το εργαλείο Στρογγυλεμένο ορθογώνιο· η αλλαγή της ακτίνας κατά τη σχεδίαση αλλάζει και αυτή την τιμή.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Πόσο δεξιά και κάτω μετακινεί η Επικόλληση το αντίγραφο όταν δεν δίνεται θέση, όπως από ένα σενάριο· η Επικόλληση στην εφαρμογή το τοποθετεί στο κέντρο της προβολής.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Εμποδίζει το εργαλείο Πένα να διαγράφει το σημείο αγκύρωσης που κάνετε κλικ σε επιλεγμένη διαδρομή ή να προσθέτει ένα όπου κάνετε κλικ στο τμήμα της.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Τα εργαλεία σχεδίασης εμφανίζουν δείκτη σταυρονήματος αντί για το εικονίδιό τους· το Caps Lock κάνει το ίδιο όσο είναι ενεργό.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Εμφανίζει μια συμβουλή όταν ο δείκτης σταματά πάνω σε κουμπί ή πεδίο που έχει.
|
||||
Shows a warning before a script you choose runs. Εμφανίζει μια προειδοποίηση πριν εκτελεστεί ένα σενάριο που επιλέγετε.
|
||||
Smooths the edges of artwork on the canvas. Εξομαλύνει τα άκρα του γραφικού στον καμβά.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. Τα Επιλογή › Ίδιο › Χρώμα γεμίσματος, Χρώμα περιγράμματος και Γέμισμα και περίγραμμα βρίσκουν μόνο την ίδια απόχρωση ενός καθολικού ή σημειακού δείγματος, όχι οποιαδήποτε απόχρωσή του.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Εμφανίζει την αρχική οθόνη όταν δεν είναι ανοιχτό κανένα έγγραφο· όταν είναι ανενεργό, το παράθυρο μένει κενό μέχρι να κάνετε κλικ στην Αρχική οθόνη.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Μετρά τα αντικείμενα μαζί με τα περιγράμματα και τα εφέ που αλλάζουν το σχήμα τους για μέγεθος, θέση και στοίχιση· οι σκιές, οι λάμψεις και οι θολώσεις δεν μετρώνται.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. Σε ζουμ 100%, μία ίντσα του εγγράφου καταλαμβάνει 96 στιγμές οθόνης αντί για 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Το διπλό κλικ σε ομάδα, διαδρομή ή εικόνα με το εργαλείο Επιλογή την ανοίγει σε λειτουργία απομόνωσης.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Τα γεμίσματα και τα περιγράμματα μοτίβου μετασχηματίζονται μαζί με το γραφικό, εκτός αν ένας μετασχηματισμός ή το μενού του πλαισίου Μετασχηματισμός επιλέξει κάτι άλλο.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Οι ακτίνες των δυναμικών γωνιών κλιμακώνονται μαζί με το γραφικό, εκτός αν η κλιμάκωση επιλέξει κάτι άλλο.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Τα πάχη περιγράμματος, οι παύλες και οι αποστάσεις των εφέ κλιμακώνονται μαζί με το γραφικό, εκτός αν η κλιμάκωση επιλέξει κάτι άλλο.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. Ο τροχός του ποντικιού κάνει ζουμ στον καμβά αντί να τον κυλά.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Ο τροχός του ποντικιού με πατημένο το Cmd/Ctrl κυλά τον καμβά οριζόντια.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Η μεταφορά προς τα πλάγια πάνω στην ετικέτα ενός αριθμητικού πεδίου αλλάζει την τιμή του πεδίου.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Μια κίνηση περιστροφής με δύο δάχτυλα σε επιφάνεια αφής περιστρέφει την προβολή του καμβά.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Όσο κρατάτε πατημένη τη συντόμευση ενός εργαλείου, το εργαλείο είναι επιλεγμένο, και μετά επιλέγεται ξανά το προηγούμενο εργαλείο.
|
||||
Shows the bounding box while you move the selection or draw a shape. Εμφανίζει το πλαίσιο οριοθέτησης όσο μετακινείτε την επιλογή ή σχεδιάζετε ένα σχήμα.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. Η Δημιουργία σημαδιών ξακρίσματος σχεδιάζει σημάδια ιαπωνικού τύπου αντί για ρωμαϊκά.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Τα νέα γραφικά παίρνουν μόνο το γέμισμα και το περίγραμμα της επιλογής· όταν είναι ανενεργό, παίρνουν όλη την εμφάνιση του επιλεγμένου αντικειμένου.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Η αλλαγή του πλάτους ή του ύψους στο πλαίσιο Μετασχηματισμός, στο πλαίσιο Ιδιότητες ή στη γραμμή Έλεγχος αλλάζει αναλογικά και το άλλο.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Οι ιδιότητες ενός δυναμικού ορθογωνίου εμφανίζουν ένα πεδίο Ακτίνα γωνίας και για τις τέσσερις γωνίες· όταν είναι ανενεργό, κάθε γωνία έχει δικό της πεδίο.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Τι μετασχηματίζουν οι αλλαγές στο πλαίσιο Μετασχηματισμός: το αντικείμενο, τα πλακίδια του μοτίβου του ή και τα δύο· η Προεπιλογή ακολουθεί τον Μετασχηματισμό πλακιδίων μοτίβου.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Όταν είναι επιλεγμένη μία παρουσία συμβόλου, το πλαίσιο Μετασχηματισμός χρησιμοποιεί το σημείο καταχώρισης του συμβόλου ως σημείο αναφοράς.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Σκουραίνει τον καμβά έξω από τους πίνακες σχεδίασης όσο είναι ενεργό το εργαλείο Πίνακας σχεδίασης.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Όταν είναι ενεργή η Σκίαση περιοχής εκτός πίνακα σχεδίασης, η περιοχή έξω από τους πίνακες σχεδίασης μένει σκοτεινή όσο σύρετε με το εργαλείο Πίνακας σχεδίασης.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. Η μονάδα για τα νέα έγγραφα από ενσωματωμένα μεγέθη, εκτός από μεγέθη σε εικονοστοιχεία, και για τα ανοιγμένα αρχεία χωρίς καταγεγραμμένη μονάδα· αν την επιλέξετε εδώ και πατήσετε Εντάξει, γίνεται και μονάδα του ενεργού εγγράφου.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Τα πάχη περιγράμματος, οι παύλες και τα διάκενα εμφανίζονται σε αυτή τη μονάδα και οι αριθμοί που πληκτρολογούνται γι’ αυτά διαβάζονται σε αυτή.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Τα μεγέθη κειμένου, το διάστιχο και η μετατόπιση γραμμής βάσης εμφανίζονται σε αυτή τη μονάδα και οι αριθμοί που πληκτρολογούνται γι’ αυτά διαβάζονται σε αυτή.
|
||||
@@ -3966,6 +4003,7 @@ digits Malayalam Μαλαγιάλαμ
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} από {n} αποτέλεσμα. Συνεχίστε να πληκτρολογείτε για να τα περιορίσετε.|{shown} από {n} αποτελέσματα. Συνεχίστε να πληκτρολογείτε για να τα περιορίσετε.
|
||||
Recent Commands Πρόσφατες εντολές
|
||||
No recent commands Δεν υπάρχουν πρόσφατες εντολές
|
||||
Search commands Αναζήτηση εντολών
|
||||
Search Commands… Αναζήτηση εντολών…
|
||||
Secondary Δευτερεύον
|
||||
Section Symbol Σύμβολο ενότητας
|
||||
@@ -7873,6 +7911,7 @@ breakText Glyphs Γλύφοι
|
||||
@msg Too many Revolve faces for visibility evaluation Πάρα πολλές έδρες περιστροφής για τον έλεγχο ορατότητας
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} Το VectorCraft διαβάζει το πολύ {ASE_MAX_ENTRIES} χρώματα και ομάδες από ένα αρχείο ανταλλαγής δειγμάτων, και αυτή η βιβλιοθήκη έχει {entries}
|
||||
@msg WebP encoding failed: {e} Η κωδικοποίηση WebP απέτυχε: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless Η κωδικοποίηση WebP απέτυχε: η εικόνα είναι πολύ μεγάλη για WebP με απώλειες: μειώστε την ανάλυση ή επιλέξτε Χωρίς απώλειες
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `index` must be a whole number Το `index` πρέπει να είναι ακέραιος αριθμός
|
||||
@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList Το `view` είναι smallThumb, mediumThumb, largeThumb, smallList ή largeList
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -607,6 +607,7 @@ font-technology Variable Variables
|
||||
Consolidate All Windows Consolidar todas las ventanas
|
||||
Constrain Angle Restringir ángulo
|
||||
Constrain Width and Height Proportions Restringir proporciones de anchura y altura
|
||||
Copy Width to Height Copiar anchura en altura
|
||||
Construction Guides Guías de construcción
|
||||
Contextual Alternates Alternativas contextuales
|
||||
Contextual Task Bar Barra de tareas contextual
|
||||
@@ -692,6 +693,9 @@ font-technology Variable Variables
|
||||
Create from Selection Crear a partir de la selección
|
||||
Create From: Crear a partir de:
|
||||
Create Gradient Mesh… Crear malla de degradado…
|
||||
Flat Plano
|
||||
To Center Hacia el centro
|
||||
To Edge Hacia el borde
|
||||
Create Graph Crear gráfico
|
||||
Create New Layer Crear capa nueva
|
||||
Create New Sublayer Crear subcapa nueva
|
||||
@@ -2037,7 +2041,8 @@ font-technology Variable Variables
|
||||
Lock Others Bloquear otros
|
||||
Lock Slices Bloquear sectores
|
||||
Lock Station Point Bloquear punto de estación
|
||||
Lossless (lossy WebP isn't available yet) Sin pérdida (WebP con pérdida aún no está disponible)
|
||||
Lossless Sin pérdida
|
||||
Lossy Con pérdida
|
||||
Lossy: Con pérdida:
|
||||
Low Baja
|
||||
lowercase minúsculas
|
||||
@@ -3064,6 +3069,38 @@ digits Malayalam Malayálam
|
||||
Responsive Adaptable
|
||||
Restore Restaurar
|
||||
Restore every preference to its default (applied on OK) Restaurar todas las preferencias a sus valores predeterminados (se aplica al Aceptar)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Muestra en el lienzo una barra de comandos para la selección o la herramienta; se oculta mientras arrastra y en el modo de presentación.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Cuánto mueve la selección una tecla de flecha; con Mayús, la mueve diez veces más.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. El ángulo de los ejes a lo largo de los cuales mueven las teclas de flecha y a los que Mayús restringe el dibujo y el movimiento.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. El radio de esquina con el que dibuja la herramienta Rectángulo redondeado; cambiar el radio mientras dibuja también cambia este valor.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Cuánto desplaza Pegar la copia hacia la derecha y hacia abajo cuando no se indica ninguna posición, como desde un script; Pegar en la aplicación la centra en la vista.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Impide que la herramienta Pluma elimine el punto de ancla en el que hace clic en un trazado seleccionado o añada uno donde hace clic en su segmento.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Las herramientas de dibujo muestran un puntero en cruz en lugar de su icono; Bloq Mayús hace lo mismo mientras está activado.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Muestra una sugerencia cuando el puntero se detiene sobre un botón o campo que la tiene.
|
||||
Shows a warning before a script you choose runs. Muestra una advertencia antes de que se ejecute un script que elija.
|
||||
Smooths the edges of artwork on the canvas. Suaviza los bordes de la ilustración en el lienzo.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. Selección › Igual › Color de relleno, Color de trazo y Relleno y trazo solo coinciden con el mismo matiz de una muestra global o de tinta plana, no con cualquier matiz de ella.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Muestra la pantalla de inicio cuando no hay ningún documento abierto; desactivada, la ventana queda vacía hasta que hace clic en Inicio.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Mide los objetos con sus trazos y los efectos que cambian su forma para el tamaño, la posición y la alineación; las sombras, los resplandores y los desenfoques no se miden.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. Con un zoom del 100 %, una pulgada del documento ocupa 96 puntos de pantalla en lugar de 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Al hacer doble clic en un grupo, trazado o imagen con la herramienta Selección, se abre en modo de aislamiento.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Los rellenos y trazos de motivo se transforman con la ilustración, salvo que una transformación o el menú del panel Transformar indique otra cosa.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Los radios de esquina dinámicos se escalan con la ilustración, salvo que el escalado indique otra cosa.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Los grosores de trazo, los guiones y las distancias de los efectos se escalan con la ilustración, salvo que el escalado indique otra cosa.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. La rueda del mouse aplica zoom al lienzo en lugar de desplazarlo.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. La rueda del mouse con Cmd/Ctrl pulsado desplaza el lienzo en horizontal.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Arrastrar en horizontal sobre la etiqueta de un campo numérico cambia el valor del campo.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Un gesto de giro con dos dedos en un trackpad gira la vista del lienzo.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Mantener pulsado el atajo de una herramienta la elige hasta que lo suelta, y después vuelve a elegirse la herramienta anterior.
|
||||
Shows the bounding box while you move the selection or draw a shape. Muestra el cuadro delimitador mientras mueve la selección o dibuja una forma.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. Crear marcas de recorte dibuja marcas de estilo japonés en lugar de romanas.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. La nueva ilustración toma solo el relleno y el trazo de la selección; desactivada, toma toda la apariencia del objeto seleccionado.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Cambiar el ancho o el alto en el panel Transformar, el panel Propiedades o el panel Control cambia el otro de forma proporcional.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Las propiedades de un rectángulo dinámico muestran un solo campo Radio de esquina para las cuatro esquinas; desactivada, cada esquina tiene su propio campo.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Lo que transforman los cambios del panel Transformar: el objeto, sus mosaicos de motivo o ambos; Predeterminado sigue a Transformar mosaicos de motivo.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Con una instancia de símbolo seleccionada, el panel Transformar usa el punto de registro del símbolo como punto de referencia.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Oscurece el lienzo fuera de las mesas de trabajo mientras la herramienta Mesa de trabajo está activa.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Con Atenuar región fuera de la mesa de trabajo activado, el área fuera de las mesas de trabajo sigue oscura mientras arrastra con la herramienta Mesa de trabajo.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. La unidad de los documentos nuevos de tamaños predefinidos, salvo los tamaños en píxeles, y de los archivos abiertos que no registran ninguna unidad; si la elige aquí y hace clic en Aceptar, también pasa a ser la unidad del documento activo.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Los grosores de trazo, los guiones y los huecos se muestran en esta unidad, y los números que se escriben para ellos se leen en ella.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Los tamaños de texto, el interlineado y el desplazamiento de línea de base se muestran en esta unidad, y los números que se escriben para ellos se leen en ella.
|
||||
@@ -3302,6 +3339,7 @@ digits Malayalam Malayálam
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} de {n} resultado. Sigue escribiendo para acotarlos.|{shown} de {n} resultados. Sigue escribiendo para acotarlos.
|
||||
Recent Commands Comandos recientes
|
||||
No recent commands No hay comandos recientes
|
||||
Search commands Buscar comandos
|
||||
Search Commands… Buscar comandos…
|
||||
Secondary Secundario
|
||||
Section Symbol Símbolo de sección
|
||||
@@ -7720,6 +7758,7 @@ breakText Glyphs Glifos
|
||||
@msg Too many Revolve faces for visibility evaluation Demasiadas caras de Revolución para evaluar la visibilidad
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft lee como máximo {ASE_MAX_ENTRIES} colores y grupos de un archivo de intercambio de muestras, y esta biblioteca tiene {entries}
|
||||
@msg WebP encoding failed: {e} Error al codificar WebP: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless Error al codificar WebP: la imagen es demasiado grande para WebP con pérdida: reduzca la resolución o elija Sin pérdida
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view` es smallThumb, mediumThumb, largeThumb, smallList o largeList
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -231,6 +231,9 @@
|
||||
Mask Maski
|
||||
Rasterize… Rasteroi…
|
||||
Create Gradient Mesh… Luo liukuväriverkko…
|
||||
Flat Tasainen
|
||||
To Center Keskustaa kohti
|
||||
To Edge Reunaa kohti
|
||||
Create Object Mosaic… Luo objektimosaiikki…
|
||||
Vector Halftone… Vektorirasterointi…
|
||||
Create Trim Marks Luo leikkuumerkit
|
||||
@@ -1306,6 +1309,7 @@ lighting Light Valo
|
||||
Search commands, tools, panels and effects Hae komentoja, työkaluja, paneeleita ja tehosteita
|
||||
Style: Tyyli:
|
||||
Switch workspace Vaihda työtilaa
|
||||
Search commands Hae komentoja
|
||||
Show all open documents Näytä kaikki avoimet asiakirjat
|
||||
Use Käytä
|
||||
the object to select | objektia valitaksesi sen |
|
||||
@@ -2853,7 +2857,8 @@ digits Malayalam Malajalam
|
||||
Hide Video Rulers Piilota videoviivaimet
|
||||
Client-side (.html) Asiakaspuoli (.html)
|
||||
Color Reduction: Värien vähennys:
|
||||
Lossless (lossy WebP isn't available yet) Häviötön (häviöllinen WebP ei ole vielä käytettävissä)
|
||||
Lossless Häviötön
|
||||
Lossy Häviöllinen
|
||||
Scans: Läpikäynnit:
|
||||
Server-side (.map) Palvelinpuoli (.map)
|
||||
{format} Options {format}-asetukset
|
||||
@@ -3928,6 +3933,7 @@ theme Appearance Ulkoasu
|
||||
Command Click to Select Objects Behind Valitse takana olevat objektit Komento-napsautuksella
|
||||
Constrain Angle Rajoita kulmaa
|
||||
Constrain Width and Height Proportions Säilytä leveyden ja korkeuden suhde
|
||||
Copy Width to Height Kopioi leveys korkeudeksi
|
||||
Construction Guides Rakenneapuviivat
|
||||
Curvature Tool Kaarevuustyökalu
|
||||
Data Recovery Tietojen palautus
|
||||
@@ -4433,6 +4439,38 @@ font-technology Variable Muuttuvat
|
||||
Preferences Asetukset
|
||||
Previous Edellinen
|
||||
Restore every preference to its default (applied on OK) Palauta kaikki asetukset oletuksiin (käytetään, kun valitaan OK)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Näyttää piirtopinnalla komentopalkin valinnalle tai työkalulle; se piiloutuu vetämisen ajaksi ja esitystilassa.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Kuinka pitkälle nuolinäppäin siirtää valintaa; vaihtonäppäimen kanssa se siirtää kymmenen kertaa pidemmälle.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. Niiden akselien kulma, joita pitkin nuolinäppäimet siirtävät ja joihin vaihtonäppäin rajoittaa piirtämisen ja siirtämisen.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. Kulman säde, jolla Pyöristetty suorakulmio -työkalu piirtää; säteen muuttaminen piirtämisen aikana muuttaa myös tätä arvoa.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Kuinka paljon oikealle ja alas Liitä siirtää kopiota, kun sijaintia ei anneta, kuten komentosarjasta; sovelluksessa Liitä keskittää kopion näkymään.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Estää Kynä-työkalua poistamasta ankkuripistettä, jota napsautat valitulla polulla, tai lisäämästä pistettä kohtaan, jossa napsautat sen segmenttiä.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Piirtotyökalut näyttävät kuvakkeensa sijaan ristikko-osoittimen; Caps Lock tekee saman, kun se on käytössä.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Näyttää vihjeen, kun osoitin pysähtyy painikkeen tai kentän päälle, jolla on vihje.
|
||||
Shows a warning before a script you choose runs. Näyttää varoituksen ennen kuin valitsemasi komentosarja suoritetaan.
|
||||
Smooths the edges of artwork on the canvas. Pehmentää piirtopinnalla olevan grafiikan reunat.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. Valinta › Sama › Täyttöväri, Viivan väri sekä Täyttö ja viiva löytävät vain globaalin tai spottivärimallin saman sävyn, eivät mitä tahansa sen sävyä.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Näyttää aloitusnäytön, kun yhtään asiakirjaa ei ole auki; kun asetus ei ole käytössä, ikkuna pysyy tyhjänä, kunnes napsautat Aloitus.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Mittaa objektit viivoineen ja muotoa muuttavine tehosteineen kokoa, sijaintia ja tasausta varten; varjoja, hehkuja ja sumennuksia ei mitata.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. 100 %:n zoomauksella asiakirjan tuuma vie 96 näyttöpistettä 72:n sijaan.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Ryhmän, polun tai kuvan kaksoisnapsautus Valinta-työkalulla avaa sen eristystilaan.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Kuviotäytöt ja -viivat muuntuvat grafiikan mukana, ellei muunnos tai Muunna-paneelin valikko valitse toisin.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Dynaamisten kulmien säteet skaalautuvat grafiikan mukana, ellei skaalaus valitse toisin.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Viivojen paksuudet, katkoviivat ja tehosteiden etäisyydet skaalautuvat grafiikan mukana, ellei skaalaus valitse toisin.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. Hiiren rulla zoomaa piirtopintaa vierittämisen sijaan.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Hiiren rulla vierittää piirtopintaa sivuttain, kun Cmd/Ctrl on painettuna.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Numerokentän nimiön vetäminen sivuttain muuttaa kentän arvoa.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Kahden sormen kiertoele kosketuslevyllä kiertää piirtopinnan näkymää.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Työkalun pikanäppäimen pitäminen painettuna valitsee työkalun, kunnes päästät irti, ja sitten edellinen työkalu valitaan uudelleen.
|
||||
Shows the bounding box while you move the selection or draw a shape. Näyttää rajausruudun, kun siirrät valintaa tai piirrät muotoa.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. Luo leikkuumerkit piirtää japanilaistyyliset merkit roomalaisten sijaan.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Uusi grafiikka saa vain valinnan täytön ja viivan; kun asetus ei ole käytössä, se saa valitun objektin koko ulkoasun.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Leveyden tai korkeuden muuttaminen Muunna-paneelissa, Ominaisuudet-paneelissa tai ohjauspalkissa muuttaa toista samassa suhteessa.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Dynaamisen suorakulmion ominaisuuksissa on yksi Kulman säde -kenttä kaikille neljälle kulmalle; kun asetus ei ole käytössä, jokaisella kulmalla on oma kenttänsä.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Mitä Muunna-paneelin muokkaukset muuntavat: objektin, sen kuvioruudut tai molemmat; Oletus noudattaa asetusta Muunna kuvioruudut.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Kun yksi symbolin esiintymä on valittuna, Muunna-paneeli käyttää symbolin kohdistuspistettä viitepisteenä.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Tummentaa piirtopinnan piirtoalustojen ulkopuolelta, kun Piirtoalusta-työkalu on käytössä.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Kun Himmennä piirtoalustan ulkopuolinen alue on käytössä, piirtoalustojen ulkopuolinen alue pysyy tummana, kun vedät Piirtoalusta-työkalulla.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. Yksikkö uusille asiakirjoille valmiissa kooissa pikselikokoja lukuun ottamatta ja avatuille tiedostoille, joihin ei ole tallennettu yksikköä; kun valitset sen tässä ja napsautat OK, siitä tulee myös aktiivisen asiakirjan yksikkö.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Viivan paksuudet, katkoviivat ja välit näytetään tässä yksikössä, ja niille kirjoitetut luvut luetaan siinä.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Tekstin koot, riviväli ja perusviivan siirto näytetään tässä yksikössä, ja niille kirjoitetut luvut luetaan siinä.
|
||||
@@ -7954,6 +7992,7 @@ breakText Glyphs Merkit
|
||||
@msg Too many Revolve faces for visibility evaluation Pyöräytä-tehosteessa on liian monta tahkoa näkyvyyden arviointiin
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft lukee värimallien vaihtotiedostosta enintään {ASE_MAX_ENTRIES} väriä ja ryhmää, ja tässä kirjastossa niitä on {entries}
|
||||
@msg WebP encoding failed: {e} WebP-koodaus epäonnistui: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless WebP-koodaus epäonnistui: kuva on liian suuri häviölliseen WebP-muotoon: pienennä tarkkuutta tai valitse Häviötön
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `index` must be a whole number `index` on oltava kokonaisluku
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 73.
|
@@ -608,6 +608,7 @@ font-technology Variable Variables
|
||||
Consolidate All Windows Regrouper toutes les fenêtres
|
||||
Constrain Angle Contraindre l’angle
|
||||
Constrain Width and Height Proportions Conserver les proportions de largeur et de hauteur
|
||||
Copy Width to Height Copier la largeur dans la hauteur
|
||||
Construction Guides Repères de construction
|
||||
Contextual Alternates Variantes contextuelles
|
||||
Contextual Task Bar Barre des tâches contextuelle
|
||||
@@ -693,6 +694,9 @@ font-technology Variable Variables
|
||||
Create from Selection Créer à partir de la sélection
|
||||
Create From: Créer à partir de :
|
||||
Create Gradient Mesh… Créer un filet de dégradé…
|
||||
Flat Plat
|
||||
To Center Vers le centre
|
||||
To Edge Vers le bord
|
||||
Create Graph Créer un graphe
|
||||
Create New Layer Créer un calque
|
||||
Create New Sublayer Créer un sous-calque
|
||||
@@ -2027,7 +2031,8 @@ font-technology Variable Variables
|
||||
Lock Others Verrouiller les autres
|
||||
Lock Slices Verrouiller les tranches
|
||||
Lock Station Point Verrouiller le point d’observation
|
||||
Lossless (lossy WebP isn't available yet) Sans perte (le WebP avec perte n’est pas encore disponible)
|
||||
Lossless Sans perte
|
||||
Lossy Avec perte
|
||||
Lossy: Avec perte :
|
||||
Low Faible
|
||||
lowercase minuscules
|
||||
@@ -3052,6 +3057,38 @@ digits Malayalam Malayalam
|
||||
Responsive Adaptatif
|
||||
Restore Restaurer
|
||||
Restore every preference to its default (applied on OK) Rétablir toutes les préférences à leur valeur par défaut (appliqué avec OK)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Affiche sur la zone de travail une barre de commandes pour la sélection ou l’outil. Elle se masque pendant un glissement et en mode Présentation.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Distance dont une touche fléchée déplace la sélection. Avec Maj, elle la déplace dix fois plus loin.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. Angle des axes le long desquels les touches fléchées déplacent et auxquels Maj contraint le dessin et le déplacement.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. Rayon d’angle avec lequel l’outil Rectangle arrondi dessine. Modifier le rayon pendant le dessin modifie aussi cette valeur.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Distance vers la droite et vers le bas dont Coller décale la copie quand aucune position n’est donnée, comme depuis un script. Coller dans l’application la centre dans la vue.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Empêche l’outil Plume de supprimer le point d’ancrage cliqué sur un tracé sélectionné, ou d’en ajouter un là où vous cliquez sur son segment.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Les outils de dessin affichent un pointeur en croix au lieu de leur icône. Le Verrouillage majuscules fait de même tant qu’il est activé.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Affiche une info-bulle quand le pointeur s’arrête sur un bouton ou un champ qui en a une.
|
||||
Shows a warning before a script you choose runs. Affiche un avertissement avant l’exécution d’un script que vous choisissez.
|
||||
Smooths the edges of artwork on the canvas. Lisse les bords des illustrations sur la zone de travail.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. Sélection › Identique › Couleur de fond, Couleur du contour et Fond et contour ne retiennent que la même teinte d’une nuance globale ou d’une couleur d’accompagnement, et non toutes ses teintes.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Affiche l’écran d’accueil quand aucun document n’est ouvert. Désactivée, la fenêtre reste vide jusqu’à ce que vous cliquiez sur Accueil.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Mesure les objets avec leurs contours et leurs effets qui modifient la forme pour la taille, la position et l’alignement. Les ombres, lueurs et flous ne sont pas mesurés.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. À 100 % de zoom, un pouce du document occupe 96 points d’écran au lieu de 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Un double-clic sur un groupe, un tracé ou une image avec l’outil Sélection l’ouvre en mode Isolation.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Les fonds et contours de motif se transforment avec l’illustration, sauf si une transformation ou le menu du panneau Transformation en décide autrement.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Les rayons d’angle dynamiques se mettent à l’échelle avec l’illustration, sauf si la mise à l’échelle en décide autrement.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Les épaisseurs de contour, les tirets et les distances des effets se mettent à l’échelle avec l’illustration, sauf si la mise à l’échelle en décide autrement.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. La molette de la souris zoome sur la zone de travail au lieu de la faire défiler.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. La molette de la souris avec Cmd/Ctrl enfoncée fait défiler la zone de travail latéralement.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Faire glisser latéralement le libellé d’un champ numérique modifie la valeur du champ.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Un geste de rotation à deux doigts sur un pavé tactile fait pivoter la vue de la zone de travail.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Maintenir le raccourci d’un outil choisit cet outil jusqu’à ce que vous le relâchiez, puis l’outil précédent est de nouveau choisi.
|
||||
Shows the bounding box while you move the selection or draw a shape. Affiche le cadre de sélection pendant que vous déplacez la sélection ou dessinez une forme.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. Créer des traits de coupe dessine des traits de style japonais au lieu de traits romains.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Une nouvelle illustration ne reprend que le fond et le contour de la sélection. Désactivée, elle reprend tout l’aspect de l’objet sélectionné.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Modifier la largeur ou la hauteur dans le panneau Transformation, le panneau Propriétés ou le panneau Contrôle modifie l’autre proportionnellement.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Les propriétés d’un rectangle dynamique affichent un seul champ Rayon de l’angle pour les quatre angles. Désactivée, chaque angle a son propre champ.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Les modifications du panneau Transformation transforment l’objet, ses carreaux de motif ou les deux, et Par défaut suit Transformer les carreaux de motif.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Quand une occurrence de symbole est sélectionnée, le panneau Transformation utilise le point d’alignement du symbole comme point de référence.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Assombrit la zone de travail hors des plans de travail tant que l’outil Plan de travail est actif.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Avec Assombrir la zone hors du plan de travail activé, la zone hors des plans de travail reste sombre pendant que vous faites glisser avec l’outil Plan de travail.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. L’unité des nouveaux documents de tailles prédéfinies, sauf les tailles en pixels, et des fichiers ouverts qui n’enregistrent aucune unité, et si vous la choisissez ici puis cliquez sur OK, elle devient aussi l’unité du document actif.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Les épaisseurs de contour, les tirets et les espaces s’affichent dans cette unité, et les nombres saisis pour eux sont lus dans cette unité.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Les tailles de texte, l’interlignage et le décalage de la ligne de base s’affichent dans cette unité, et les nombres saisis pour eux sont lus dans cette unité.
|
||||
@@ -3290,6 +3327,7 @@ digits Malayalam Malayalam
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} sur {n} résultat. Continuez à taper pour les affiner.|{shown} sur {n} résultats. Continuez à taper pour les affiner.
|
||||
Recent Commands Commandes récentes
|
||||
No recent commands Aucune commande récente
|
||||
Search commands Chercher des commandes
|
||||
Search Commands… Rechercher des commandes…
|
||||
Secondary Secondaire
|
||||
Section Symbol Symbole de section
|
||||
@@ -9682,6 +9720,7 @@ breakText Glyphs Glyphes
|
||||
@msg Too many Revolve faces for visibility evaluation Trop de faces de révolution pour évaluer la visibilité
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft lit au plus {ASE_MAX_ENTRIES} couleurs et groupes d’un fichier d’échange de nuances, et cette bibliothèque en contient {entries}
|
||||
@msg WebP encoding failed: {e} Échec de l’encodage WebP : {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless Échec de l’encodage WebP : l’image est trop grande pour le WebP avec perte : réduisez la résolution ou choisissez Sans perte
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}` : {why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view` vaut smallThumb, mediumThumb, largeThumb, smallList ou largeList
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -236,6 +236,8 @@
|
||||
Anti-aliased Artwork એન્ટિ-એલિયાસ્ડ આર્ટવર્ક
|
||||
Anti-aliasing Method એન્ટિ-એલિયાસિંગ પદ્ધતિ
|
||||
Anti-aliasing: એન્ટિ-એલિયાસિંગ:
|
||||
Art Optimized આર્ટ માટે ઑપ્ટિમાઇઝ કરેલું
|
||||
Type Optimized ટેક્સ્ટ માટે ઑપ્ટિમાઇઝ કરેલું
|
||||
Appearance દેખાવ
|
||||
Appearance Attribute દેખાવ ગુણધર્મ
|
||||
Appearance Item દેખાવ આઇટમ
|
||||
@@ -429,6 +431,10 @@
|
||||
Break Text into Words ટેક્સ્ટને શબ્દોમાં તોડો
|
||||
Break Thread થ્રેડ તોડો
|
||||
Brick Offset: ઈંટ ઑફસેટ:
|
||||
Brick by Row પંક્તિ પ્રમાણે ઈંટ
|
||||
Brick by Column કૉલમ પ્રમાણે ઈંટ
|
||||
Hex by Column કૉલમ પ્રમાણે ષટ્કોણ
|
||||
Hex by Row પંક્તિ પ્રમાણે ષટ્કોણ
|
||||
Brightness તેજ
|
||||
Brightness/Contrast… તેજ/કૉન્ટ્રાસ્ટ…
|
||||
Brightness: તેજ:
|
||||
@@ -704,6 +710,7 @@
|
||||
Constrain મર્યાદિત કરો
|
||||
Constrain Angle ખૂણો મર્યાદિત કરો
|
||||
Constrain Width and Height Proportions પહોળાઈ અને ઊંચાઈનો પ્રમાણ મર્યાદિત કરો
|
||||
Copy Width to Height પહોળાઈને ઊંચાઈમાં નકલ કરો
|
||||
Construction Guides બાંધકામ ગાઇડ્સ
|
||||
Contextual Alternates સંદર્ભિત વૈકલ્પિક અક્ષરો
|
||||
Contextual Task Bar સંદર્ભિત ટાસ્ક બાર
|
||||
@@ -791,6 +798,9 @@
|
||||
Create From: આમાંથી બનાવો:
|
||||
Create Gradient Mesh ગ્રેડિયન્ટ મેશ બનાવો
|
||||
Create Gradient Mesh… ગ્રેડિયન્ટ મેશ બનાવો…
|
||||
Flat સપાટ
|
||||
To Center કેન્દ્ર તરફ
|
||||
To Edge કિનારી તરફ
|
||||
Create Graph ગ્રાફ બનાવો
|
||||
Create New Layer નવો લેયર બનાવો
|
||||
Create New Library નવી લાઇબ્રેરી બનાવો
|
||||
@@ -2101,7 +2111,8 @@
|
||||
Locked લૉક કરેલું
|
||||
Long લાંબું
|
||||
Longest: સૌથી લાંબું:
|
||||
Lossless (lossy WebP isn't available yet) લોસલેસ (લોસી WebP હજી ઉપલબ્ધ નથી)
|
||||
Lossless લોસલેસ
|
||||
Lossy લોસી
|
||||
Lossy: લોસી:
|
||||
Luminosity લ્યુમિનોસિટી
|
||||
Magic Wand મૅજિક વૅન્ડ
|
||||
@@ -3132,6 +3143,38 @@
|
||||
Restore પુનઃસ્થાપિત કરો
|
||||
Restore Recovered Documents પુનઃપ્રાપ્ત દસ્તાવેજો પુનઃસ્થાપિત કરો
|
||||
Restore every preference to its default (applied on OK) દરેક પસંદગી તેના ડિફોલ્ટ પર પુનઃસ્થાપિત કરો (ઠીક પર લાગુ થશે)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. કેનવાસ પર પસંદગી અથવા ટૂલ માટે કમાન્ડ બાર બતાવે છે; ખેંચતી વખતે અને પ્રેઝન્ટેશન મોડમાં તે છુપાય છે.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. એરો કી પસંદગીને કેટલી દૂર ખસેડે છે; Shift સાથે તે દસ ગણી દૂર ખસેડે છે.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. જે અક્ષો પર એરો કી ખસેડે છે અને જેના પર Shift દોરવાનું અને ખસેડવાનું બાંધે છે તેનો ખૂણો.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. ગોળાકાર લંબચોરસ ટૂલ જે ખૂણાની ત્રિજ્યાથી દોરે છે તે; દોરતી વખતે ત્રિજ્યા બદલવાથી આ મૂલ્ય પણ બદલાય છે.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. સ્ક્રિપ્ટની જેમ કોઈ સ્થાન ન અપાય ત્યારે ચોંટાડો નકલને જમણે અને નીચે કેટલી ખસેડે છે; એપમાં ચોંટાડો નકલને દૃશ્યની વચ્ચે મૂકે છે.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. પેન ટૂલને પસંદ કરેલા પાથ પર ક્લિક કરેલો એન્કર પોઇન્ટ કાઢવાથી, અથવા તેના સેગમેન્ટ પર ક્લિક કરેલી જગ્યાએ નવો ઉમેરવાથી રોકે છે.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. ડ્રોઇંગ ટૂલ્સ તેમના આઇકનને બદલે ક્રોસહેર પોઇન્ટર બતાવે છે; Caps Lock ચાલુ હોય ત્યારે પણ આવું જ થાય છે.
|
||||
Shows a tip when the pointer rests on a button or field that has one. ટિપ ધરાવતા બટન કે ફીલ્ડ પર પોઇન્ટર અટકે ત્યારે ટિપ બતાવે છે.
|
||||
Shows a warning before a script you choose runs. તમે પસંદ કરેલી સ્ક્રિપ્ટ ચાલે તે પહેલાં ચેતવણી બતાવે છે.
|
||||
Smooths the edges of artwork on the canvas. કેનવાસ પરના આર્ટવર્કની કિનારીઓ સુંવાળી કરે છે.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. પસંદ કરો › સમાન › ભરવાનો રંગ, સ્ટ્રોક રંગ અને ભરો અને સ્ટ્રોક ફક્ત ગ્લોબલ કે સ્પોટ સ્વૉચના એ જ ટિન્ટ સાથે મેળ ખાય છે, તેના કોઈપણ ટિન્ટ સાથે નહીં.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. કોઈ દસ્તાવેજ ખુલ્લો ન હોય ત્યારે હોમ સ્ક્રીન બતાવે છે; બંધ હોય ત્યારે તમે હોમ પર ક્લિક ન કરો ત્યાં સુધી વિન્ડો ખાલી રહે છે.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. કદ, સ્થાન અને ગોઠવણી માટે ઑબ્જેક્ટને તેમના સ્ટ્રોક અને આકાર બદલતી ઇફેક્ટ્સ સાથે માપે છે; છાયા, ગ્લો અને બ્લર માપવામાં આવતા નથી.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. 100% ઝૂમ પર દસ્તાવેજનો એક ઇંચ 72 ને બદલે 96 સ્ક્રીન પોઇન્ટ લે છે.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. પસંદગી ટૂલથી ગ્રુપ, પાથ કે છબી પર ડબલ-ક્લિક કરવાથી તે આઇસોલેશન મોડમાં ખુલે છે.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. પૅટર્ન ભરણ અને સ્ટ્રોક આર્ટવર્ક સાથે ટ્રાન્સફોર્મ થાય છે, સિવાય કે કોઈ ટ્રાન્સફોર્મ કે ટ્રાન્સફોર્મ પેનલનું મેનૂ બીજું પસંદ કરે.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. લાઇવ ખૂણાઓની ત્રિજ્યાઓ આર્ટવર્ક સાથે સ્કેલ થાય છે, સિવાય કે સ્કેલિંગ બીજું પસંદ કરે.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. સ્ટ્રોકની જાડાઈ, ડેશ અને ઇફેક્ટના અંતરો આર્ટવર્ક સાથે સ્કેલ થાય છે, સિવાય કે સ્કેલિંગ બીજું પસંદ કરે.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. માઉસ વ્હીલ કેનવાસને સ્ક્રોલ કરવાને બદલે ઝૂમ કરે છે.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Cmd/Ctrl દબાવી રાખીને માઉસ વ્હીલ ફેરવવાથી કેનવાસ બાજુમાં સ્ક્રોલ થાય છે.
|
||||
Dragging sideways on a numeric field's label changes the field's value. સંખ્યાત્મક ફીલ્ડના લેબલ પર બાજુમાં ખેંચવાથી ફીલ્ડનું મૂલ્ય બદલાય છે.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. ટ્રેકપેડ પર બે આંગળીથી ફેરવવાનો હાવભાવ કેનવાસનું દૃશ્ય ફેરવે છે.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. ટૂલની શોર્ટકટ કી દબાવી રાખવાથી છોડો ત્યાં સુધી તે ટૂલ પસંદ રહે છે, પછી અગાઉનું ટૂલ ફરી પસંદ થાય છે.
|
||||
Shows the bounding box while you move the selection or draw a shape. તમે પસંદગી ખસેડો કે આકાર દોરો ત્યારે બાઉન્ડિંગ બોક્સ બતાવે છે.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. ટ્રિમ માર્ક્સ બનાવો રોમન ને બદલે જાપાની શૈલીના ચિહ્નો દોરે છે.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. નવું આર્ટવર્ક પસંદગીનું ફક્ત ભરણ અને સ્ટ્રોક લે છે; બંધ હોય ત્યારે તે પસંદ કરેલા ઑબ્જેક્ટનો સંપૂર્ણ દેખાવ લે છે.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. ટ્રાન્સફોર્મ પેનલ, ગુણધર્મો પેનલ કે કંટ્રોલ બારમાં પહોળાઈ કે ઊંચાઈ બદલવાથી બીજું પ્રમાણસર બદલાય છે.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. લાઇવ લંબચોરસના ગુણધર્મો ચારેય ખૂણા માટે ખૂણાની ત્રિજ્યાનું એક જ ફીલ્ડ બતાવે છે; બંધ હોય ત્યારે દરેક ખૂણાનું પોતાનું ફીલ્ડ હોય છે.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. ટ્રાન્સફોર્મ પેનલમાંના ફેરફારો શું ટ્રાન્સફોર્મ કરે છે: ઑબ્જેક્ટ, તેની પૅટર્ન ટાઇલ્સ કે બંને; ડિફૉલ્ટ પૅટર્ન ટાઇલ્સ ટ્રાન્સફોર્મ કરો ને અનુસરે છે.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. એક સિમ્બોલ ઇન્સ્ટન્સ પસંદ હોય ત્યારે ટ્રાન્સફોર્મ પેનલ સિમ્બોલના રજિસ્ટ્રેશન પોઇન્ટને સંદર્ભ પોઇન્ટ તરીકે વાપરે છે.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. આર્ટબોર્ડ ટૂલ સક્રિય હોય ત્યારે આર્ટબોર્ડ બહારનો કેનવાસ ઘાટો કરે છે.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. આર્ટબોર્ડ બહારનો વિસ્તાર ઝાંખો કરો ચાલુ હોય ત્યારે, આર્ટબોર્ડ ટૂલથી ખેંચતી વખતે આર્ટબોર્ડ બહારનો વિસ્તાર ઘાટો રહે છે.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. પિક્સેલ સિવાયના બિલ્ટ-ઇન કદના નવા દસ્તાવેજો અને કોઈ એકમ ન નોંધતી ખોલેલી ફાઇલો માટેનો એકમ; અહીં તેને પસંદ કરીને ઠીક ક્લિક કરવાથી સક્રિય દસ્તાવેજનો એકમ પણ તે બને છે.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. સ્ટ્રોકની જાડાઈ, ડૅશ અને અંતર આ એકમમાં દેખાય છે, અને તેમના માટે ટાઇપ કરેલી સંખ્યાઓ આ એકમમાં વંચાય છે.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. ટાઇપના કદ, લીડિંગ અને બેઝલાઇન શિફ્ટ આ એકમમાં દેખાય છે, અને તેમના માટે ટાઇપ કરેલી સંખ્યાઓ આ એકમમાં વંચાય છે.
|
||||
@@ -3406,6 +3449,7 @@
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {n} માંથી {shown} પરિણામ. તેમને સંકુચિત કરવા લખતા રહો.|{n} માંથી {shown} પરિણામો. તેમને સંકુચિત કરવા લખતા રહો.
|
||||
Recent Commands તાજેતરના આદેશો
|
||||
No recent commands કોઈ તાજેતરના આદેશો નથી
|
||||
Search commands આદેશો શોધો
|
||||
Search images છબીઓ શોધો
|
||||
Searching… શોધી રહ્યા છીએ…
|
||||
Secondary ગૌણ
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 72 and column 5.
|
@@ -1019,6 +1019,7 @@ antiAlias Sharp शार्प
|
||||
Constrain सीमित करें
|
||||
Constrain Angle कंस्ट्रेन एंगल
|
||||
Constrain Width and Height Proportions चौड़ाई और ऊंचाई का अनुपात बनाए रखें
|
||||
Copy Width to Height चौड़ाई को ऊंचाई में कॉपी करें
|
||||
Construction Guides निर्माण गाइड
|
||||
Conté Crayon कॉन्टे क्रेयॉन
|
||||
Conté Crayon… कॉन्टे क्रेयॉन…
|
||||
@@ -1133,6 +1134,9 @@ antiAlias Sharp शार्प
|
||||
Create From: से बनाएँ:
|
||||
Create Gradient Mesh ग्रेडिएंट मेश बनाएँ
|
||||
Create Gradient Mesh… ग्रेडिएंट मेश बनाएँ…
|
||||
Flat समतल
|
||||
To Center केंद्र की ओर
|
||||
To Edge किनारे की ओर
|
||||
Create Graph ग्राफ़ बनाएँ
|
||||
Create New {kind} Style नई {kind} स्टाइल बनाएँ
|
||||
Create New Action नया एक्शन बनाएँ
|
||||
@@ -2805,7 +2809,8 @@ antiAlias Sharp शार्प
|
||||
Long Lines लंबी रेखाएँ
|
||||
Long Strokes लंबे स्ट्रोक
|
||||
Longest: सबसे लंबे:
|
||||
Lossless (lossy WebP isn't available yet) लॉसलेस (लॉसी WebP अभी उपलब्ध नहीं है)
|
||||
Lossless लॉसलेस
|
||||
Lossy लॉसी
|
||||
Lossy: हानि:
|
||||
Low निम्न
|
||||
Low Fidelity Photo लो फिडेलिटी फोटो
|
||||
@@ -4174,6 +4179,38 @@ antiAlias Sharp शार्प
|
||||
Responsive उत्तरदायी
|
||||
Restore पुनर्स्थापित करें
|
||||
Restore every preference to its default (applied on OK) प्रत्येक वरीयता को उसके डिफ़ॉल्ट में पुनर्स्थापित करें ( OK पर लागू)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. कैनवास पर सिलेक्शन या टूल के लिए कमांड बार दिखाता है; ड्रैग करते समय और प्रस्तुति मोड में यह छिप जाता है।
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. एरो कुंजी सिलेक्शन को कितनी दूर खिसकाती है; Shift के साथ यह दस गुना दूर खिसकाती है।
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. उन अक्षों का कोण जिनके साथ एरो कुंजियाँ खिसकाती हैं और जिन पर Shift ड्रॉइंग और खिसकाने को रोकता है।
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. वह कोने की त्रिज्या जिससे गोल आयत टूल ड्रॉ करता है; ड्रॉ करते समय त्रिज्या बदलने से यह मान भी बदल जाता है।
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. जब कोई स्थिति नहीं दी जाती, जैसे स्क्रिप्ट से, तब पेस्ट कॉपी को दाईं ओर और नीचे कितना खिसकाता है; ऐप में पेस्ट करने पर कॉपी व्यू के बीच में रखी जाती है।
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. पेन टूल को चुने गए पाथ पर क्लिक किए गए एंकर पॉइंट को हटाने से, या उसके सेगमेंट पर क्लिक की गई जगह नया पॉइंट जोड़ने से रोकता है।
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. ड्रॉइंग टूल अपने आइकन की जगह क्रॉसहेयर पॉइंटर दिखाते हैं; Caps Lock चालू रहने पर भी यही होता है।
|
||||
Shows a tip when the pointer rests on a button or field that has one. जब पॉइंटर टिप वाले किसी बटन या फ़ील्ड पर रुकता है, तब टिप दिखाता है।
|
||||
Shows a warning before a script you choose runs. आपकी चुनी गई स्क्रिप्ट चलने से पहले चेतावनी दिखाता है।
|
||||
Smooths the edges of artwork on the canvas. कैनवास पर आर्टवर्क के किनारों को चिकना करता है।
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. सिलेक्ट › समान › फ़िल रंग, स्ट्रोक रंग और फ़िल व स्ट्रोक केवल ग्लोबल या स्पॉट स्वॉच के उसी टिंट से मेल खाते हैं, उसके किसी भी टिंट से नहीं।
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. कोई डॉक्यूमेंट खुला न होने पर होम स्क्रीन दिखाता है; बंद होने पर विंडो तब तक खाली रहती है जब तक आप होम पर क्लिक नहीं करते।
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. साइज़, स्थिति और संरेखण के लिए ऑब्जेक्ट को उनके स्ट्रोक और आकार बदलने वाले इफ़ेक्ट के साथ मापता है; छाया, ग्लो और ब्लर नहीं मापे जाते।
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. 100% ज़ूम पर डॉक्यूमेंट का एक इंच 72 की जगह 96 स्क्रीन पॉइंट लेता है।
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. सिलेक्शन टूल से किसी ग्रुप, पाथ या इमेज पर डबल-क्लिक करने से वह आइसोलेशन मोड में खुलता है।
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. पैटर्न वाले फ़िल और स्ट्रोक आर्टवर्क के साथ रूपांतरित होते हैं, जब तक कोई रूपांतरण या रूपांतरण पैनल का मेनू कुछ और न चुने।
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. लाइव कोनों की त्रिज्याएँ आर्टवर्क के साथ स्केल होती हैं, जब तक स्केलिंग कुछ और न चुने।
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. स्ट्रोक की मोटाई, डैश और इफ़ेक्ट की दूरियाँ आर्टवर्क के साथ स्केल होती हैं, जब तक स्केलिंग कुछ और न चुने।
|
||||
The mouse wheel zooms the canvas instead of scrolling it. माउस व्हील कैनवास को स्क्रॉल करने की जगह ज़ूम करता है।
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Cmd/Ctrl दबाकर माउस व्हील घुमाने से कैनवास बगल की ओर स्क्रॉल होता है।
|
||||
Dragging sideways on a numeric field's label changes the field's value. किसी संख्या वाले फ़ील्ड के लेबल पर बगल की ओर ड्रैग करने से फ़ील्ड का मान बदलता है।
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. ट्रैकपैड पर दो उंगलियों से घुमाने का जेस्चर कैनवास के व्यू को घुमाता है।
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. किसी टूल की शॉर्टकट कुंजी दबाए रखने पर वह टूल छोड़ने तक चुना रहता है, फिर पिछला टूल दोबारा चुना जाता है।
|
||||
Shows the bounding box while you move the selection or draw a shape. सिलेक्शन खिसकाते या आकार ड्रॉ करते समय बाउंडिंग बॉक्स दिखाता है।
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. ट्रिम मार्क्स बनाएं रोमन की जगह जापानी शैली के निशान ड्रॉ करता है।
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. नया आर्टवर्क सिलेक्शन का केवल फ़िल और स्ट्रोक लेता है; बंद होने पर वह चुने गए ऑब्जेक्ट का पूरा रूप लेता है।
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. रूपांतरण पैनल, प्रॉपर्टीज़ पैनल या नियंत्रण बार में चौड़ाई या ऊँचाई बदलने से दूसरी भी अनुपात में बदलती है।
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. लाइव आयत की प्रॉपर्टीज़ चारों कोनों के लिए कोने की त्रिज्या का एक ही फ़ील्ड दिखाती हैं; बंद होने पर हर कोने का अपना फ़ील्ड होता है।
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. रूपांतरण पैनल में किए गए बदलाव क्या रूपांतरित करते हैं: ऑब्जेक्ट, उसकी पैटर्न टाइलें या दोनों; डिफ़ॉल्ट ट्रांसफॉर्म पैटर्न टाइलें का पालन करता है।
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. एक सिंबल इंस्टेंस चुना होने पर रूपांतरण पैनल सिंबल के रजिस्ट्रेशन पॉइंट को संदर्भ पॉइंट के रूप में इस्तेमाल करता है।
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. आर्टबोर्ड टूल सक्रिय रहने पर आर्टबोर्ड के बाहर का कैनवास गहरा करता है।
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. आर्टबोर्ड के बाहर का क्षेत्र धुंधला करें चालू होने पर आर्टबोर्ड टूल से ड्रैग करते समय आर्टबोर्ड के बाहर का क्षेत्र गहरा बना रहता है।
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. पिक्सेल को छोड़कर बिल्ट-इन साइज़ वाले नए डॉक्यूमेंट और कोई इकाई दर्ज न करने वाली खोली गई फ़ाइलों की इकाई; इसे यहाँ चुनकर ठीक है पर क्लिक करने से यह सक्रिय डॉक्यूमेंट की इकाई भी बन जाती है।
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. स्ट्रोक की मोटाई, डैश और गैप इस इकाई में दिखते हैं, और उनके लिए टाइप की गई संख्याएँ इसी इकाई में पढ़ी जाती हैं।
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. टाइप साइज़, लीडिंग और बेसलाइन शिफ़्ट इस इकाई में दिखते हैं, और उनके लिए टाइप की गई संख्याएँ इसी इकाई में पढ़ी जाती हैं।
|
||||
@@ -4479,6 +4516,7 @@ antiAlias Sharp शार्प
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {n} में से {shown} परिणाम। इन्हें सीमित करने के लिए लिखते रहें।|{n} में से {shown} परिणाम। इन्हें सीमित करने के लिए लिखते रहें।
|
||||
Recent Commands हाल के आदेश
|
||||
No recent commands कोई हाल का आदेश नहीं
|
||||
Search commands आदेश खोजें
|
||||
Search Commands… कमांड खोजें…
|
||||
Search Fonts Folder खोज फ़ॉन्ट फ़ोल्डर
|
||||
Search images इमेज खोजना
|
||||
@@ -9297,6 +9335,7 @@ theme Appearance अपीयरेंस
|
||||
@msg Too many Revolve faces for visibility evaluation दृश्यता की गणना के लिए रिवॉल्व के फ़ेस बहुत अधिक हैं
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft स्वॉच एक्सचेंज फ़ाइल से अधिकतम {ASE_MAX_ENTRIES} रंग और ग्रुप पढ़ता है, और इस लाइब्रेरी में {entries} हैं
|
||||
@msg WebP encoding failed: {e} WebP एन्कोडिंग विफल: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless WebP एन्कोडिंग विफल: छवि लॉसी WebP के लिए बहुत बड़ी है: रिज़ॉल्यूशन कम करें या लॉसलेस चुनें
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `index` must be a whole number `index` पूरी संख्या होनी चाहिए
|
||||
@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view` smallThumb, mediumThumb, largeThumb, smallList या largeList होता है
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -801,6 +801,7 @@ font-technology Variable Változó
|
||||
Constrain Korlátozás
|
||||
Constrain Angle Korlátozási szög
|
||||
Constrain Width and Height Proportions Szélesség és magasság arányának megtartása
|
||||
Copy Width to Height Szélesség másolása a magasságba
|
||||
Construction Guides Szerkesztési segédvonalak
|
||||
Contextual Alternates Környezetfüggő változatok
|
||||
Contextual Task Bar Helyzetérzékeny műveletsáv
|
||||
@@ -892,6 +893,9 @@ font-technology Variable Változó
|
||||
Create from Selection Létrehozás a kijelölésből
|
||||
Create From: Létrehozás ebből:
|
||||
Create Gradient Mesh… Színátmenetes háló létrehozása…
|
||||
Flat Sík
|
||||
To Center A közép felé
|
||||
To Edge Az él felé
|
||||
Create Graph Diagram létrehozása
|
||||
Create New Fields by Új félképek létrehozása
|
||||
Create New Layer Új réteg létrehozása
|
||||
@@ -2543,7 +2547,8 @@ file-filter Templates Sablonok
|
||||
Long Lines Hosszú vonalak
|
||||
Long Strokes Hosszú vonások
|
||||
Longest: Leghosszabb:
|
||||
Lossless (lossy WebP isn't available yet) Veszteségmentes (a veszteséges WebP még nem érhető el)
|
||||
Lossless Veszteségmentes
|
||||
Lossy Veszteséges
|
||||
Lossy: Veszteség:
|
||||
Low Alacsony
|
||||
Low Fidelity Photo Kis pontosságú fotó
|
||||
@@ -3645,6 +3650,38 @@ mark-style Japanese Japán
|
||||
Responsive Reszponzív
|
||||
Restore Visszaállít
|
||||
Restore every preference to its default (applied on OK) Minden beállítás visszaállítása az alapértékre (az OK gombbal lép életbe)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Parancssávot jelenít meg a vásznon a kijelöléshez vagy az eszközhöz; húzás közben és bemutató módban elrejtőzik.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Ennyivel mozgatja egy nyílbillentyű a kijelölést; a Shift billentyűvel tízszer ennyivel.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. Azoknak a tengelyeknek a szöge, amelyek mentén a nyílbillentyűk mozgatnak, és amelyekhez a Shift köti a rajzolást és a mozgatást.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. A sarokkerekítés sugara, amellyel a Lekerekített téglalap eszköz rajzol; ha rajzolás közben módosítja a sugarat, ez az érték is módosul.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Ennyivel tolja el a Beillesztés a másolatot jobbra és lefelé, ha nincs megadott pozíció, például parancsfájlból; az alkalmazásban a Beillesztés a nézet közepére teszi.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Megakadályozza, hogy a Toll eszköz törölje a kijelölt útvonalon rákattintott horgonypontot, vagy újat adjon hozzá ott, ahol a szakaszára kattint.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. A rajzeszközök az ikonjuk helyett célkeresztes mutatót jelenítenek meg; a Caps Lock bekapcsolva ugyanezt teszi.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Tippet jelenít meg, ha a mutató olyan gombon vagy mezőn áll meg, amelyhez tartozik tipp.
|
||||
Shows a warning before a script you choose runs. Figyelmeztetést jelenít meg egy kiválasztott parancsfájl futása előtt.
|
||||
Smooths the edges of artwork on the canvas. Kisimítja a grafika széleit a vásznon.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. A Kijelölés › Azonos › Kitöltőszín, Körvonalszín és Kitöltés és körvonal csak egy globális vagy direkt színminta azonos árnyalatát találja meg, nem bármely árnyalatát.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Megjeleníti a kezdőképernyőt, ha nincs megnyitott dokumentum; kikapcsolva az ablak üres marad, amíg a Kezdőképernyő gombra nem kattint.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Az objektumokat körvonalaikkal és alakmódosító effektusaikkal együtt méri a mérethez, a pozícióhoz és az igazításhoz; az árnyékokat, ragyogásokat és elmosásokat nem méri.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. 100%-os nagyításnál a dokumentum egy hüvelyke 72 helyett 96 képernyőpontot foglal el.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Ha a Kijelölés eszközzel duplán kattint egy csoportra, útvonalra vagy képre, az elkülönítő módban nyílik meg.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. A mintázatos kitöltések és körvonalak a grafikával együtt alakulnak át, hacsak egy átalakítás vagy az Átalakítás panel menüje mást nem választ.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Az élő sarkok sugara a grafikával együtt méreteződik, hacsak a méretezés mást nem választ.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. A körvonalvastagságok, a szaggatások és az effektustávolságok a grafikával együtt méreteződnek, hacsak a méretezés mást nem választ.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. Az egérgörgő görgetés helyett nagyítja vagy kicsinyíti a vásznat.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Az egérgörgő lenyomott Cmd/Ctrl billentyűvel oldalirányban görgeti a vásznat.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Egy számmező címkéjén oldalirányban húzva módosul a mező értéke.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Az érintőpadon végzett kétujjas forgató kézmozdulat elforgatja a vászon nézetét.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Egy eszköz billentyűparancsát lenyomva tartva az eszköz a felengedésig ki van választva, utána ismét az előző eszköz lesz kiválasztva.
|
||||
Shows the bounding box while you move the selection or draw a shape. Megjeleníti a befoglaló keretet, miközben a kijelölést mozgatja vagy alakzatot rajzol.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. A Vágójelek létrehozása római helyett japán stílusú jeleket rajzol.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Az új grafika csak a kijelölés kitöltését és körvonalát veszi át; kikapcsolva a kijelölt objektum teljes megjelenését átveszi.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Ha az Átalakítás panelen, a Tulajdonságok panelen vagy a Vezérlősávon módosítja a szélességet vagy a magasságot, a másik arányosan módosul.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Egy élő téglalap tulajdonságai egyetlen Sarokkerekítés sugara mezőt mutatnak mind a négy sarokhoz; kikapcsolva minden saroknak saját mezője van.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Mit alakítanak át az Átalakítás panel módosításai: az objektumot, a mintázatcsempéit vagy mindkettőt; az Alapértelmezett a Mintázatcsempék átalakítása beállítást követi.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Ha egy szimbólumpéldány van kijelölve, az Átalakítás panel a szimbólum regisztrációs pontját használja referenciapontként.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Elsötétíti a vásznat a rajztáblákon kívül, amíg a Rajztábla eszköz aktív.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Ha A rajztáblán kívüli terület elhalványítása be van kapcsolva, a rajztáblákon kívüli terület sötét marad, miközben a Rajztábla eszközzel húz.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. A beépített, nem pixelben megadott méretű új dokumentumok és a mértékegységet nem rögzítő megnyitott fájlok mértékegysége; ha itt kiválasztja, és az OK gombra kattint, az aktív dokumentum mértékegysége is ez lesz.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. A körvonalvastagságok, a vonalak és a hézagok ebben a mértékegységben jelennek meg, és a hozzájuk beírt számokat is ebben értelmezi a program.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. A betűméretek, a sorköz és az alapvonal-eltolás ebben a mértékegységben jelennek meg, és a hozzájuk beírt számokat is ebben értelmezi a program.
|
||||
@@ -3923,6 +3960,7 @@ mark-style Japanese Japán
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {n} találatból {shown} látható. Gépeljen tovább a szűkítéshez.
|
||||
Recent Commands Legutóbbi parancsok
|
||||
No recent commands Nincsenek legutóbbi parancsok
|
||||
Search commands Parancsok keresése
|
||||
Search Commands… Parancsok keresése…
|
||||
Search Fonts Folder Keresés betűtípusmappában
|
||||
Searching… Keresés…
|
||||
@@ -9683,6 +9721,7 @@ breakText Glyphs Glifák
|
||||
@msg Too many Revolve faces for visibility evaluation Túl sok lap a láthatóság kiértékeléséhez (Forgatás tengely körül)
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} A VectorCraft legfeljebb {ASE_MAX_ENTRIES} színt és csoportot olvas be egy színmintacsere-fájlból, ebben a könyvtárban pedig ennyi van: {entries}
|
||||
@msg WebP encoding failed: {e} A WebP-kódolás sikertelen: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless A WebP-kódolás sikertelen: a kép túl nagy a veszteséges WebP-hez: csökkentse a felbontást, vagy válassza a Veszteségmentes lehetőséget
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `index` must be a whole number `index`: egész szám kell
|
||||
@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view`: smallThumb, mediumThumb, largeThumb, smallList vagy largeList lehet
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -211,6 +211,9 @@
|
||||
Mask Masker
|
||||
Rasterize… Rasterisasi…
|
||||
Create Gradient Mesh… Buat mesh gradien…
|
||||
Flat Datar
|
||||
To Center Ke tengah
|
||||
To Edge Ke tepi
|
||||
Create Object Mosaic… Buat mozaik objek…
|
||||
Vector Halftone… Halftone vektor…
|
||||
Create Trim Marks Buat tanda potong
|
||||
@@ -1231,6 +1234,7 @@ lighting Light Cahaya
|
||||
Search commands, tools, panels and effects Cari perintah, alat, panel, dan efek
|
||||
Style: Gaya:
|
||||
Switch workspace Ganti ruang kerja
|
||||
Search commands Cari perintah
|
||||
Show all open documents Tampilkan semua dokumen terbuka
|
||||
Use Gunakan
|
||||
the object to select | objek untuk memilihnya |
|
||||
@@ -2634,7 +2638,8 @@ digits Malayalam Malayalam
|
||||
Hide Video Rulers Sembunyikan penggaris video
|
||||
Client-side (.html) Sisi klien (.html)
|
||||
Color Reduction: Reduksi warna:
|
||||
Lossless (lossy WebP isn't available yet) Tanpa kehilangan (WebP lossy belum tersedia)
|
||||
Lossless Tanpa kehilangan
|
||||
Lossy Dengan kehilangan
|
||||
Scans: Pemindaian:
|
||||
Server-side (.map) Sisi server (.map)
|
||||
{format} Options Opsi {format}
|
||||
@@ -3664,6 +3669,7 @@ theme Appearance Tampilan
|
||||
Command Click to Select Objects Behind Command-klik untuk memilih objek di belakang
|
||||
Constrain Angle Sudut kendala
|
||||
Constrain Width and Height Proportions Kendalikan proporsi lebar dan tinggi
|
||||
Copy Width to Height Salin lebar ke tinggi
|
||||
Construction Guides Panduan konstruksi
|
||||
Curvature Tool Alat kelengkungan
|
||||
Data Recovery Pemulihan data
|
||||
@@ -4165,6 +4171,38 @@ font-technology Variable Variabel
|
||||
Preferences Preferensi
|
||||
Previous Sebelumnya
|
||||
Restore every preference to its default (applied on OK) Kembalikan semua preferensi ke defaultnya (diterapkan saat OK)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Menampilkan bilah perintah untuk seleksi atau alat di kanvas; bilah ini disembunyikan saat Anda menyeret dan dalam mode presentasi.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Seberapa jauh tombol panah memindahkan seleksi; dengan Shift, tombol itu memindahkannya sepuluh kali lebih jauh.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. Sudut sumbu tempat tombol panah memindahkan dan tempat Shift menahan penggambaran dan pemindahan.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. Radius sudut yang dipakai alat Persegi panjang bulat untuk menggambar; mengubah radius saat menggambar juga mengubah nilai ini.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Seberapa jauh Tempel menggeser salinan ke kanan dan ke bawah saat tidak ada posisi yang diberikan, seperti dari skrip; Tempel di aplikasi menaruhnya di tengah tampilan.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Mencegah alat Pena menghapus titik jangkar yang Anda klik pada jalur terpilih, atau menambahkan titik di tempat Anda mengklik segmennya.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Alat gambar menampilkan penunjuk silang sebagai pengganti ikonnya; Caps Lock melakukan hal yang sama selama aktif.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Menampilkan tip saat penunjuk berhenti di atas tombol atau bidang yang memilikinya.
|
||||
Shows a warning before a script you choose runs. Menampilkan peringatan sebelum skrip yang Anda pilih dijalankan.
|
||||
Smooths the edges of artwork on the canvas. Menghaluskan tepi karya seni di kanvas.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. Seleksi › Sama › Warna isian, Warna stroke, dan Isian & stroke hanya mencocokkan tint yang sama dari swatch global atau spot, bukan sembarang tint-nya.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Menampilkan layar Home saat tidak ada dokumen yang terbuka; saat nonaktif, jendela tetap kosong sampai Anda mengklik Home.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Mengukur objek beserta stroke dan efek yang mengubah bentuknya untuk ukuran, posisi, dan perataan; bayangan, cahaya, dan kekaburan tidak diukur.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. Pada zum 100%, satu inci dokumen memakai 96 titik layar, bukan 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Mengklik ganda grup, jalur, atau gambar dengan alat Seleksi membukanya dalam mode isolasi.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Isian dan stroke pola ikut bertransformasi dengan karya seni, kecuali transformasi atau menu panel Transformasi memilih lain.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Radius sudut dinamis ikut diskalakan dengan karya seni, kecuali penskalaan memilih lain.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Ketebalan stroke, garis putus, dan jarak efek ikut diskalakan dengan karya seni, kecuali penskalaan memilih lain.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. Roda mouse melakukan zum pada kanvas, bukan menggulirnya.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Roda mouse dengan Cmd/Ctrl ditahan menggulir kanvas ke samping.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Menyeret ke samping pada label bidang angka mengubah nilai bidang itu.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Gerakan putar dua jari pada trackpad memutar tampilan kanvas.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Menahan tombol pintasan alat memilih alat itu sampai Anda melepasnya, lalu alat sebelumnya dipilih lagi.
|
||||
Shows the bounding box while you move the selection or draw a shape. Menampilkan kotak pembatas saat Anda memindahkan seleksi atau menggambar bentuk.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. Buat tanda potong menggambar tanda bergaya Jepang, bukan Romawi.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Karya seni baru hanya mengambil isian dan stroke seleksi; saat nonaktif, karya seni baru mengambil seluruh tampilan objek terpilih.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Mengubah lebar atau tinggi di panel Transformasi, panel Properti, atau bilah Kontrol mengubah yang lain secara proporsional.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Properti persegi panjang dinamis menampilkan satu bidang Radius sudut untuk keempat sudut; saat nonaktif, setiap sudut punya bidangnya sendiri.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Apa yang ditransformasi oleh pengeditan di panel Transformasi: objek, ubin polanya, atau keduanya; Default mengikuti Transformasi ubin pola.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Saat satu instans simbol dipilih, panel Transformasi memakai titik registrasi simbol sebagai titik referensi.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Menggelapkan kanvas di luar artboard selama alat Artboard aktif.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Saat Redupkan wilayah di luar artboard aktif, area di luar artboard tetap gelap selama Anda menyeret dengan alat Artboard.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. Satuan untuk dokumen baru dari ukuran bawaan selain ukuran piksel dan untuk file yang dibuka tanpa satuan tercatat; jika Anda memilihnya di sini lalu mengklik OK, satuan dokumen aktif juga menjadi satuan ini.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Ketebalan stroke, putus-putus, dan jarak ditampilkan dalam satuan ini, dan angka yang diketik untuknya dibaca dalam satuan ini.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Ukuran teks, leading, dan pergeseran garis dasar ditampilkan dalam satuan ini, dan angka yang diketik untuknya dibaca dalam satuan ini.
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 2499 and column 5.
|
@@ -205,6 +205,8 @@ antiAlias Sharp Nitido
|
||||
Crisp Definito
|
||||
Strong Forte
|
||||
Anti-aliasing: Anti-aliasing:
|
||||
Art Optimized Ottimizzato per la grafica
|
||||
Type Optimized Ottimizzato per il testo
|
||||
Any Kind Qualsiasi tipo
|
||||
Font Technology Tecnologia font
|
||||
font-technology Variable Variabili
|
||||
@@ -607,6 +609,7 @@ font-technology Variable Variabili
|
||||
Consolidate All Windows Consolida tutte le finestre
|
||||
Constrain Angle Vincola angolo
|
||||
Constrain Width and Height Proportions Vincola proporzioni di larghezza e altezza
|
||||
Copy Width to Height Copia la larghezza nell’altezza
|
||||
Construction Guides Guide di costruzione
|
||||
Contextual Alternates Alternative contestuali
|
||||
Contextual Task Bar Barra attività contestuale
|
||||
@@ -692,6 +695,9 @@ font-technology Variable Variabili
|
||||
Create from Selection Crea dalla selezione
|
||||
Create From: Crea da:
|
||||
Create Gradient Mesh… Crea trama sfumatura…
|
||||
Flat Piatto
|
||||
To Center Verso il centro
|
||||
To Edge Verso il bordo
|
||||
Create Graph Crea grafico
|
||||
Create New Layer Crea nuovo livello
|
||||
Create New Sublayer Crea nuovo sottolivello
|
||||
@@ -2073,7 +2079,8 @@ file-filter Templates Modelli
|
||||
Lock Others Blocca altri
|
||||
Lock Slices Blocca sezioni
|
||||
Lock Station Point Blocca punto di osservazione
|
||||
Lossless (lossy WebP isn't available yet) Senza perdita (WebP con perdita non è ancora disponibile)
|
||||
Lossless Senza perdita
|
||||
Lossy Con perdita
|
||||
Lossy: Con perdita:
|
||||
Low Bassa
|
||||
lowercase minuscole
|
||||
@@ -3105,6 +3112,38 @@ digits Malayalam Malayalam
|
||||
Responsive Adattivo
|
||||
Restore Ripristina
|
||||
Restore every preference to its default (applied on OK) Ripristina tutte le preferenze ai valori predefiniti (applicato con OK)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Mostra sull'area di lavoro una barra di comandi per la selezione o lo strumento; si nasconde durante il trascinamento e in modalità presentazione.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Di quanto un tasto freccia sposta la selezione; con Maiusc la sposta dieci volte di più.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. L'angolo degli assi lungo cui spostano i tasti freccia e a cui Maiusc vincola il disegno e lo spostamento.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. Il raggio d'angolo con cui disegna lo strumento Rettangolo arrotondato; cambiare il raggio durante il disegno cambia anche questo valore.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Di quanto Incolla sposta la copia a destra e in basso quando non riceve una posizione, come da uno script; Incolla nell'app la centra nella vista.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Impedisce allo strumento Penna di eliminare il punto di ancoraggio su cui fai clic in un tracciato selezionato o di aggiungerne uno dove fai clic sul suo segmento.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Gli strumenti di disegno mostrano un puntatore a croce invece della loro icona; Bloc Maiusc fa lo stesso finché è attivo.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Mostra un suggerimento quando il puntatore si ferma su un pulsante o un campo che ne ha uno.
|
||||
Shows a warning before a script you choose runs. Mostra un avviso prima che venga eseguito uno script che scegli.
|
||||
Smooths the edges of artwork on the canvas. Smussa i bordi della grafica nell'area di lavoro.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. Selezione › Uguale › Colore riempimento, Colore traccia e Riempimento e traccia trovano solo la stessa tinta di un campione globale o di un colore spot, non qualsiasi sua tinta.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Mostra la schermata Home quando nessun documento è aperto; se disattivata, la finestra resta vuota finché non fai clic su Home.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Misura gli oggetti con le tracce e gli effetti che ne cambiano la forma per dimensioni, posizione e allineamento; ombre, bagliori e sfocature non vengono misurati.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. Allo zoom del 100%, un pollice del documento occupa 96 punti dello schermo invece di 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Un doppio clic su un gruppo, un tracciato o un'immagine con lo strumento Selezione lo apre in modalità isolamento.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. I riempimenti e le tracce con motivo si trasformano con la grafica, a meno che una trasformazione o il menu del pannello Trasforma scelga diversamente.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. I raggi degli angoli dinamici si ridimensionano con la grafica, a meno che il ridimensionamento scelga diversamente.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Spessori delle tracce, trattini e distanze degli effetti si ridimensionano con la grafica, a meno che il ridimensionamento scelga diversamente.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. La rotellina del mouse esegue lo zoom dell'area di lavoro invece di scorrerla.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. La rotellina del mouse con Cmd/Ctrl premuto scorre l'area di lavoro in orizzontale.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Trascinare in orizzontale sull'etichetta di un campo numerico ne cambia il valore.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Un gesto di rotazione con due dita sul trackpad ruota la vista dell'area di lavoro.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Tenere premuta la scorciatoia di uno strumento lo sceglie finché non la rilasci, poi viene scelto di nuovo lo strumento precedente.
|
||||
Shows the bounding box while you move the selection or draw a shape. Mostra il riquadro di delimitazione mentre sposti la selezione o disegni una forma.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. Crea segni di taglio disegna segni in stile giapponese invece di quelli romani.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. La nuova grafica prende solo il riempimento e la traccia della selezione; se disattivata, prende l'intero aspetto dell'oggetto selezionato.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Cambiare larghezza o altezza nel pannello Trasforma, nel pannello Proprietà o nel pannello Controllo cambia l'altra in proporzione.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Le proprietà di un rettangolo dinamico mostrano un solo campo Raggio angolo per tutti e quattro gli angoli; se disattivata, ogni angolo ha il proprio campo.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Cosa trasformano le modifiche nel pannello Trasforma: l'oggetto, i suoi tasselli motivo o entrambi; Predefinito segue Trasforma tasselli motivo.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Con un'istanza di simbolo selezionata, il pannello Trasforma usa il punto di registrazione del simbolo come punto di riferimento.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Scurisce l'area di lavoro fuori dalle tavole da disegno mentre lo strumento Tavola da disegno è attivo.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Con Attenua area esterna alla tavola da disegno attivo, l'area fuori dalle tavole da disegno resta scura mentre trascini con lo strumento Tavola da disegno.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. L'unità dei nuovi documenti nelle dimensioni predefinite, tranne quelle in pixel, e dei file aperti che non registrano alcuna unità; sceglierla qui e fare clic su OK la imposta anche per il documento attivo.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Gli spessori della traccia, i trattini e gli spazi sono mostrati in questa unità, e i numeri digitati per essi sono letti in questa unità.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Dimensioni del testo, interlinea e spostamento della linea di base sono mostrati in questa unità, e i numeri digitati per essi sono letti in questa unità.
|
||||
@@ -3345,6 +3384,7 @@ digits Malayalam Malayalam
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} di {n} risultato. Continua a digitare per restringerli.|{shown} di {n} risultati. Continua a digitare per restringerli.
|
||||
Recent Commands Comandi recenti
|
||||
No recent commands Nessun comando recente
|
||||
Search commands Cerca comandi
|
||||
Search Commands… Cerca comandi…
|
||||
Secondary Secondario
|
||||
Section Symbol Simbolo di sezione
|
||||
@@ -9306,6 +9346,7 @@ breakText Glyphs Glifi
|
||||
@msg Too many Revolve faces for visibility evaluation Troppe facce di Rivoluzione per il calcolo della visibilità
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft legge al massimo {ASE_MAX_ENTRIES} colori e gruppi da un file di scambio campioni, e questa libreria ne ha {entries}
|
||||
@msg WebP encoding failed: {e} Codifica WebP non riuscita: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless Codifica WebP non riuscita: l'immagine è troppo grande per il WebP con perdita: riduci la risoluzione o scegli Senza perdita
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view` è smallThumb, mediumThumb, largeThumb, smallList o largeList
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -268,6 +268,9 @@ digits Malayalam マラヤーラム数字
|
||||
Mask マスク
|
||||
Rasterize… ラスタライズ…
|
||||
Create Gradient Mesh… グラデーションメッシュを作成…
|
||||
Flat フラット
|
||||
To Center 中心へ
|
||||
To Edge エッジへ
|
||||
Create Object Mosaic… モザイクオブジェクトを作成…
|
||||
Vector Halftone… ベクターハーフトーン…
|
||||
Create Trim Marks トリムマークを作成
|
||||
@@ -1120,6 +1123,8 @@ antiAlias Sharp シャープ
|
||||
Crisp くっきり
|
||||
Strong 太め
|
||||
Anti-aliasing: アンチエイリアス:
|
||||
Art Optimized アートに最適化
|
||||
Type Optimized 文字に最適化
|
||||
Appearance Item アピアランス項目
|
||||
Appearance Panel アピアランスパネル
|
||||
Appearance of Black ブラックのアピアランス
|
||||
@@ -1369,6 +1374,7 @@ antiAlias Sharp シャープ
|
||||
Conflict {n} of {count} 競合 {n} / {count}
|
||||
Constrain Angle 角度を制限
|
||||
Constrain Width and Height Proportions 幅と高さの縦横比を固定
|
||||
Copy Width to Height 幅を高さにコピー
|
||||
Construction Guides 作図ガイド
|
||||
Contextual Alternates 前後関係に依存する字形
|
||||
Convert 変換
|
||||
@@ -2330,7 +2336,8 @@ antiAlias Sharp シャープ
|
||||
Location 場所
|
||||
Location: 位置:
|
||||
Lock (⌘2) ロック (⌘2)
|
||||
Lossless (lossy WebP isn't available yet) ロスレス (非可逆 WebP は未対応)
|
||||
Lossless ロスレス
|
||||
Lossy 非可逆
|
||||
Lossy: 圧縮率:
|
||||
Luminosity 輝度
|
||||
Magic Wand Options 自動選択オプション
|
||||
@@ -3082,6 +3089,38 @@ mark-style Japanese 日本式
|
||||
Restore 復元
|
||||
Restore Recovered Documents 復帰したドキュメントを復元
|
||||
Restore every preference to its default (applied on OK) すべての環境設定を初期値に戻す (OK で適用)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. 選択範囲やツールに応じたコマンドのバーをカンバスに表示します。ドラッグ中とプレゼンテーションモードでは隠れます。
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. 矢印キーで選択範囲を移動する距離です。Shift キーを押すと 10 倍移動します。
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. 矢印キーで移動する軸と、Shift キーで描画や移動を固定する軸の角度です。
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. 角丸長方形ツールで描くときの角丸の半径です。描画中に半径を変えるとこの値も変わります。
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. スクリプトからなど位置の指定がないときに、ペーストでコピーを右と下へずらす距離です。アプリでのペーストはコピーを表示の中央に置きます。
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. 選択したパスでクリックしたアンカーポイントをペンツールが削除したり、セグメントをクリックした位置に追加したりしないようにします。
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. 描画ツールのポインターをアイコンではなく十字にします。Caps Lock がオンの間も同じになります。
|
||||
Shows a tip when the pointer rests on a button or field that has one. ヒントのあるボタンやフィールドにポインターを置くとヒントを表示します。
|
||||
Shows a warning before a script you choose runs. 選んだスクリプトを実行する前に警告を表示します。
|
||||
Smooths the edges of artwork on the canvas. カンバス上のアートワークの縁を滑らかにします。
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. 選択 › 共通 › カラー (塗り)、カラー (線)、塗りと線は、グローバルスウォッチまたは特色スウォッチの同じ濃度だけを選び、ほかの濃度は選びません。
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. ドキュメントが開いていないときにホーム画面を表示します。オフのときは、ホームをクリックするまでウィンドウは空のままです。
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. サイズ、位置、整列のために、線と形を変える効果を含めてオブジェクトを測ります。ドロップシャドウ、光彩、ぼかしは含めません。
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. 100% 表示のとき、ドキュメントの 1 インチを 72 ではなく 96 スクリーンポイントで表示します。
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. 選択ツールでグループ、パス、画像をダブルクリックすると、編集モードで開きます。
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. 変形コマンドや変形パネルのメニューで別の指定をしない限り、パターンの塗りと線をアートワークと一緒に変形します。
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. 拡大・縮小で別の指定をしない限り、ライブコーナーの半径をアートワークと一緒に拡大・縮小します。
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. 拡大・縮小で別の指定をしない限り、線幅、破線、効果の距離をアートワークと一緒に拡大・縮小します。
|
||||
The mouse wheel zooms the canvas instead of scrolling it. マウスホイールでカンバスをスクロールせずにズームします。
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Cmd/Ctrl キーを押しながらマウスホイールを回すとカンバスを横にスクロールします。
|
||||
Dragging sideways on a numeric field's label changes the field's value. 数値フィールドのラベルを横にドラッグすると、フィールドの値が変わります。
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. トラックパッドで 2 本指の回転ジェスチャーをすると、カンバスの表示が回転します。
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. ツールのショートカットキーを押している間はそのツールを選び、離すと前のツールに戻ります。
|
||||
Shows the bounding box while you move the selection or draw a shape. 選択範囲の移動中や図形の描画中にバウンディングボックスを表示します。
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. トリムマークを作成で、西洋式ではなく日本式のトンボを描きます。
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. 新規オブジェクトに選択範囲の塗りと線だけを適用します。オフのときは、選択したオブジェクトのアピアランス全体を適用します。
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. 変形パネル、プロパティパネル、コントロールパネルで幅または高さを変えると、もう一方も比率を保って変わります。
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. ライブ長方形のプロパティで、4 つの角に共通の角丸の半径フィールドを 1 つ表示します。オフのときは角ごとにフィールドを表示します。
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. 変形パネルでの編集が変形する対象で、オブジェクト、パターンタイル、またはその両方です。デフォルトはパターンタイルを変形に従います。
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. シンボルインスタンスを 1 つ選択したとき、変形パネルはシンボルの基準点を基準点として使います。
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. アートボードツールを使っている間、アートボードの外側のカンバスを暗く表示します。
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. アートボードの外側を暗く表示がオンのとき、アートボードツールでドラッグしている間もアートボードの外側を暗いままにします。
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. ピクセル以外の組み込みサイズの新規ドキュメントと、単位を記録していない開いたファイルに使う単位で、ここで選んで OK をクリックすると作業中のドキュメントの単位も変わります。
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. 線幅、線分、間隔はこの単位で表示され、入力した数値もこの単位で読み取られます。
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. フォントサイズ、行送り、ベースラインシフトはこの単位で表示され、入力した数値もこの単位で読み取られます。
|
||||
@@ -3223,6 +3262,7 @@ mark-style Japanese 日本式
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {n} 件中 {shown} 件。続けて入力すると絞り込めます。
|
||||
Recent Commands 最近使ったコマンド
|
||||
No recent commands 最近使ったコマンドはありません
|
||||
Search commands コマンドを検索
|
||||
Secondary セカンダリ
|
||||
Select All Art on Layer レイヤー上のすべてのアートを選択
|
||||
Select All Assets すべてのアセットを選択
|
||||
@@ -9383,6 +9423,7 @@ breakText Glyphs 字形
|
||||
@msg Too many Revolve faces for visibility evaluation 可視判定を行うには回転体の面が多すぎます
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft がスウォッチ交換ファイルから読み込めるカラーとグループは {ASE_MAX_ENTRIES} 個までですが、このライブラリには {entries} 個あります
|
||||
@msg WebP encoding failed: {e} WebP のエンコードに失敗しました: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless WebP のエンコードに失敗しました: 画像が大きすぎて非可逆 WebP にできません: 解像度を下げるか、ロスレスを選択してください
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view` には smallThumb、mediumThumb、largeThumb、smallList、largeList のいずれかを指定してください
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -161,6 +161,7 @@
|
||||
@msg Trap: more than {_1} pairs of objects lie close enough to trap, or too many objects share a horizontal range; trap fewer objects at a time ტრეპინგი: ობიექტების {_1}-ზე მეტი წყვილი ტრეპინგისთვის საკმარისად ახლოს მდებარეობს, ან ზედმეტად ბევრ ობიექტს საერთო ჰორიზონტალური დიაპაზონი აქვს; ერთდროულად ნაკლებ ობიექტზე გამოიყენეთ ტრეპინგი
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft ფერის ნიმუშების გაცვლის ფაილიდან კითხულობს მაქსიმუმ {ASE_MAX_ENTRIES} ფერსა და ჯგუფს, ამ ბიბლიოთეკაში კი არის {entries}
|
||||
@msg WebP encoding failed: {e} WebP-ის კოდირება ვერ მოხერხდა: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless WebP-ის კოდირება ვერ მოხერხდა: სურათი ძალიან დიდია დანაკარგიანი WebP-ისთვის: შეამცირეთ გარჩევადობა ან აირჩიეთ უდანაკარგო
|
||||
@msg Weed Box and Lines: no weeding line fits outside the art, and the weed box is off ნარჩენის მოსაცილებელი ჩარჩო და ხაზები: ნახატის გარეთ ნარჩენის მოსაცილებელი არცერთი ხაზი არ ეტევა, ნარჩენის ჩარჩო კი გამორთულია
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg \\ at end of pattern \\ შაბლონის ბოლოს
|
||||
@@ -2382,6 +2383,9 @@
|
||||
Mask ნიღაბი
|
||||
Rasterize… რასტრირება…
|
||||
Create Gradient Mesh… გრადიენტული ბადის შექმნა…
|
||||
Flat ბრტყელი
|
||||
To Center ცენტრისკენ
|
||||
To Edge კიდისკენ
|
||||
Create Object Mosaic… ობიექტების მოზაიკის შექმნა…
|
||||
Vector Halftone… ვექტორული ნახევარტონი…
|
||||
Create Trim Marks ჭრის ნიშნების შექმნა
|
||||
@@ -3388,6 +3392,7 @@ lighting Light სინათლე
|
||||
Search commands, tools, panels and effects ბრძანებების, ხელსაწყოების, პანელებისა და ეფექტების ძიება
|
||||
Style: სტილი:
|
||||
Switch workspace სამუშაო სივრცის გადართვა
|
||||
Search commands ბრძანებების ძიება
|
||||
Show all open documents ყველა ღია დოკუმენტის ჩვენება
|
||||
Use გამოიყენეთ
|
||||
the object to select | ობიექტზე — მოსანიშნად |
|
||||
@@ -4805,7 +4810,8 @@ digits Malayalam მალაიალამური
|
||||
Hide Video Rulers ვიდეოს სახაზავების დამალვა
|
||||
Client-side (.html) კლიენტის მხარე (.html)
|
||||
Color Reduction: ფერების შემცირება:
|
||||
Lossless (lossy WebP isn't available yet) უდანაკარგო (დანაკარგიანი WebP ჯერ მიუწვდომელია)
|
||||
Lossless უდანაკარგო
|
||||
Lossy დანაკარგიანი
|
||||
Scans: სკანირებები:
|
||||
Server-side (.map) სერვერის მხარე (.map)
|
||||
{format} Options {format}: პარამეტრები
|
||||
@@ -5757,6 +5763,7 @@ theme Appearance იერსახე
|
||||
Command Click to Select Objects Behind Command-დაწკაპუნებით უკან მდებარე ობიექტების მონიშვნა
|
||||
Constrain Angle კუთხის შეზღუდვა
|
||||
Constrain Width and Height Proportions სიგანისა და სიმაღლის პროპორციების შენარჩუნება
|
||||
Copy Width to Height სიგანის კოპირება სიმაღლეში
|
||||
Construction Guides სამშენებლო დამხმარე ხაზები
|
||||
Curvature Tool მრუდის ხელსაწყო
|
||||
Data Recovery მონაცემების აღდგენა
|
||||
@@ -6232,6 +6239,38 @@ font-technology Variable ცვლადი
|
||||
Preferences პარამეტრები
|
||||
Previous წინა
|
||||
Restore every preference to its default (applied on OK) ყველა პარამეტრის ნაგულისხმევ მნიშვნელობაზე დაბრუნება (გამოიყენება OK-ზე დაჭერისას)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. ტილოზე აჩვენებს ბრძანებების ზოლს მონიშნულისთვის ან ხელსაწყოსთვის; გადათრევისას და პრეზენტაციის რეჟიმში იმალება.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. რამდენად შორს გადაადგილებს ისრის კლავიში მონიშნულს; Shift-ით ათჯერ უფრო შორს გადაადგილებს.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. იმ ღერძების კუთხე, რომელთა გასწვრივაც ისრის კლავიშები გადაადგილებენ და რომლებზეც Shift ზღუდავს ხატვას და გადაადგილებას.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. კუთხის რადიუსი, რომლითაც მომრგვალებული მართკუთხედის ხელსაწყო ხატავს; ხატვისას რადიუსის შეცვლა ამ მნიშვნელობასაც ცვლის.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. რამდენად გადაწევს ჩასმა ასლს მარჯვნივ და ქვემოთ, როცა პოზიცია მითითებული არ არის, მაგალითად სკრიპტიდან; აპში ჩასმა ასლს ხედის ცენტრში სვამს.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. კალმის ხელსაწყოს უკრძალავს მონიშნულ კონტურზე დაწკაპუნებული საყრდენი წერტილის წაშლას ან ახლის დამატებას იქ, სადაც მის სეგმენტზე დააწკაპუნებთ.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. სახატავი ხელსაწყოები ხატულის ნაცვლად ჯვრისებრ მაჩვენებელს აჩვენებენ; Caps Lock იგივეს აკეთებს, სანამ ჩართულია.
|
||||
Shows a tip when the pointer rests on a button or field that has one. აჩვენებს მინიშნებას, როცა მაჩვენებელი ჩერდება ღილაკზე ან ველზე, რომელსაც ის აქვს.
|
||||
Shows a warning before a script you choose runs. აჩვენებს გაფრთხილებას თქვენ მიერ არჩეული სკრიპტის გაშვებამდე.
|
||||
Smooths the edges of artwork on the canvas. ტილოზე ნახატის კიდეებს აგლუვებს.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. მონიშვნა › იგივე › შევსების ფერი, კონტურის ფერი და შევსება და კონტური პოულობს მხოლოდ გლობალური ან სპოტ ნიმუშის იმავე ტონს და არა მის ნებისმიერ ტონს.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. აჩვენებს საწყის ეკრანს, როცა არცერთი დოკუმენტი არ არის გახსნილი; გამორთვისას ფანჯარა ცარიელი რჩება, სანამ საწყის ეკრანზე არ დააწკაპუნებთ.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. ზომის, პოზიციისა და სწორების დროს ობიექტებს ზომავს კონტურებითა და ფორმის შემცვლელი ეფექტებით; ჩრდილები, ნათება და გაბუნდოვნება არ იზომება.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. 100%-იან მასშტაბზე დოკუმენტის ერთი დიუმი 72-ის ნაცვლად 96 ეკრანის პუნქტს იკავებს.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. მონიშვნის ხელსაწყოთი ჯგუფზე, კონტურზე ან გამოსახულებაზე ორჯერ დაწკაპუნება მას იზოლაციის რეჟიმში ხსნის.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. პატერნის შევსებები და კონტურები ნახატთან ერთად გარდაიქმნება, თუ გარდაქმნა ან გარდაქმნის პანელის მენიუ სხვას არ აირჩევს.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. დინამიკური კუთხეების რადიუსები ნახატთან ერთად მასშტაბირდება, თუ მასშტაბირება სხვას არ აირჩევს.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. კონტურის სისქე, შტრიხები და ეფექტების მანძილები ნახატთან ერთად მასშტაბირდება, თუ მასშტაბირება სხვას არ აირჩევს.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. მაუსის ბორბალი ტილოს გადახვევის ნაცვლად მასშტაბს ცვლის.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. დაჭერილი Cmd/Ctrl-ით მაუსის ბორბალი ტილოს გვერდულად გადაახვევს.
|
||||
Dragging sideways on a numeric field's label changes the field's value. რიცხვითი ველის წარწერაზე გვერდულად გადათრევა ველის მნიშვნელობას ცვლის.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. ტრეკპადზე ორი თითით მობრუნების ჟესტი ტილოს ხედს აბრუნებს.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. ხელსაწყოს მალსახმობი კლავიშის დაჭერით ხელსაწყო არჩეულია მის აშვებამდე, შემდეგ კი ისევ წინა ხელსაწყო აირჩევა.
|
||||
Shows the bounding box while you move the selection or draw a shape. აჩვენებს შემომსაზღვრელ ჩარჩოს, სანამ მონიშნულს გადაადგილებთ ან ფიგურას ხატავთ.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. ჭრის ნიშნების შექმნა რომაულის ნაცვლად იაპონური სტილის ნიშნებს ხატავს.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. ახალი ნახატი მონიშნულიდან მხოლოდ შევსებასა და კონტურს იღებს; გამორთვისას იღებს მონიშნული ობიექტის მთელ იერსახეს.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. სიგანის ან სიმაღლის შეცვლა გარდაქმნის პანელში, თვისებების პანელში ან მართვის ზოლში მეორესაც პროპორციულად ცვლის.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. დინამიკური მართკუთხედის თვისებები ოთხივე კუთხისთვის კუთხის რადიუსის ერთ ველს აჩვენებს; გამორთვისას თითოეულ კუთხეს თავისი ველი აქვს.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. რას გარდაქმნის ცვლილებები გარდაქმნის პანელში: ობიექტს, მისი პატერნის ფილებს ან ორივეს; ნაგულისხმევი მისდევს პატერნის ფილების გარდაქმნას.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. როცა სიმბოლოს ერთი ეგზემპლარია მონიშნული, გარდაქმნის პანელი სიმბოლოს რეგისტრაციის წერტილს საყრდენ წერტილად იყენებს.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. სანამ სამუშაო დაფის ხელსაწყო აქტიურია, სამუშაო დაფების გარეთ ტილოს აბნელებს.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. როცა სამუშაო დაფის გარეთ არის დაბნელება ჩართულია, სამუშაო დაფის ხელსაწყოთი გადათრევისას სამუშაო დაფების გარეთ არე ბნელი რჩება.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. ერთეული ახალი დოკუმენტებისთვის (ჩაშენებული ზომებით, პიქსელურის გარდა) და იმ გახსნილი ფაილებისთვის, რომლებშიც ერთეული არ წერია; OK-ზე დაწკაპებისას აქტიური დოკუმენტიც ამ ერთეულს მიიღებს.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. კონტურის სისქე, ტირეები და შუალედები ამ ერთეულში ჩანს, და მათთვის აკრეფილი რიცხვები ამ ერთეულში იკითხება.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. ტექსტის ზომა, სტრიქონთა დაშორება და საბაზისო ხაზის წანაცვლება ამ ერთეულში ჩანს, და მათთვის აკრეფილი რიცხვები ამ ერთეულში იკითხება.
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -261,6 +261,9 @@ digits Malayalam 말라얄람어
|
||||
Mask 마스크
|
||||
Rasterize… 래스터화…
|
||||
Create Gradient Mesh… 그레이디언트 메시 만들기…
|
||||
Flat 평면
|
||||
To Center 가운데로
|
||||
To Edge 가장자리로
|
||||
Create Object Mosaic… 개체 모자이크 만들기…
|
||||
Vector Halftone… 벡터 하프톤…
|
||||
Create Trim Marks 트림 마크 만들기
|
||||
@@ -1110,6 +1113,8 @@ antiAlias Sharp 날카롭게
|
||||
Crisp 또렷하게
|
||||
Strong 강하게
|
||||
Anti-aliasing: 안티 앨리어싱:
|
||||
Art Optimized 아트에 최적화
|
||||
Type Optimized 문자에 최적화
|
||||
Appearance Item 모양새 항목
|
||||
Appearance Panel 모양새 패널
|
||||
Appearance of Black 검정 표시 방식
|
||||
@@ -1359,6 +1364,7 @@ antiAlias Sharp 날카롭게
|
||||
Conflict {n} of {count} 충돌 {n}/{count}
|
||||
Constrain Angle 각도 제한
|
||||
Constrain Width and Height Proportions 너비와 높이 비율 고정
|
||||
Copy Width to Height 너비를 높이로 복사
|
||||
Construction Guides 작도 안내선
|
||||
Contextual Alternates 문맥 대체 글자
|
||||
Convert 변환
|
||||
@@ -2320,7 +2326,8 @@ antiAlias Sharp 날카롭게
|
||||
Location 위치
|
||||
Location: 위치:
|
||||
Lock (⌘2) 잠금 (⌘2)
|
||||
Lossless (lossy WebP isn't available yet) 무손실 (손실 WebP는 아직 지원되지 않음)
|
||||
Lossless 무손실
|
||||
Lossy 손실
|
||||
Lossy: 손실 압축:
|
||||
Luminosity 광도
|
||||
Magic Wand Options 마술봉 옵션
|
||||
@@ -3071,6 +3078,38 @@ mark-style Japanese 일본식
|
||||
Restore 복원
|
||||
Restore Recovered Documents 복구된 문서 복원
|
||||
Restore every preference to its default (applied on OK) 모든 환경 설정을 기본값으로 복원(확인 시 적용)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. 캔버스에 선택 영역이나 도구에 맞는 명령 막대를 표시합니다. 드래그하는 동안과 프레젠테이션 모드에서는 숨겨집니다.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. 화살표 키로 선택 영역을 이동하는 거리입니다. Shift 키를 누르면 10배 멀리 이동합니다.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. 화살표 키로 이동하는 축과 Shift 키로 그리기와 이동을 고정하는 축의 각도입니다.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. 둥근 사각형 도구로 그릴 때 쓰는 모퉁이 반지름입니다. 그리는 동안 반지름을 바꾸면 이 값도 바뀝니다.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. 스크립트에서처럼 위치가 지정되지 않았을 때 붙여넣기가 사본을 오른쪽과 아래로 옮기는 거리입니다. 앱에서 붙여넣기를 하면 사본이 보기의 가운데에 놓입니다.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. 펜 도구가 선택한 패스에서 클릭한 고정점을 삭제하거나 세그먼트를 클릭한 위치에 고정점을 추가하지 않게 합니다.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. 그리기 도구의 포인터를 아이콘 대신 십자선으로 표시합니다. Caps Lock이 켜져 있는 동안에도 같습니다.
|
||||
Shows a tip when the pointer rests on a button or field that has one. 도움말이 있는 버튼이나 필드에 포인터를 올려 두면 도움말을 표시합니다.
|
||||
Shows a warning before a script you choose runs. 선택한 스크립트를 실행하기 전에 경고를 표시합니다.
|
||||
Smooths the edges of artwork on the canvas. 캔버스에 있는 아트웍의 가장자리를 매끄럽게 표시합니다.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. 선택 › 동일 › 칠 색상, 선 색상, 칠 및 선은 전역 또는 별색 견본의 같은 색조만 찾고, 다른 색조는 찾지 않습니다.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. 열린 문서가 없을 때 홈 화면을 표시합니다. 끄면 홈을 클릭할 때까지 창이 비어 있습니다.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. 크기, 위치, 정렬을 위해 선과 모양을 바꾸는 효과를 포함하여 개체를 측정합니다. 그림자, 광선, 흐림 효과는 측정하지 않습니다.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. 100% 확대/축소에서 문서의 1인치가 72가 아닌 96 화면 포인트를 차지합니다.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. 선택 도구로 그룹, 패스 또는 이미지를 두 번 클릭하면 격리 모드로 엽니다.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. 변형 명령이나 변형 패널의 메뉴에서 달리 선택하지 않는 한, 패턴 칠과 선이 아트웍과 함께 변형됩니다.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. 크기 조정에서 달리 선택하지 않는 한, 라이브 모퉁이 반지름이 아트웍과 함께 크기 조정됩니다.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. 크기 조정에서 달리 선택하지 않는 한, 선 두께, 대시, 효과 거리가 아트웍과 함께 크기 조정됩니다.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. 마우스 휠로 캔버스를 스크롤하지 않고 확대/축소합니다.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Cmd/Ctrl 키를 누른 채 마우스 휠을 돌리면 캔버스가 가로로 스크롤됩니다.
|
||||
Dragging sideways on a numeric field's label changes the field's value. 숫자 필드의 레이블을 옆으로 드래그하면 필드 값이 바뀝니다.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. 트랙패드에서 두 손가락으로 회전하는 동작을 하면 캔버스 보기가 회전합니다.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. 도구의 바로 가기 키를 누르고 있는 동안 그 도구가 선택되고, 키를 놓으면 이전 도구가 다시 선택됩니다.
|
||||
Shows the bounding box while you move the selection or draw a shape. 선택 영역을 이동하거나 모양을 그리는 동안 테두리 상자를 표시합니다.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. 트림 마크 만들기에서 서양식 대신 일본식 표시를 그립니다.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. 새 아트웍이 선택 영역의 칠과 선만 가져옵니다. 끄면 선택한 개체의 모양 전체를 가져옵니다.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. 변형 패널, 속성 패널 또는 컨트롤 패널에서 폭이나 높이를 바꾸면 다른 값도 비율에 맞게 바뀝니다.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. 라이브 사각형의 속성에 네 모퉁이 모두에 쓰는 모퉁이 반지름 필드 하나를 표시합니다. 끄면 모퉁이마다 필드가 따로 있습니다.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. 변형 패널에서 편집할 때 변형되는 대상으로, 개체, 패턴 타일 또는 둘 다입니다. 기본값은 패턴 타일 변형을 따릅니다.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. 심볼 인스턴스 하나를 선택하면 변형 패널은 심볼의 등록 지점을 참조점으로 사용합니다.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. 아트보드 도구를 사용하는 동안 아트보드 바깥의 캔버스를 어둡게 표시합니다.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. 아트보드 외부 영역 어둡게 표시가 켜져 있으면 아트보드 도구로 드래그하는 동안에도 아트보드 바깥 영역이 어둡게 유지됩니다.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. 픽셀 크기가 아닌 기본 제공 크기의 새 문서와 단위가 기록되지 않은 열린 파일에 쓰는 단위이며, 여기서 고르고 확인을 누르면 활성 문서의 단위도 바뀝니다.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. 선 두께, 대시, 간격이 이 단위로 표시되며, 입력한 숫자도 이 단위로 읽습니다.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. 글자 크기, 행간, 기준선 이동이 이 단위로 표시되며, 입력한 숫자도 이 단위로 읽습니다.
|
||||
@@ -3212,6 +3251,7 @@ mark-style Japanese 일본식
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. 결과 {n}개 중 {shown}개. 계속 입력하여 범위를 좁히세요.
|
||||
Recent Commands 최근 명령
|
||||
No recent commands 최근 명령 없음
|
||||
Search commands 명령 검색
|
||||
Secondary 보조
|
||||
Select All Art on Layer 레이어의 모든 아트웍 선택
|
||||
Select All Assets 모든 에셋 선택
|
||||
@@ -7469,6 +7509,7 @@ breakText Glyphs 글리프
|
||||
@msg Too many Revolve faces for visibility evaluation 회전체의 면이 너무 많아 가시성을 계산할 수 없습니다
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft는 견본 교환 파일에서 색상과 그룹을 최대 {ASE_MAX_ENTRIES}개까지 읽는데, 이 라이브러리에는 {entries}개가 있습니다
|
||||
@msg WebP encoding failed: {e} WebP 인코딩 실패: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless WebP 인코딩 실패: 이미지가 너무 커서 손실 WebP로 만들 수 없습니다: 해상도를 낮추거나 무손실을 선택하세요
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `index` must be a whole number `index`은(는) 정수여야 합니다
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -779,6 +779,9 @@ liquify-list-end {0}, {1} {0} en {1}
|
||||
Mask Masker
|
||||
Rasterize… Rasteriseren…
|
||||
Create Gradient Mesh… Verloopmesh maken…
|
||||
Flat Vlak
|
||||
To Center Naar het midden
|
||||
To Edge Naar de rand
|
||||
Create Object Mosaic… Objectmozaïek maken…
|
||||
Vector Halftone… Vectorhalftoon…
|
||||
Create Trim Marks Afsnijtekens maken
|
||||
@@ -1799,6 +1802,7 @@ lighting Light Licht
|
||||
Search commands, tools, panels and effects Opdrachten, gereedschappen, panelen en effecten zoeken
|
||||
Style: Stijl:
|
||||
Switch workspace Werkruimte wisselen
|
||||
Search commands Opdrachten zoeken
|
||||
Show all open documents Alle geopende documenten tonen
|
||||
Use Gebruik
|
||||
the object to select | op het object om te selecteren |
|
||||
@@ -3251,7 +3255,8 @@ digits Malayalam Malayalam
|
||||
Hide Video Rulers Videolinialen verbergen
|
||||
Client-side (.html) Client-side (.html)
|
||||
Color Reduction: Kleurreductie:
|
||||
Lossless (lossy WebP isn't available yet) Verliesvrij (WebP met verlies is nog niet beschikbaar)
|
||||
Lossless Verliesvrij
|
||||
Lossy Met verlies
|
||||
Scans: Scans:
|
||||
Server-side (.map) Server-side (.map)
|
||||
{format} Options Opties voor {format}
|
||||
@@ -4281,6 +4286,7 @@ theme Appearance Vormgeving
|
||||
Command Click to Select Objects Behind Command-klik om objecten erachter te selecteren
|
||||
Constrain Angle Vastleghoek
|
||||
Constrain Width and Height Proportions Breedte- en hoogteverhouding vastleggen
|
||||
Copy Width to Height Breedte naar hoogte kopiëren
|
||||
Construction Guides Bouwhulplijnen
|
||||
Curvature Tool Krommingsgereedschap
|
||||
Data Recovery Gegevensherstel
|
||||
@@ -4782,6 +4788,38 @@ font-technology Variable Variabel
|
||||
Preferences Voorkeuren
|
||||
Previous Vorige
|
||||
Restore every preference to its default (applied on OK) Elke voorkeur terugzetten naar de standaard (toegepast bij OK)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Toont op het canvas een balk met opdrachten voor de selectie of het gereedschap; die verdwijnt tijdens het slepen en in de presentatiemodus.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Hoe ver een pijltoets de selectie verplaatst; met Shift verplaatst die tien keer zo ver.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. De hoek van de assen waarlangs pijltoetsen verplaatsen en waaraan Shift tekenen en verplaatsen bindt.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. De hoekradius waarmee het gereedschap Afgeronde rechthoek tekent; als u de radius tijdens het tekenen wijzigt, wijzigt deze waarde ook.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Hoe ver Plakken de kopie naar rechts en omlaag verschuift als er geen positie is opgegeven, zoals vanuit een script; Plakken in de app plaatst die in het midden van de weergave.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Voorkomt dat het gereedschap Pen het ankerpunt verwijdert waarop u klikt op een geselecteerd pad, of er een toevoegt waar u op het segment ervan klikt.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Tekengereedschappen tonen een kruisdraadaanwijzer in plaats van hun pictogram; Caps Lock doet hetzelfde zolang die aan staat.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Toont een tip wanneer de aanwijzer stilstaat op een knop of veld dat er een heeft.
|
||||
Shows a warning before a script you choose runs. Toont een waarschuwing voordat een script dat u kiest wordt uitgevoerd.
|
||||
Smooths the edges of artwork on the canvas. Maakt de randen van illustraties op het canvas vloeiend.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. Selecteren › Zelfde › Vulkleur, Contourkleur en Vulling en contour vinden alleen dezelfde tint van een globaal of steunkleurstaal, niet elke tint ervan.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Toont het startscherm wanneer er geen document open is; uitgeschakeld blijft het venster leeg totdat u op Home klikt.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Meet objecten met hun contouren en vormveranderende effecten voor grootte, positie en uitlijning; schaduwen, gloed en vervagingen worden niet gemeten.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. Bij 100% zoom neemt één inch van het document 96 schermpunten in beslag in plaats van 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Dubbelklikken op een groep, pad of afbeelding met het gereedschap Selectie opent die in de isolatiemodus.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Patroonvullingen en -contouren transformeren mee met de illustratie, tenzij een transformatie of het menu van het deelvenster Transformeren anders kiest.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Dynamische hoekradii schalen mee met de illustratie, tenzij het schalen anders kiest.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Contourdiktes, streepjes en effectafstanden schalen mee met de illustratie, tenzij het schalen anders kiest.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. Het muiswiel zoomt het canvas in plaats van het te schuiven.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Het muiswiel met Cmd/Ctrl ingedrukt schuift het canvas zijwaarts.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Zijwaarts slepen over het label van een numeriek veld wijzigt de waarde van het veld.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Een draaigebaar met twee vingers op een trackpad draait de weergave van het canvas.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Als u de sneltoets van een gereedschap ingedrukt houdt, is dat gereedschap gekozen tot u loslaat, en daarna wordt het vorige gereedschap weer gekozen.
|
||||
Shows the bounding box while you move the selection or draw a shape. Toont het begrenzingskader terwijl u de selectie verplaatst of een vorm tekent.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. Afsnijtekens maken tekent tekens in Japanse stijl in plaats van Romeinse.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Nieuwe illustraties krijgen alleen de vulling en contour van de selectie; uitgeschakeld krijgen ze de hele vormgeving van het geselecteerde object.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Als u de breedte of hoogte wijzigt in het deelvenster Transformeren, het deelvenster Eigenschappen of de balk Bediening, wijzigt de andere naar verhouding.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. De eigenschappen van een dynamische rechthoek tonen één veld Hoekradius voor alle vier hoeken; uitgeschakeld heeft elke hoek een eigen veld.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Wat bewerkingen in het deelvenster Transformeren transformeren: het object, de patroontegels ervan of beide; Standaard volgt Patroontegels transformeren.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Met één symboolinstantie geselecteerd gebruikt het deelvenster Transformeren het registratiepunt van het symbool als referentiepunt.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Maakt het canvas buiten de tekenborden donkerder zolang het gereedschap Tekenbord actief is.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Met Gebied buiten tekenbord dimmen aan blijft het gebied buiten de tekenborden donker terwijl u sleept met het gereedschap Tekenbord.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. De eenheid voor nieuwe documenten in de ingebouwde formaten, behalve formaten in pixels, en voor geopende bestanden die geen eenheid vastleggen; kiest u die hier en klikt u op OK, dan krijgt ook het actieve document deze eenheid.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Contourdiktes, streepjes en tussenruimtes worden in deze eenheid getoond, en getallen die ervoor worden getypt, worden erin gelezen.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Tekstgroottes, regelafstand en basislijnverschuiving worden in deze eenheid getoond, en getallen die ervoor worden getypt, worden erin gelezen.
|
||||
@@ -9728,6 +9766,7 @@ breakText Glyphs Glyphs
|
||||
@msg Too many Revolve faces for visibility evaluation Te veel vlakken van Draaien om de zichtbaarheid te bepalen
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft leest maximaal {ASE_MAX_ENTRIES} kleuren en groepen uit een uitwisselingsbestand voor stalen, en deze bibliotheek heeft er {entries}
|
||||
@msg WebP encoding failed: {e} WebP-codering mislukt: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless WebP-codering mislukt: de afbeelding is te groot voor WebP met verlies: verlaag de resolutie of kies Verliesvrij
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `index` must be a whole number `index` moet een geheel getal zijn
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -188,6 +188,9 @@
|
||||
Mask Maska
|
||||
Rasterize… Rasteryzuj…
|
||||
Create Gradient Mesh… Utwórz siatkę gradientową…
|
||||
Flat Płaski
|
||||
To Center Do środka
|
||||
To Edge Do krawędzi
|
||||
Create Object Mosaic… Utwórz mozaikę obiektów…
|
||||
Vector Halftone… Półton wektorowy…
|
||||
Create Trim Marks Utwórz znaczniki przycięcia
|
||||
@@ -1258,6 +1261,7 @@ lighting Light Światło
|
||||
Search commands, tools, panels and effects Szukaj poleceń, narzędzi, paneli i efektów
|
||||
Style: Styl:
|
||||
Switch workspace Przełącz obszar roboczy
|
||||
Search commands Szukaj poleceń
|
||||
Show all open documents Pokaż wszystkie otwarte dokumenty
|
||||
Use Użyj
|
||||
the object to select | obiekt, aby go zaznaczyć |
|
||||
@@ -2822,7 +2826,8 @@ digits Malayalam Malajalam
|
||||
Hide Video Rulers Ukryj linijki wideo
|
||||
Client-side (.html) Po stronie klienta (.html)
|
||||
Color Reduction: Redukcja kolorów:
|
||||
Lossless (lossy WebP isn't available yet) Bezstratny (stratny WebP nie jest jeszcze dostępny)
|
||||
Lossless Bezstratny
|
||||
Lossy Stratny
|
||||
Scans: Skany:
|
||||
Server-side (.map) Po stronie serwera (.map)
|
||||
{format} Options Opcje: {format}
|
||||
@@ -3867,6 +3872,7 @@ theme Appearance Wygląd
|
||||
Command Click to Select Objects Behind Kliknięcie z Command zaznacza obiekty pod spodem
|
||||
Constrain Angle Kąt ograniczenia
|
||||
Constrain Width and Height Proportions Zachowaj proporcje szerokości i wysokości
|
||||
Copy Width to Height Kopiuj szerokość do wysokości
|
||||
Construction Guides Linie konstrukcyjne
|
||||
Curvature Tool Narzędzie Krzywizna
|
||||
Data Recovery Odzyskiwanie danych
|
||||
@@ -4355,6 +4361,38 @@ font-technology Variable Zmienne
|
||||
Preferences Preferencje
|
||||
Previous Wstecz
|
||||
Restore every preference to its default (applied on OK) Przywróć domyślne wartości wszystkich preferencji (zastosowane po OK)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Pokazuje na obszarze roboczym pasek poleceń dla zaznaczenia lub narzędzia; ukrywa się podczas przeciągania i w trybie prezentacji.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Jak daleko klawisz strzałki przesuwa zaznaczenie; z klawiszem Shift przesuwa je dziesięć razy dalej.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. Kąt osi, wzdłuż których przesuwają klawisze strzałek i do których Shift ogranicza rysowanie i przesuwanie.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. Promień narożnika, z jakim rysuje narzędzie Zaokrąglony prostokąt; zmiana promienia podczas rysowania zmienia też tę wartość.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Jak daleko w prawo i w dół Wklej przesuwa kopię, gdy nie podano położenia, na przykład w skrypcie; Wklej w aplikacji umieszcza ją na środku widoku.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Nie pozwala narzędziu Pióro usuwać punktu kontrolnego klikniętego na zaznaczonej ścieżce ani dodawać punktu w miejscu kliknięcia jej segmentu.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Narzędzia do rysowania pokazują wskaźnik w kształcie krzyżyka zamiast swojej ikony; Caps Lock działa tak samo, dopóki jest włączony.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Pokazuje wskazówkę, gdy wskaźnik zatrzyma się na przycisku lub polu, które ją ma.
|
||||
Shows a warning before a script you choose runs. Pokazuje ostrzeżenie przed uruchomieniem wybranego skryptu.
|
||||
Smooths the edges of artwork on the canvas. Wygładza krawędzie grafiki na obszarze roboczym.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. Zaznacz › Taki sam › Kolor wypełnienia, Kolor obrysu oraz Wypełnienie i obrys dopasowują tylko ten sam odcień globalnej lub dodatkowej próbki, a nie dowolny jej odcień.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Pokazuje stronę startową, gdy nie jest otwarty żaden dokument; po wyłączeniu okno pozostaje puste, dopóki nie klikniesz Strona startowa.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Mierzy obiekty razem z obrysami i efektami zmieniającymi kształt na potrzeby rozmiaru, położenia i wyrównania; cienie, poświaty i rozmycia nie są mierzone.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. Przy powiększeniu 100% jeden cal dokumentu zajmuje 96 punktów ekranu zamiast 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Dwukrotne kliknięcie grupy, ścieżki lub obrazu narzędziem Zaznaczanie otwiera je w trybie izolacji.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Wypełnienia i obrysy wzorkiem przekształcają się razem z grafiką, chyba że przekształcenie lub menu panelu Przekształć wybierze inaczej.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Promienie narożników dynamicznych skalują się razem z grafiką, chyba że skalowanie wybierze inaczej.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Grubości obrysów, kreski i odległości efektów skalują się razem z grafiką, chyba że skalowanie wybierze inaczej.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. Kółko myszy powiększa obszar roboczy zamiast go przewijać.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Kółko myszy z wciśniętym Cmd/Ctrl przewija obszar roboczy w poziomie.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Przeciąganie w bok po etykiecie pola liczbowego zmienia wartość pola.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Gest obrotu dwoma palcami na gładziku obraca widok obszaru roboczego.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Przytrzymanie skrótu narzędzia wybiera je do momentu puszczenia klawisza, a potem ponownie wybierane jest poprzednie narzędzie.
|
||||
Shows the bounding box while you move the selection or draw a shape. Pokazuje obwiednię podczas przesuwania zaznaczenia lub rysowania kształtu.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. Utwórz znaczniki przycięcia rysuje znaczniki w stylu japońskim zamiast rzymskich.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Nowa grafika przejmuje tylko wypełnienie i obrys zaznaczenia; po wyłączeniu przejmuje cały wygląd zaznaczonego obiektu.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Zmiana szerokości lub wysokości w panelu Przekształć, panelu Właściwości lub panelu Sterowanie proporcjonalnie zmienia drugi wymiar.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Właściwości dynamicznego prostokąta pokazują jedno pole Promień narożnika dla wszystkich czterech narożników; po wyłączeniu każdy narożnik ma własne pole.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Co przekształcają zmiany w panelu Przekształć: obiekt, kafelki jego wzorka lub oba; Domyślne podąża za opcją Przekształcaj kafelki wzorków.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Gdy zaznaczone jest jedno wystąpienie symbolu, panel Przekształć używa punktu rejestracji symbolu jako punktu odniesienia.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Przyciemnia obszar roboczy poza obszarami kompozycji, gdy aktywne jest narzędzie Obszar kompozycji.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Gdy włączone jest Przyciemnij obszar poza obszarem kompozycji, obszar poza obszarami kompozycji pozostaje ciemny podczas przeciągania narzędziem Obszar kompozycji.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. Jednostka nowych dokumentów o wbudowanych rozmiarach, z wyjątkiem rozmiarów w pikselach, oraz otwartych plików bez zapisanej jednostki; wybranie jej tutaj i kliknięcie OK ustawia ją też w aktywnym dokumencie.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Grubości obrysu, kreski i odstępy są wyświetlane w tej jednostce, a liczby wpisane dla nich są w niej odczytywane.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Rozmiary tekstu, interlinia i przesunięcie linii bazowej są wyświetlane w tej jednostce, a liczby wpisane dla nich są w niej odczytywane.
|
||||
@@ -9549,6 +9587,7 @@ breakText Glyphs Glify
|
||||
@msg Too many Revolve faces for visibility evaluation Zbyt wiele ścian efektu Obrót do obliczenia widoczności
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft odczytuje z pliku wymiany próbek najwyżej {ASE_MAX_ENTRIES} kolorów i grup, a ta biblioteka ma ich {entries}
|
||||
@msg WebP encoding failed: {e} Kodowanie WebP nie powiodło się: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless Kodowanie WebP nie powiodło się: obraz jest za duży dla stratnego WebP: zmniejsz rozdzielczość lub wybierz Bezstratny
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view` ma wartość smallThumb, mediumThumb, largeThumb, smallList lub largeList
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -552,6 +552,7 @@ antiAlias Sharp Nítido
|
||||
Consolidate All Windows Consolidar Todas as Janelas
|
||||
Constrain Angle Ângulo de Restrição
|
||||
Constrain Width and Height Proportions Restringir Proporções de Largura e Altura
|
||||
Copy Width to Height Copiar Largura para Altura
|
||||
Construction Guides Guias de Construção
|
||||
Contextual Alternates Variantes Contextuais
|
||||
Contextual Task Bar Barra de Tarefas Contextual
|
||||
@@ -615,6 +616,9 @@ antiAlias Sharp Nítido
|
||||
Create Clipping Mask Criar Máscara de Recorte
|
||||
Create From: Criar De:
|
||||
Create Gradient Mesh… Criar Malha de Gradiente…
|
||||
Flat Plano
|
||||
To Center Para o Centro
|
||||
To Edge Para a Borda
|
||||
Create Graph Criar Gráfico
|
||||
Create New Layer Criar Nova Camada
|
||||
Create New Sublayer Criar Nova Subcamada
|
||||
@@ -1717,7 +1721,8 @@ antiAlias Sharp Nítido
|
||||
Artboard Guides with Cmd/Ctrl + Ruler Drag Guias de Prancheta com Cmd/Ctrl + Arrastar da Régua
|
||||
Lock Slices Bloquear Fatias
|
||||
Lock Station Point Bloquear Ponto de Estação
|
||||
Lossless (lossy WebP isn't available yet) Sem Perdas (WebP com perdas ainda não está disponível)
|
||||
Lossless Sem Perdas
|
||||
Lossy Com Perdas
|
||||
Lossy: Com Perdas:
|
||||
Luminosity Luminosidade
|
||||
Magic Wand Varinha Mágica
|
||||
@@ -2556,6 +2561,38 @@ digits Malayalam Malaiala
|
||||
Restore Restaurar
|
||||
Restore Recovered Documents Restaurar Documentos Recuperados
|
||||
Restore every preference to its default (applied on OK) Restaurar toda preferência ao padrão (aplicado em OK)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Mostra na tela uma barra de comandos para a seleção ou a ferramenta; ela se oculta enquanto você arrasta e no Modo de Apresentação.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Quanto uma tecla de seta move a seleção; com Shift, ela move dez vezes mais.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. O ângulo dos eixos ao longo dos quais as teclas de seta movem e aos quais o Shift restringe o desenho e o movimento.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. O raio de canto com que a ferramenta Retângulo Arredondado desenha; mudar o raio durante o desenho também muda este valor.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Quanto Colar desloca a cópia para a direita e para baixo quando nenhuma posição é dada, como a partir de um script; Colar no aplicativo a centraliza na visualização.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Impede que a ferramenta Caneta exclua a âncora clicada em um demarcador selecionado ou adicione uma onde você clica no segmento dele.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. As ferramentas de desenho mostram um ponteiro em cruz em vez do ícone; o Caps Lock faz o mesmo enquanto está ativado.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Mostra uma dica quando o ponteiro para sobre um botão ou campo que tem uma.
|
||||
Shows a warning before a script you choose runs. Mostra um aviso antes de executar um script que você escolher.
|
||||
Smooths the edges of artwork on the canvas. Suaviza as bordas da arte na tela.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. Seleção › Igual › Cor de Preenchimento, Cor do Traçado e Preenchimento e Traçado encontram apenas o mesmo tom de uma amostra global ou de cor especial, não qualquer tom dela.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Mostra a tela Início quando nenhum documento está aberto; desativada, a janela fica vazia até você clicar em Início.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Mede os objetos com seus traçados e efeitos que mudam a forma para tamanho, posição e alinhamento; sombras, brilhos e desfoques não são medidos.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. Com zoom de 100%, uma polegada do documento ocupa 96 pontos de tela em vez de 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Clicar duas vezes em um grupo, demarcador ou imagem com a ferramenta Seleção o abre no modo de isolamento.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Preenchimentos e traçados de padrão se transformam com a arte, a menos que uma transformação ou o menu do painel Transformar escolha outra coisa.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Os raios de canto dinâmicos mudam de escala com a arte, a menos que a escala escolha outra coisa.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Espessuras de traçado, traços e distâncias de efeitos mudam de escala com a arte, a menos que a escala escolha outra coisa.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. A roda do mouse aplica zoom na tela em vez de rolá-la.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. A roda do mouse com Cmd/Ctrl pressionado rola a tela para os lados.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Arrastar para os lados sobre o rótulo de um campo numérico muda o valor do campo.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Um gesto de rotação com dois dedos no trackpad gira a visualização da tela.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Manter pressionado o atalho de uma ferramenta a escolhe até você soltar, e então a ferramenta anterior é escolhida de novo.
|
||||
Shows the bounding box while you move the selection or draw a shape. Mostra a caixa delimitadora enquanto você move a seleção ou desenha uma forma.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. Criar Marcas de Corte desenha marcas no estilo japonês em vez de romanas.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. A nova arte recebe só o preenchimento e o traçado da seleção; desativada, recebe toda a aparência do objeto selecionado.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Mudar a largura ou a altura no painel Transformar, no painel Propriedades ou no painel Controle muda a outra na mesma proporção.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. As propriedades de um retângulo dinâmico mostram um só campo Raio do Canto para os quatro cantos; desativada, cada canto tem seu próprio campo.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. O que as edições no painel Transformar transformam: o objeto, seus blocos de padrão ou ambos; Padrão segue Transformar Blocos de Padrão.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Com uma instância de símbolo selecionada, o painel Transformar usa o ponto de registro do símbolo como ponto de referência.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Escurece a tela fora das pranchetas enquanto a ferramenta Prancheta está ativa.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Com Escurecer Região Fora da Prancheta ativado, a área fora das pranchetas continua escura enquanto você arrasta com a ferramenta Prancheta.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. A unidade dos novos documentos de tamanhos predefinidos, exceto os tamanhos em pixels, e dos arquivos abertos que não registram nenhuma unidade; escolhê-la aqui e clicar em OK também a define no documento ativo.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. As espessuras de traçado, os traços e as lacunas aparecem nesta unidade, e os números digitados para eles são lidos nela.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Tamanhos de texto, entrelinhamento e deslocamento da linha de base aparecem nesta unidade, e os números digitados para eles são lidos nela.
|
||||
@@ -2761,6 +2798,7 @@ digits Malayalam Malaiala
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} de {n} resultado. Continue digitando para filtrá-los.|{shown} de {n} resultados. Continue digitando para filtrá-los.
|
||||
Recent Commands Comandos recentes
|
||||
No recent commands Nenhum comando recente
|
||||
Search commands Pesquisar comandos
|
||||
Secondary Secundária
|
||||
Section Symbol Símbolo de Seção
|
||||
Select Selecionar
|
||||
@@ -7370,6 +7408,7 @@ breakText Glyphs Glifos
|
||||
@msg Too many Revolve faces for visibility evaluation Faces de Revolver demais para avaliar a visibilidade
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} O VectorCraft lê no máximo {ASE_MAX_ENTRIES} cores e grupos de um arquivo de intercâmbio de amostras, e esta biblioteca tem {entries}
|
||||
@msg WebP encoding failed: {e} Falha na codificação WebP: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless Falha na codificação WebP: a imagem é grande demais para WebP com perdas: reduza a resolução ou escolha Sem Perdas
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view` é smallThumb, mediumThumb, largeThumb, smallList ou largeList
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -605,6 +605,7 @@ font-technology Variable Вариативные
|
||||
Consolidate All Windows Объединить все окна
|
||||
Constrain Angle Ограничить угол
|
||||
Constrain Width and Height Proportions Сохранять пропорции ширины и высоты
|
||||
Copy Width to Height Копировать ширину в высоту
|
||||
Construction Guides Направляющие построения
|
||||
Contextual Alternates Контекстные альтернативы
|
||||
Contextual Task Bar Контекстная панель задач
|
||||
@@ -690,6 +691,9 @@ font-technology Variable Вариативные
|
||||
Create from Selection Создать из выделения
|
||||
Create From: Создать из:
|
||||
Create Gradient Mesh… Создать градиентную сетку…
|
||||
Flat Плоский
|
||||
To Center К центру
|
||||
To Edge К краю
|
||||
Create Graph Создать диаграмму
|
||||
Create New Layer Создать новый слой
|
||||
Create New Sublayer Создать новый подслой
|
||||
@@ -2064,7 +2068,8 @@ file-filter Templates Шаблоны
|
||||
Lock Others Заблокировать остальные
|
||||
Lock Slices Заблокировать фрагменты
|
||||
Lock Station Point Заблокировать точку стояния
|
||||
Lossless (lossy WebP isn't available yet) Без потерь (WebP с потерями пока недоступен)
|
||||
Lossless Без потерь
|
||||
Lossy С потерями
|
||||
Lossy: С потерями:
|
||||
Low Низкая
|
||||
lowercase строчные
|
||||
@@ -3094,6 +3099,38 @@ digits Malayalam Малаялам
|
||||
Responsive Адаптивный
|
||||
Restore Восстановить
|
||||
Restore every preference to its default (applied on OK) Восстановить все настройки по умолчанию (применяется при нажатии ОК)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Показывает на холсте панель команд для выделения или инструмента; она скрывается во время перетаскивания и в режиме презентации.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Насколько клавиша со стрелкой сдвигает выделение; с Shift она сдвигает его в десять раз дальше.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. Угол осей, вдоль которых сдвигают клавиши со стрелками и к которым Shift привязывает рисование и перемещение.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. Радиус угла, с которым рисует инструмент «Скруглённый прямоугольник»; изменение радиуса во время рисования меняет и это значение.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Насколько «Вставить» сдвигает копию вправо и вниз, когда положение не задано, например из скрипта; «Вставить» в приложении помещает её в центр вида.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Не даёт инструменту «Перо» удалять опорную точку, по которой вы щёлкаете на выделенном контуре, или добавлять точку там, где вы щёлкаете по его сегменту.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Инструменты рисования показывают указатель-перекрестие вместо своего значка; Caps Lock делает то же самое, пока он включён.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Показывает подсказку, когда указатель задерживается на кнопке или поле, у которых она есть.
|
||||
Shows a warning before a script you choose runs. Показывает предупреждение перед запуском выбранного вами скрипта.
|
||||
Smooths the edges of artwork on the canvas. Сглаживает края графики на холсте.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. «Выделение › То же › Цвет заливки», «Цвет обводки» и «Заливка и обводка» находят только тот же оттенок глобального или плашечного образца, а не любой его оттенок.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Показывает начальный экран, когда нет открытых документов; если выключено, окно остаётся пустым, пока вы не нажмёте «Домой».
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Измеряет объекты с обводками и эффектами, меняющими форму, для размера, положения и выравнивания; тени, свечения и размытия не учитываются.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. При масштабе 100 % один дюйм документа занимает 96 экранных пунктов вместо 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Двойной щелчок по группе, контуру или изображению инструментом «Выделение» открывает их в режиме изоляции.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Заливки и обводки узором трансформируются вместе с графикой, если трансформирование или меню панели «Трансформировать» не задаёт иное.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Радиусы динамических углов масштабируются вместе с графикой, если масштабирование не задаёт иное.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Толщина обводок, штрихи и расстояния эффектов масштабируются вместе с графикой, если масштабирование не задаёт иное.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. Колесо мыши масштабирует холст, а не прокручивает его.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Колесо мыши с нажатой Cmd/Ctrl прокручивает холст по горизонтали.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Перетаскивание по подписи числового поля в сторону меняет значение поля.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Жест поворота двумя пальцами на трекпаде поворачивает вид холста.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Пока вы удерживаете клавишу инструмента, он остаётся выбранным, а после отпускания снова выбирается предыдущий инструмент.
|
||||
Shows the bounding box while you move the selection or draw a shape. Показывает ограничивающую рамку, пока вы перемещаете выделение или рисуете фигуру.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. «Создать метки подрезки» рисует метки в японском стиле вместо западных.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Новые объекты получают только заливку и обводку выделения; если выключено, они получают всё оформление выделенного объекта.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Изменение ширины или высоты на панели «Трансформировать», панели «Свойства» или панели управления пропорционально меняет другой размер.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Свойства динамического прямоугольника показывают одно поле «Радиус угла» для всех четырёх углов; если выключено, у каждого угла своё поле.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Что трансформируют изменения на панели «Трансформировать»: объект, плитки его узора или и то и другое; «По умолчанию» следует «Трансформировать плитки узора».
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Когда выделен один экземпляр символа, панель «Трансформировать» использует точку регистрации символа как опорную точку.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Затемняет холст вне монтажных областей, пока активен инструмент «Монтажная область».
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Когда включено «Затемнять область вне монтажной области», область вне монтажных областей остаётся тёмной, пока вы перетаскиваете инструментом «Монтажная область».
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. Единица новых документов встроенных размеров, кроме размеров в пикселях, и открытых файлов без записанной единицы; если выбрать её здесь и нажать ОК, она станет и единицей активного документа.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Толщина обводки, штрихи и зазоры показываются в этой единице, и введённые для них числа читаются в ней.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Размеры текста, интерлиньяж и смещение базовой линии показываются в этой единице, и введённые для них числа читаются в ней.
|
||||
@@ -3334,6 +3371,7 @@ digits Malayalam Малаялам
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} из {n} результата. Продолжайте вводить, чтобы сузить их.|{shown} из {n} результатов. Продолжайте вводить, чтобы сузить их.|{shown} из {n} результатов. Продолжайте вводить, чтобы сузить их.
|
||||
Recent Commands Недавние команды
|
||||
No recent commands Нет недавних команд
|
||||
Search commands Поиск команд
|
||||
Search Commands… Поиск команд…
|
||||
Secondary Вторичный
|
||||
Section Symbol Символ параграфа
|
||||
@@ -9789,6 +9827,7 @@ shape Open Открытый
|
||||
@msg Too many Revolve faces for visibility evaluation Слишком много граней вращения для расчёта видимости
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft читает из файла обмена образцами не более {ASE_MAX_ENTRIES} цветов и групп, а в этой библиотеке их {entries}
|
||||
@msg WebP encoding failed: {e} Ошибка кодирования WebP: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless Ошибка кодирования WebP: изображение слишком велико для WebP с потерями: уменьшите разрешение или выберите «Без потерь»
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view` принимает значения smallThumb, mediumThumb, largeThumb, smallList или largeList
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -594,6 +594,7 @@ font-technology Variable Variabla
|
||||
Consolidate All Windows Samla alla fönster
|
||||
Constrain Angle Begränsa vinkel
|
||||
Constrain Width and Height Proportions Behåll proportioner för bredd och höjd
|
||||
Copy Width to Height Kopiera bredd till höjd
|
||||
Construction Guides Konstruktionsstödlinjer
|
||||
Contextual Alternates Kontextuella alternativ
|
||||
Contextual Task Bar Kontextuellt aktivitetsfält
|
||||
@@ -679,6 +680,9 @@ font-technology Variable Variabla
|
||||
Create from Selection Skapa från markering
|
||||
Create From: Skapa från:
|
||||
Create Gradient Mesh… Skapa gradientnät…
|
||||
Flat Platt
|
||||
To Center Mot mitten
|
||||
To Edge Mot kanten
|
||||
Create Graph Skapa diagram
|
||||
Create New Layer Skapa nytt lager
|
||||
Create New Sublayer Skapa nytt underlager
|
||||
@@ -1972,7 +1976,8 @@ font-technology Variable Variabla
|
||||
Lock Others Lås övriga
|
||||
Lock Slices Lås skivor
|
||||
Lock Station Point Lås betraktarpunkt
|
||||
Lossless (lossy WebP isn't available yet) Förlustfri (förlustbehäftad WebP är inte tillgänglig än)
|
||||
Lossless Förlustfri
|
||||
Lossy Förlustbehäftad
|
||||
Lossy: Förlust:
|
||||
Low Låg
|
||||
lowercase gemener
|
||||
@@ -2994,6 +2999,38 @@ digits Malayalam Malayalam
|
||||
Responsive Responsiv
|
||||
Restore Återställ
|
||||
Restore every preference to its default (applied on OK) Återställ alla inställningar till standard (verkställs vid OK)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Visar ett fält med kommandon för markeringen eller verktyget på arbetsytan; det döljs medan du drar och i presentationsläge.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Hur långt en piltangent flyttar markeringen; med Skift flyttar den tio gånger så långt.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. Vinkeln på de axlar som piltangenterna flyttar längs och som Skift låser ritande och flyttande till.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. Hörnradien som verktyget Rundad rektangel ritar med; ändrar du radien medan du ritar ändras även det här värdet.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Hur långt åt höger och nedåt Klistra in flyttar kopian när ingen position anges, som från ett skript; Klistra in i appen placerar den mitt i vyn.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Hindrar verktyget Penna från att ta bort ankarpunkten du klickar på i en markerad bana, eller lägga till en där du klickar på dess segment.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Ritverktyg visar en hårkorspekare i stället för sin ikon; Caps Lock gör samma sak medan den är på.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Visar ett tips när pekaren vilar på en knapp eller ett fält som har ett.
|
||||
Shows a warning before a script you choose runs. Visar en varning innan ett skript som du väljer körs.
|
||||
Smooths the edges of artwork on the canvas. Jämnar ut kanterna på grafiken på arbetsytan.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. Markera › Samma › Fyllnadsfärg, Konturfärg och Fyllning och kontur hittar bara samma nyans av ett globalt färgprov eller en dekorfärg, inte vilken nyans som helst av det.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Visar startskärmen när inget dokument är öppet; när det är av förblir fönstret tomt tills du klickar på Start.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Mäter objekt med deras konturer och formändrande effekter för storlek, position och justering; skuggor, glöd och oskärpa mäts inte.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. Vid 100 % zoom tar en tum av dokumentet upp 96 skärmpunkter i stället för 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Dubbelklick på en grupp, en bana eller en bild med verktyget Markering öppnar den i isoleringsläge.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Mönsterfyllningar och -konturer transformeras med grafiken, om inte en transformering eller menyn i panelen Transformera väljer annat.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Dynamiska hörnradier skalas med grafiken, om inte skalningen väljer annat.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Konturtjocklekar, streck och effektavstånd skalas med grafiken, om inte skalningen väljer annat.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. Mushjulet zoomar arbetsytan i stället för att rulla den.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Mushjulet med Cmd/Ctrl nedtryckt rullar arbetsytan i sidled.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Att dra i sidled på ett sifferfälts etikett ändrar fältets värde.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. En rotationsgest med två fingrar på en styrplatta roterar arbetsytans vy.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. När du håller ned ett verktygs kortkommando är verktyget valt tills du släpper, och sedan väljs det föregående verktyget igen.
|
||||
Shows the bounding box while you move the selection or draw a shape. Visar avgränsningsramen medan du flyttar markeringen eller ritar en form.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. Skapa skärmärken ritar märken i japansk stil i stället för romerska.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Ny grafik får bara markeringens fyllning och kontur; när det är av får den hela utseendet hos det markerade objektet.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. När du ändrar bredden eller höjden i panelen Transformera, panelen Egenskaper eller kontrollfältet ändras den andra i proportion.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Egenskaperna för en dynamisk rektangel visar ett fält Hörnradie för alla fyra hörn; när det är av har varje hörn ett eget fält.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Vad ändringar i panelen Transformera transformerar: objektet, dess mönsterrutor eller båda; Standard följer Transformera mönsterrutor.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. När en symbolinstans är markerad använder panelen Transformera symbolens registreringspunkt som referenspunkt.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Gör arbetsytan utanför ritytorna mörkare medan verktyget Rityta är aktivt.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. När Tona ned området utanför ritytan är på förblir området utanför ritytorna mörkt medan du drar med verktyget Rityta.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. Enheten för nya dokument i de inbyggda storlekarna, utom storlekar i pixlar, och för öppnade filer som inte anger någon enhet; om du väljer den här och klickar på OK får även det aktiva dokumentet den enheten.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Konturtjocklekar, streck och mellanrum visas i den här enheten, och tal som skrivs för dem läses i den.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Teckenstorlekar, radavstånd och baslinjeförskjutning visas i den här enheten, och tal som skrivs för dem läses i den.
|
||||
@@ -3220,6 +3257,7 @@ digits Malayalam Malayalam
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} av {n} resultat. Fortsätt skriva för att begränsa dem.|{shown} av {n} resultat. Fortsätt skriva för att begränsa dem.
|
||||
Recent Commands Senaste kommandon
|
||||
No recent commands Inga senaste kommandon
|
||||
Search commands Sök kommandon
|
||||
Search Commands… Sök kommandon…
|
||||
Secondary Sekundär
|
||||
Section Symbol Paragraftecken
|
||||
@@ -9379,6 +9417,7 @@ digits Hindi Hindi
|
||||
@msg Too many Revolve faces for visibility evaluation För många ytor i Rotera runt axel för synlighetsberäkningen
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft läser högst {ASE_MAX_ENTRIES} färger och grupper från en fil för färgruteutbyte, och det här biblioteket har {entries}
|
||||
@msg WebP encoding failed: {e} WebP-kodningen misslyckades: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless WebP-kodningen misslyckades: bilden är för stor för förlustbehäftad WebP: sänk upplösningen eller välj Förlustfri
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `index` must be a whole number `index` måste vara ett heltal
|
||||
@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view` är smallThumb, mediumThumb, largeThumb, smallList eller largeList
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -587,6 +587,7 @@ font-technology Variable Değişken
|
||||
Consolidate All Windows Tüm Pencereleri Birleştir
|
||||
Constrain Angle Açıyı Sınırla
|
||||
Constrain Width and Height Proportions Genişlik ve Yükseklik Oranlarını Sınırla
|
||||
Copy Width to Height Genişliği Yüksekliğe Kopyala
|
||||
Construction Guides İnşaat Kılavuzları
|
||||
Contextual Alternates Bağlamsal Alternatifler
|
||||
Contextual Task Bar Bağlamsal Görev Çubuğu
|
||||
@@ -671,6 +672,9 @@ font-technology Variable Değişken
|
||||
Create from Selection Seçimden Oluştur
|
||||
Create From: Şuradan Oluştur:
|
||||
Create Gradient Mesh… Degrade Kafes Oluştur…
|
||||
Flat Düz
|
||||
To Center Merkeze Doğru
|
||||
To Edge Kenara Doğru
|
||||
Create Graph Grafik Oluştur
|
||||
Create New Layer Yeni Katman Oluştur
|
||||
Create New Sublayer Yeni Alt Katman Oluştur
|
||||
@@ -1857,7 +1861,8 @@ font-technology Variable Değişken
|
||||
Lock Others Diğerlerini Kilitle
|
||||
Lock Slices Dilimleri Kilitle
|
||||
Lock Station Point Kilit İstasyon Noktası
|
||||
Lossless (lossy WebP isn't available yet) Kayıpsız (kayıplı WebP henüz mevcut değil)
|
||||
Lossless Kayıpsız
|
||||
Lossy Kayıplı
|
||||
Lossy: Kayıplı:
|
||||
Low Düşük
|
||||
lowercase küçük harf
|
||||
@@ -2831,6 +2836,38 @@ digits Malayalam Malayalam
|
||||
Responsive duyarlı
|
||||
Restore Geri yükle
|
||||
Restore every preference to its default (applied on OK) Her tercihi varsayılana geri yükleyin (Tamam'a uygulanır)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Tuvalde seçim veya araç için bir komut çubuğu gösterir; sürüklerken ve Sunum Modu'nda gizlenir.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Bir ok tuşunun seçimi ne kadar taşıdığı; Shift ile on kat daha uzağa taşır.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. Ok tuşlarının boyunca taşıdığı ve Shift'in çizmeyi ve taşımayı sınırladığı eksenlerin açısı.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. Yuvarlatılmış Dikdörtgen aracının çizdiği köşe yarıçapı; çizerken yarıçapı değiştirmek bu değeri de değiştirir.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Bir komut dosyasından olduğu gibi konum verilmediğinde Yapıştır'ın kopyayı sağa ve aşağı ne kadar kaydırdığı; uygulamada Yapıştır kopyayı görünümün ortasına koyar.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Kalem aracının seçili bir yolda tıkladığınız bağlantı noktasını silmesini veya yolun bir parçasına tıkladığınız yere nokta eklemesini engeller.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Çizim araçları simgeleri yerine artı işaretli bir imleç gösterir; Caps Lock açıkken aynısını yapar.
|
||||
Shows a tip when the pointer rests on a button or field that has one. İmleç ipucu olan bir düğme veya alan üzerinde durduğunda ipucunu gösterir.
|
||||
Shows a warning before a script you choose runs. Seçtiğiniz bir komut dosyası çalışmadan önce uyarı gösterir.
|
||||
Smooths the edges of artwork on the canvas. Tuvaldeki resmin kenarlarını yumuşatır.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. Seçim › Aynı › Dolgu Rengi, Kontur Rengi ve Doldur ve Konturla yalnızca genel veya spot renk örneğinin aynı tonunu bulur, herhangi bir tonunu değil.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Hiçbir belge açık değilken Ana Sayfa ekranını gösterir; kapalıyken siz Ana Sayfa'ya tıklayana kadar pencere boş kalır.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Nesneleri boyut, konum ve hizalama için konturları ve şekil değiştiren efektleriyle birlikte ölçer; gölgeler, parlamalar ve bulanıklaştırmalar ölçülmez.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. %100 yakınlaştırmada belgenin bir inçi 72 yerine 96 ekran noktası kaplar.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Seçim aracıyla bir gruba, yola veya görüntüye çift tıklamak onu yalıtım modunda açar.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Desen dolguları ve konturları, bir dönüşüm veya Dönüştür panelinin menüsü başka bir seçim yapmadıkça resimle birlikte dönüşür.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Canlı köşe yarıçapları, ölçekleme başka bir seçim yapmadıkça resimle birlikte ölçeklenir.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Kontur kalınlıkları, kesik çizgiler ve efekt mesafeleri, ölçekleme başka bir seçim yapmadıkça resimle birlikte ölçeklenir.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. Fare tekerleği tuvali kaydırmak yerine yakınlaştırır.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Cmd/Ctrl basılıyken fare tekerleği tuvali yana kaydırır.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Sayısal bir alanın etiketi üzerinde yana sürüklemek alanın değerini değiştirir.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. İzleme dörtgeninde iki parmakla döndürme hareketi tuvalin görünümünü döndürür.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Bir aracın kısayol tuşunu basılı tutmak, tuşu bırakana kadar o aracı seçer, ardından önceki araç yeniden seçilir.
|
||||
Shows the bounding box while you move the selection or draw a shape. Seçimi taşırken veya bir şekil çizerken sınırlayıcı kutuyu gösterir.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. Kesim İşaretleri Oluşturun, Roma tarzı yerine Japon tarzı işaretler çizer.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Yeni resim yalnızca seçimin dolgusunu ve konturunu alır; kapalıyken seçili nesnenin tüm görünümünü alır.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Dönüştür panelinde, Özellikler panelinde veya Kontrol çubuğunda genişliği ya da yüksekliği değiştirmek diğerini orantılı olarak değiştirir.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Canlı bir dikdörtgenin özellikleri dört köşenin tümü için tek bir Köşe Yarıçapı alanı gösterir; kapalıyken her köşenin kendi alanı olur.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Dönüştür panelindeki düzenlemelerin neyi dönüştürdüğü: nesneyi, desen döşemelerini veya ikisini; Varsayılan, Desen Döşemelerini Dönüştür'ü izler.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Bir sembol örneği seçiliyken Dönüştür paneli, sembolün kayıt noktasını referans noktası olarak kullanır.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Çalışma Yüzeyi aracı etkinken çalışma yüzeylerinin dışındaki tuvali karartır.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Çalışma Yüzeyi Dışındaki Bölgeyi Karart açıkken, Çalışma Yüzeyi aracıyla sürüklerken çalışma yüzeylerinin dışındaki alan karanlık kalır.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. Piksel boyutları dışındaki yerleşik boyutlardaki yeni belgelerin ve birim kaydetmeyen açılan dosyaların birimi; burada seçip Tamam'a tıkladığınızda etkin belgenin birimi de bu olur.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Kontur kalınlıkları, kısa çizgiler ve boşluklar bu birimde gösterilir ve bunlar için yazılan sayılar bu birimde okunur.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Yazı boyutları, satır aralığı ve taban çizgisi kayması bu birimde gösterilir ve bunlar için yazılan sayılar bu birimde okunur.
|
||||
@@ -3092,6 +3129,7 @@ digits Malayalam Malayalam
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {n} sonuçtan {shown} tanesi. Daraltmak için yazmaya devam edin.
|
||||
Recent Commands Son komutlar
|
||||
No recent commands Son komut yok
|
||||
Search commands Komutları arayın
|
||||
Search Commands… Arama Komutları…
|
||||
Secondary İkincil
|
||||
Section Symbol Bölüm Sembolü
|
||||
@@ -5288,6 +5326,7 @@ liquify-list-end {0}, {1} {0} ve {1}
|
||||
@msg Targa depth {_1}: 16, 24 or 32 bits per pixel Targa derinliği {_1}: piksel başına 16, 24 veya 32 bit olmalıdır
|
||||
@msg Targa encoding failed: the pixel buffer doesn't match the image size Targa kodlaması başarısız oldu: piksel arabelleği görüntü boyutuyla eşleşmiyor
|
||||
@msg WebP encoding failed: {e} WebP kodlaması başarısız oldu: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless WebP kodlaması başarısız oldu: görüntü kayıplı WebP için çok büyük: çözünürlüğü düşürün veya Kayıpsız seçeneğini seçin
|
||||
@msg the pixel buffer doesn't match the image size piksel arabelleği görüntü boyutuyla eşleşmiyor
|
||||
@msg too many layers for PSD (at most 32767) PSD için çok fazla katman (en fazla 32767)
|
||||
@msg {_1} × {_2} pixels is too large for GIF (at most 65535 pixels a side): lower the resolution {_1} × {_2} piksel GIF için çok büyük (kenar başına en fazla 65535 piksel): çözünürlüğü düşürün
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -199,6 +199,8 @@ antiAlias Sharp Різке
|
||||
Crisp Чітке
|
||||
Strong Сильне
|
||||
Anti-aliasing: Згладжування:
|
||||
Art Optimized Оптимізовано для графіки
|
||||
Type Optimized Оптимізовано для тексту
|
||||
Any Kind Будь-який тип
|
||||
Font Technology Технологія шрифту
|
||||
font-technology Variable Варіативні
|
||||
@@ -601,6 +603,7 @@ font-technology Variable Варіативні
|
||||
Consolidate All Windows Об’єднати всі вікна
|
||||
Constrain Angle Обмежити кут
|
||||
Constrain Width and Height Proportions Зберігати пропорції ширини та висоти
|
||||
Copy Width to Height Копіювати ширину у висоту
|
||||
Construction Guides Напрямні побудови
|
||||
Contextual Alternates Контекстні альтернативи
|
||||
Contextual Task Bar Контекстна панель завдань
|
||||
@@ -686,6 +689,9 @@ font-technology Variable Варіативні
|
||||
Create from Selection Створити із виділення
|
||||
Create From: Створити з:
|
||||
Create Gradient Mesh… Створити градієнтну сітку…
|
||||
Flat Плаский
|
||||
To Center До центру
|
||||
To Edge До краю
|
||||
Create Graph Створити діаграму
|
||||
Create New Layer Створити новий шар
|
||||
Create New Sublayer Створити новий підшар
|
||||
@@ -2067,7 +2073,8 @@ file-filter Templates Шаблони
|
||||
Lock Others Заблокувати решту
|
||||
Lock Slices Заблокувати фрагменти
|
||||
Lock Station Point Заблокувати точку стояння
|
||||
Lossless (lossy WebP isn't available yet) Без втрат (WebP із втратами поки недоступний)
|
||||
Lossless Без втрат
|
||||
Lossy Із втратами
|
||||
Lossy: Із втратами:
|
||||
Low Низька
|
||||
lowercase малі
|
||||
@@ -3097,6 +3104,38 @@ digits Malayalam Малаялам
|
||||
Responsive Адаптивний
|
||||
Restore Відновити
|
||||
Restore every preference to its default (applied on OK) Відновити всі параметри за промовчанням (застосовується при натисканні ОК)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Показує на полотні панель команд для виділення або інструмента; вона ховається під час перетягування та в режимі презентації.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Наскільки клавіша зі стрілкою зсуває виділення; із Shift вона зсуває його вдесятеро далі.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. Кут осей, уздовж яких зсувають клавіші зі стрілками і до яких Shift прив’язує малювання та переміщення.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. Радіус кута, з яким малює інструмент «Округлений прямокутник»; зміна радіуса під час малювання змінює й це значення.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Наскільки «Вставити» зсуває копію праворуч і вниз, коли положення не задано, наприклад зі скрипту; «Вставити» в застосунку розміщує її в центрі вигляду.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Не дає інструменту «Перо» видаляти опорну точку, на яку ви клацаєте на виділеному контурі, або додавати точку там, де ви клацаєте на його сегменті.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Інструменти малювання показують вказівник-перехрестя замість свого значка; Caps Lock робить те саме, поки він увімкнений.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Показує підказку, коли вказівник зупиняється на кнопці або полі, що її мають.
|
||||
Shows a warning before a script you choose runs. Показує попередження перед запуском вибраного вами скрипту.
|
||||
Smooths the edges of artwork on the canvas. Згладжує краї графіки на полотні.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. «Виділення › Те саме › Колір заливки», «Колір обведення» та «Заливка та обведення» знаходять лише той самий відтінок глобального або плашкового зразка, а не будь-який його відтінок.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Показує початковий екран, коли немає відкритих документів; якщо вимкнено, вікно лишається порожнім, доки ви не натиснете «Додому».
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Вимірює об’єкти з обведеннями та ефектами, що змінюють форму, для розміру, положення й вирівнювання; тіні, світіння та розмиття не враховуються.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. За масштабу 100 % один дюйм документа займає 96 екранних пунктів замість 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Подвійне клацання на групі, контурі або зображенні інструментом «Виділення» відкриває їх у режимі ізоляції.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Заливки й обведення візерунком трансформуються разом із графікою, якщо трансформування або меню панелі «Трансформувати» не задає іншого.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Радіуси динамічних кутів масштабуються разом із графікою, якщо масштабування не задає іншого.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Товщина обведень, штрихи та відстані ефектів масштабуються разом із графікою, якщо масштабування не задає іншого.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. Колесо миші масштабує полотно, а не прокручує його.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Колесо миші з натиснутою Cmd/Ctrl прокручує полотно по горизонталі.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Перетягування вбік по підпису числового поля змінює значення поля.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Жест обертання двома пальцями на трекпаді обертає вигляд полотна.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Поки ви утримуєте клавішу інструмента, його вибрано, а після відпускання знову вибирається попередній інструмент.
|
||||
Shows the bounding box while you move the selection or draw a shape. Показує обмежувальну рамку, поки ви переміщуєте виділення або малюєте фігуру.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. «Створити мітки підрізування» малює мітки в японському стилі замість західних.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Нові об’єкти отримують лише заливку та обведення виділення; якщо вимкнено, вони отримують усе оформлення виділеного об’єкта.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Зміна ширини або висоти на панелі «Трансформувати», панелі «Властивості» або панелі керування пропорційно змінює інший розмір.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Властивості динамічного прямокутника показують одне поле «Радіус кута» для всіх чотирьох кутів; якщо вимкнено, кожен кут має власне поле.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Що трансформують зміни на панелі «Трансформувати»: об’єкт, плитки його візерунка або обидва; «За замовчуванням» слідує «Трансформувати плитки візерунка».
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Коли виділено один екземпляр символу, панель «Трансформувати» використовує точку реєстрації символу як опорну точку.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Затемнює полотно поза монтажними областями, поки активний інструмент «Монтажна область».
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Коли ввімкнено «Затемнювати ділянку поза монтажною областю», ділянка поза монтажними областями лишається темною, поки ви перетягуєте інструментом «Монтажна область».
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. Одиниця нових документів вбудованих розмірів, крім розмірів у пікселях, і відкритих файлів без записаної одиниці; якщо вибрати її тут і натиснути ОК, вона стане й одиницею активного документа.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Товщина обведення, штрихи й зазори показуються в цій одиниці, і введені для них числа читаються в ній.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Розміри тексту, інтерліньяж і зміщення базової лінії показуються в цій одиниці, і введені для них числа читаються в ній.
|
||||
@@ -3337,6 +3376,7 @@ digits Malayalam Малаялам
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} з {n} результату. Продовжуйте вводити, щоб звузити їх.|{shown} з {n} результатів. Продовжуйте вводити, щоб звузити їх.|{shown} з {n} результатів. Продовжуйте вводити, щоб звузити їх.
|
||||
Recent Commands Нещодавні команди
|
||||
No recent commands Немає нещодавніх команд
|
||||
Search commands Пошук команд
|
||||
Search Commands… Пошук команд…
|
||||
Secondary Вторинний
|
||||
Section Symbol Символ параграфа
|
||||
@@ -7358,6 +7398,7 @@ breakText Glyphs Гліфи
|
||||
@msg Too many Revolve faces for visibility evaluation Забагато граней обертання для обчислення видимості
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft читає з файлу обміну зразками не більше {ASE_MAX_ENTRIES} кольорів і груп, а в цій бібліотеці їх {entries}
|
||||
@msg WebP encoding failed: {e} Не вдалося закодувати WebP: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless Не вдалося закодувати WebP: зображення завелике для WebP із втратами: зменште роздільність або виберіть «Без втрат»
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view` має бути smallThumb, mediumThumb, largeThumb, smallList або largeList
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -222,6 +222,8 @@ antiAlias Sharp Sắc nét
|
||||
Crisp Rõ nét
|
||||
Strong Đậm
|
||||
Anti-aliasing: Khử răng cưa:
|
||||
Art Optimized Tối ưu cho hình vẽ
|
||||
Type Optimized Tối ưu cho chữ
|
||||
Any Kind Bất kỳ loại
|
||||
Font Technology Công nghệ phông chữ
|
||||
font-technology Variable Biến thiên
|
||||
@@ -705,6 +707,7 @@ font-technology Variable Biến thiên
|
||||
Constrain Giữ tỷ lệ
|
||||
Constrain Angle Ràng buộc góc
|
||||
Constrain Width and Height Proportions Ràng buộc tỷ lệ chiều rộng và chiều cao
|
||||
Copy Width to Height Sao chép chiều rộng sang chiều cao
|
||||
Construction Guides Đường căn xây dựng
|
||||
Contextual Alternates Ký tự thay thế theo ngữ cảnh
|
||||
Contextual Task Bar Thanh tác vụ theo ngữ cảnh
|
||||
@@ -793,6 +796,9 @@ font-technology Variable Biến thiên
|
||||
Create from Selection Tạo từ vùng chọn
|
||||
Create From: Tạo từ:
|
||||
Create Gradient Mesh… Tạo lưới chuyển sắc…
|
||||
Flat Phẳng
|
||||
To Center Về tâm
|
||||
To Edge Về cạnh
|
||||
Create Graph Tạo biểu đồ
|
||||
Create New Fields by Tạo trường mới bằng
|
||||
Create New Layer Tạo lớp mới
|
||||
@@ -2376,7 +2382,8 @@ digits Hindi Hindi
|
||||
Long Lines Nét dài
|
||||
Long Strokes Nét vẽ dài
|
||||
Longest: Dài nhất:
|
||||
Lossless (lossy WebP isn't available yet) Không mất dữ liệu (WebP mất dữ liệu chưa hỗ trợ)
|
||||
Lossless Không mất dữ liệu
|
||||
Lossy Mất dữ liệu
|
||||
Lossy: Mất dữ liệu:
|
||||
Low Thấp
|
||||
lowercase chữ thường
|
||||
@@ -3412,6 +3419,38 @@ mark-style Japanese Kiểu Nhật
|
||||
Responsive Đáp ứng
|
||||
Restore Khôi phục
|
||||
Restore every preference to its default (applied on OK) Khôi phục tất cả tùy chọn về mặc định (áp dụng khi nhấn OK)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. Hiển thị trên khung vẽ một thanh lệnh cho vùng chọn hoặc công cụ; thanh này ẩn khi bạn kéo và trong chế độ trình bày.
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. Khoảng cách một phím mũi tên di chuyển vùng chọn; khi giữ Shift, phím di chuyển xa gấp mười lần.
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. Góc của các trục mà phím mũi tên di chuyển theo và Shift giữ việc vẽ và di chuyển theo.
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. Bán kính góc mà công cụ Hình chữ nhật bo góc dùng để vẽ; đổi bán kính trong khi vẽ cũng đổi giá trị này.
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. Khoảng cách Dán dời bản sao sang phải và xuống dưới khi không có vị trí được chỉ định, như từ một tập lệnh; Dán trong ứng dụng đặt bản sao vào giữa khung nhìn.
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. Ngăn công cụ Bút xóa điểm neo bạn nhấp trên một đường dẫn đã chọn, hoặc thêm điểm neo nơi bạn nhấp vào đoạn của nó.
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. Các công cụ vẽ hiển thị con trỏ hình chữ thập thay cho biểu tượng của chúng; Caps Lock cũng làm vậy khi đang bật.
|
||||
Shows a tip when the pointer rests on a button or field that has one. Hiển thị mẹo khi con trỏ dừng trên một nút hoặc trường có mẹo.
|
||||
Shows a warning before a script you choose runs. Hiển thị cảnh báo trước khi một tập lệnh bạn chọn chạy.
|
||||
Smooths the edges of artwork on the canvas. Làm mịn các cạnh của hình minh họa trên khung vẽ.
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. Vùng chọn › Giống nhau › Màu tô, Màu nét và Tô & Nét chỉ khớp với cùng sắc độ của một mẫu màu toàn cục hoặc màu pha, không phải mọi sắc độ của nó.
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. Hiển thị màn hình Trang chủ khi không có tài liệu nào mở; khi tắt, cửa sổ để trống cho đến khi bạn nhấp vào Trang chủ.
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. Đo đối tượng cùng với nét và các hiệu ứng thay đổi hình dạng cho kích thước, vị trí và căn chỉnh; bóng đổ, ánh sáng và làm mờ không được đo.
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. Ở mức thu phóng 100%, một inch của tài liệu chiếm 96 điểm màn hình thay vì 72.
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. Nhấp đúp vào một nhóm, đường dẫn hoặc hình ảnh bằng công cụ Vùng chọn sẽ mở nó trong chế độ cô lập.
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. Phần tô và nét họa tiết biến đổi cùng hình minh họa, trừ khi phép biến đổi hoặc menu của bảng Biến đổi chọn khác.
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. Bán kính góc động co giãn cùng hình minh họa, trừ khi phép co giãn chọn khác.
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. Độ dày nét, gạch đứt và khoảng cách hiệu ứng co giãn cùng hình minh họa, trừ khi phép co giãn chọn khác.
|
||||
The mouse wheel zooms the canvas instead of scrolling it. Con lăn chuột thu phóng khung vẽ thay vì cuộn nó.
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. Con lăn chuột kèm giữ Cmd/Ctrl cuộn khung vẽ sang ngang.
|
||||
Dragging sideways on a numeric field's label changes the field's value. Kéo sang ngang trên nhãn của một trường số sẽ thay đổi giá trị của trường.
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. Cử chỉ xoay bằng hai ngón trên bàn di chuột sẽ xoay khung nhìn của khung vẽ.
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. Giữ phím tắt của một công cụ sẽ chọn công cụ đó cho đến khi bạn thả ra, rồi công cụ trước đó được chọn lại.
|
||||
Shows the bounding box while you move the selection or draw a shape. Hiển thị hộp giới hạn khi bạn di chuyển vùng chọn hoặc vẽ một hình.
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. Tạo dấu cắt xén vẽ dấu kiểu Nhật thay cho kiểu La Mã.
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. Hình minh họa mới chỉ lấy phần tô và nét của vùng chọn; khi tắt, nó lấy toàn bộ diện mạo của đối tượng đã chọn.
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. Đổi chiều rộng hoặc chiều cao trong bảng Biến đổi, bảng Thuộc tính hoặc thanh Điều khiển sẽ đổi kích thước kia theo tỷ lệ.
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. Thuộc tính của một hình chữ nhật động hiển thị một trường Bán kính góc cho cả bốn góc; khi tắt, mỗi góc có trường riêng.
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. Những gì thao tác trong bảng Biến đổi biến đổi: đối tượng, các ô họa tiết của nó hoặc cả hai; Mặc định theo Biến đổi ô họa tiết.
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. Khi chọn một thể hiện biểu tượng, bảng Biến đổi dùng điểm đăng ký của biểu tượng làm điểm tham chiếu.
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. Làm tối khung vẽ bên ngoài các bảng vẽ khi công cụ Bảng vẽ đang hoạt động.
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. Khi Làm tối vùng bên ngoài bảng vẽ đang bật, vùng bên ngoài các bảng vẽ vẫn tối trong khi bạn kéo bằng công cụ Bảng vẽ.
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. Đơn vị cho tài liệu mới theo kích thước dựng sẵn, trừ kích thước bằng pixel, và cho tệp đã mở không ghi đơn vị; chọn đơn vị ở đây rồi bấm OK cũng đặt nó cho tài liệu đang hoạt động.
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. Độ dày nét, nét đứt và khoảng cách hiển thị theo đơn vị này, và số nhập cho chúng được đọc theo đơn vị này.
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. Cỡ chữ, giãn dòng và dịch chuyển đường cơ sở hiển thị theo đơn vị này, và số nhập cho chúng được đọc theo đơn vị này.
|
||||
@@ -3680,6 +3719,7 @@ mark-style Japanese Kiểu Nhật
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. {shown} trên {n} kết quả. Tiếp tục gõ để thu hẹp.
|
||||
Recent Commands Lệnh gần đây
|
||||
No recent commands Không có lệnh gần đây
|
||||
Search commands Tìm kiếm lệnh
|
||||
Search Commands… Tìm kiếm lệnh…
|
||||
Search Fonts Folder Tìm kiếm thư mục phông chữ
|
||||
Searching… Đang tìm kiếm…
|
||||
@@ -7567,6 +7607,7 @@ breakText Glyphs Glyph
|
||||
@msg Too many Revolve faces for visibility evaluation Quá nhiều mặt Xoay tròn để tính toán phần nhìn thấy
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft đọc tối đa {ASE_MAX_ENTRIES} màu và nhóm từ một tệp trao đổi mẫu màu, còn thư viện này có {entries}
|
||||
@msg WebP encoding failed: {e} Mã hóa WebP thất bại: {e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless Mã hóa WebP thất bại: ảnh quá lớn cho WebP có mất dữ liệu: hãy giảm độ phân giải hoặc chọn Không mất dữ liệu
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`: {why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `index` must be a whole number `index` phải là số nguyên
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 205 and column 5.
|
@@ -153,6 +153,8 @@ antiAlias Sharp 锐利
|
||||
Crisp 清晰
|
||||
Strong 强
|
||||
Anti-aliasing: 消除锯齿:
|
||||
Art Optimized 图稿优化
|
||||
Type Optimized 文字优化
|
||||
Appearance 外观
|
||||
Appearance Attribute 外观属性
|
||||
Appearance Item 外观项目
|
||||
@@ -552,6 +554,7 @@ antiAlias Sharp 锐利
|
||||
Consolidate All Windows 合并所有窗口
|
||||
Constrain Angle 约束角度
|
||||
Constrain Width and Height Proportions 约束宽高比例
|
||||
Copy Width to Height 将宽度复制到高度
|
||||
Construction Guides 构造参考线
|
||||
Contextual Alternates 上下文替代
|
||||
Contextual Task Bar 上下文任务栏
|
||||
@@ -636,6 +639,9 @@ antiAlias Sharp 锐利
|
||||
Create from Selection 从选区创建
|
||||
Create From: 创建自:
|
||||
Create Gradient Mesh… 创建渐变网格…
|
||||
Flat 平面
|
||||
To Center 向中心
|
||||
To Edge 向边缘
|
||||
Create Graph 创建图表
|
||||
Create New Layer 创建新图层
|
||||
Create New Sublayer 创建新子图层
|
||||
@@ -1943,7 +1949,8 @@ file-filter Templates 模板
|
||||
Artboard Guides with Cmd/Ctrl + Ruler Drag 按住 Cmd/Ctrl 从标尺拖动创建画板参考线
|
||||
Lock Slices 锁定切片
|
||||
Lock Station Point 锁定基准点
|
||||
Lossless (lossy WebP isn't available yet) 无失真 (尚未提供有失真的 WebP)
|
||||
Lossless 无失真
|
||||
Lossy 有失真
|
||||
Lossy: 有损:
|
||||
Low 低
|
||||
lowercase 小写
|
||||
@@ -2956,6 +2963,38 @@ digits Malayalam 马拉雅拉姆数字
|
||||
Responsive 响应式
|
||||
Restore 恢复
|
||||
Restore every preference to its default (applied on OK) 把所有首选项恢复为默认值 (点击确定后应用)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. 在画布上显示针对所选对象或工具的命令栏;拖动时和演示模式下会隐藏。
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. 按一次箭头键移动所选对象的距离;按住 Shift 时移动十倍距离。
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. 箭头键沿其移动、Shift 将绘制和移动约束到的坐标轴角度。
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. 圆角矩形工具绘制时使用的圆角半径;在绘制时更改半径也会更改此值。
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. 未指定位置时(例如从脚本粘贴),粘贴将副本向右和向下移动的距离;在应用中粘贴会把副本放在视图中央。
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. 阻止钢笔工具删除在所选路径上点击的锚点,或在点击路径段的位置添加锚点。
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. 绘图工具显示十字指针而不是工具图标;Caps Lock 打开时效果相同。
|
||||
Shows a tip when the pointer rests on a button or field that has one. 指针停在带有提示的按钮或字段上时显示提示。
|
||||
Shows a warning before a script you choose runs. 在你选择的脚本运行前显示警告。
|
||||
Smooths the edges of artwork on the canvas. 使画布上图稿的边缘平滑。
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. 选择 › 相同 › 填色、描边颜色和填色和描边只匹配全局色板或专色色板的相同色调,而不是其任意色调。
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. 没有打开文档时显示主页屏幕;关闭时,窗口保持空白,直到你点击主页。
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. 在尺寸、位置和对齐中按对象的描边和改变形状的效果测量对象;阴影、发光和模糊不计入测量。
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. 缩放为 100% 时,文档的一英寸占 96 个屏幕点,而不是 72 个。
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. 用选择工具双击编组、路径或图像时,会在隔离模式中打开它。
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. 图案填色和描边随图稿一起变换,除非变换命令或变换面板的菜单另有选择。
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. 实时转角半径随图稿一起缩放,除非缩放命令另有选择。
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. 描边粗细、虚线和效果距离随图稿一起缩放,除非缩放命令另有选择。
|
||||
The mouse wheel zooms the canvas instead of scrolling it. 鼠标滚轮缩放画布,而不是滚动画布。
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. 按住 Cmd/Ctrl 滚动鼠标滚轮会横向滚动画布。
|
||||
Dragging sideways on a numeric field's label changes the field's value. 在数值字段的标签上横向拖动可更改字段的值。
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. 在触控板上用双指旋转手势可旋转画布视图。
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. 按住工具的快捷键时选择该工具,松开后重新选择之前的工具。
|
||||
Shows the bounding box while you move the selection or draw a shape. 移动所选对象或绘制形状时显示定界框。
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. 创建裁切标记绘制日式标记,而不是西式标记。
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. 新图稿只采用所选对象的填色和描边;关闭时,采用所选对象的全部外观。
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. 在变换面板、属性面板或控制栏中更改宽度或高度时,另一项按比例更改。
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. 实时矩形的属性中为四个角显示一个圆角半径字段;关闭时,每个角都有自己的字段。
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. 变换面板中的编辑所变换的内容:对象、其图案拼贴或两者;默认跟随变换图案拼贴。
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. 选中一个符号实例时,变换面板使用符号的注册点作为参考点。
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. 使用画板工具时调暗画板以外的画布。
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. 调暗画板外的区域打开时,用画板工具拖动期间画板以外的区域保持变暗。
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. 除像素尺寸外,以内置尺寸新建的文档和未记录单位的已打开文件使用此单位;在此选择并点击确定,也会更改当前文档的单位。
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. 描边粗细、虚线和间隔以此单位显示,为其输入的数字也按此单位读取。
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. 字号、行距和基线偏移以此单位显示,为其输入的数字也按此单位读取。
|
||||
@@ -3164,6 +3203,7 @@ digits Malayalam 马拉雅拉姆数字
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. 共 {n} 个结果,显示 {shown} 个。继续输入以缩小范围。
|
||||
Recent Commands 最近使用的命令
|
||||
No recent commands 没有最近使用的命令
|
||||
Search commands 搜索命令
|
||||
Search Commands… 搜索命令…
|
||||
Secondary 次要
|
||||
Section Symbol 章节符号
|
||||
@@ -9535,6 +9575,7 @@ breakText Glyphs 字形
|
||||
@msg Too many Revolve faces for visibility evaluation 回转的面过多,无法进行可见性计算
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft 最多从色板交换文件中读取 {ASE_MAX_ENTRIES} 个颜色和组,而此库有 {entries} 个
|
||||
@msg WebP encoding failed: {e} WebP 编码失败:{e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless WebP 编码失败:图像太大,无法生成有失真 WebP:请降低分辨率或选择无失真
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`:{why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view` 必须是 smallThumb、mediumThumb、largeThumb、smallList 或 largeList
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -163,6 +163,8 @@ antiAlias Sharp 銳利
|
||||
Crisp 清晰
|
||||
Strong 強
|
||||
Anti-aliasing: 消除鋸齒:
|
||||
Art Optimized 圖稿最佳化
|
||||
Type Optimized 文字最佳化
|
||||
Any Kind 所有類型
|
||||
Font Technology 字體技術
|
||||
font-technology Variable 可變
|
||||
@@ -569,6 +571,7 @@ font-technology Variable 可變
|
||||
Consolidate All Windows 合併所有視窗
|
||||
Constrain Angle 強制角度
|
||||
Constrain Width and Height Proportions 強制寬度與高度比例
|
||||
Copy Width to Height 將寬度複製到高度
|
||||
Construction Guides 建構參考線
|
||||
Contextual Alternates 前後關聯替代字
|
||||
Contextual Task Bar 快捷工作列
|
||||
@@ -654,6 +657,9 @@ font-technology Variable 可變
|
||||
Create from Selection 從選取範圍建立
|
||||
Create From: 建立來源:
|
||||
Create Gradient Mesh… 建立漸層網格…
|
||||
Flat 平面
|
||||
To Center 向中心
|
||||
To Edge 向邊緣
|
||||
Create Graph 建立圖表
|
||||
Create New Layer 建立新圖層
|
||||
Create New Sublayer 建立新子圖層
|
||||
@@ -3184,7 +3190,8 @@ liquify-list-end {0}, {1} {0}和{1}
|
||||
Lock Others 鎖定其他
|
||||
Lock Slices 鎖定切片
|
||||
Lock Station Point 鎖定基準點
|
||||
Lossless (lossy WebP isn't available yet) 無失真 (尚未提供有失真的 WebP)
|
||||
Lossless 無失真
|
||||
Lossy 有失真
|
||||
Lossy: 失真度:
|
||||
Low 低
|
||||
lowercase 全部小寫
|
||||
@@ -4235,6 +4242,38 @@ digits Malayalam 馬來亞拉姆數字
|
||||
Responsive 回應式
|
||||
Restore 還原
|
||||
Restore every preference to its default (applied on OK) 將所有偏好設定還原為預設值 (按下確定後套用)
|
||||
Shows a bar of commands for the selection or tool on the canvas; it hides while you drag and in Presentation Mode. 在畫布上顯示適用於選取範圍或工具的指令列;拖曳時和簡報模式下會隱藏。
|
||||
How far an arrow key moves the selection; with Shift, it moves ten times as far. 按一次方向鍵移動選取範圍的距離;按住 Shift 時移動十倍距離。
|
||||
The angle of the axes that arrow keys move along and that Shift holds drawing and moving to. 方向鍵沿其移動、Shift 將繪製和移動限制在其上的座標軸角度。
|
||||
The corner radius the Rounded Rectangle tool draws with; changing the radius while drawing changes this value too. 圓角矩形工具繪製時使用的圓角半徑;在繪製時變更半徑也會變更此值。
|
||||
How far right and down Paste moves the copy when it is given no position, as from a script; Paste in the app centers it in the view. 未指定位置時(例如從指令碼貼上),貼上將拷貝向右和向下移動的距離;在應用程式中貼上會把拷貝放在檢視中央。
|
||||
Stops the Pen tool from deleting the anchor you click on a selected path, or adding one where you click its segment. 防止筆型工具刪除在選取路徑上按下的錨點,或在按下路徑區段的位置新增錨點。
|
||||
Drawing tools show a crosshair pointer instead of their icon; Caps Lock does the same while it is on. 繪圖工具顯示十字指標而不是工具圖示;Caps Lock 開啟時效果相同。
|
||||
Shows a tip when the pointer rests on a button or field that has one. 指標停在有提示的按鈕或欄位上時顯示提示。
|
||||
Shows a warning before a script you choose runs. 在你選擇的指令碼執行前顯示警告。
|
||||
Smooths the edges of artwork on the canvas. 使畫布上圖稿的邊緣平滑。
|
||||
Select › Same › Fill Color, Stroke Color and Fill & Stroke match only the same tint of a global or spot swatch, not any tint of it. 選取 › 相同 › 填色顏色、筆畫顏色和填色與筆畫只符合全域色票或特別色色票的相同色調,而不是其任意色調。
|
||||
Shows the Home screen when no document is open; off, the window stays empty until you click Home. 沒有開啟文件時顯示首頁畫面;關閉時,視窗保持空白,直到你按下首頁。
|
||||
Measures objects with their strokes and shape-changing effects for size, position and alignment; shadows, glows and blurs are not measured. 在尺寸、位置和對齊中依物件的筆畫和改變形狀的效果測量物件;陰影、光暈和模糊不計入測量。
|
||||
At 100% zoom, one inch of the document takes 96 screen points instead of 72. 縮放為 100% 時,文件的一英吋佔 96 個螢幕點,而不是 72 個。
|
||||
Double-clicking a group, path or image with the Selection tool opens it in isolation mode. 用選取工具按兩下群組、路徑或影像時,會在隔離模式中開啟它。
|
||||
Pattern fills and strokes transform with the art, unless a transform or the Transform panel's menu chooses otherwise. 圖樣填色和筆畫隨圖稿一起變形,除非變形指令或變形面板的選單另有選擇。
|
||||
Live corner radii scale with the art, unless the scale chooses otherwise. 即時轉角半徑隨圖稿一起縮放,除非縮放指令另有選擇。
|
||||
Stroke weights, dashes and effect distances scale with the art, unless the scale chooses otherwise. 筆畫寬度、虛線和效果距離隨圖稿一起縮放,除非縮放指令另有選擇。
|
||||
The mouse wheel zooms the canvas instead of scrolling it. 滑鼠滾輪縮放畫布,而不是捲動畫布。
|
||||
The mouse wheel with Cmd/Ctrl held scrolls the canvas sideways. 按住 Cmd/Ctrl 捲動滑鼠滾輪會橫向捲動畫布。
|
||||
Dragging sideways on a numeric field's label changes the field's value. 在數值欄位的標籤上橫向拖曳可變更欄位的值。
|
||||
A two-finger rotate gesture on a trackpad rotates the canvas view. 在觸控式軌跡板上以雙指旋轉手勢可旋轉畫布檢視。
|
||||
Holding a tool's shortcut key chooses the tool until you let go, and then the previous tool is chosen again. 按住工具的快速鍵時選擇該工具,放開後重新選擇之前的工具。
|
||||
Shows the bounding box while you move the selection or draw a shape. 移動選取範圍或繪製形狀時顯示邊框。
|
||||
Create Trim Marks draws Japanese-style marks instead of Roman ones. 建立剪裁標記繪製日式標記,而不是西式標記。
|
||||
New art takes only the fill and stroke of the selection; off, it takes the selected object's whole appearance. 新圖稿只採用選取範圍的填色和筆畫;關閉時,採用選取物件的全部外觀。
|
||||
Changing the width or height in the Transform panel, the Properties panel or the Control bar changes the other in proportion. 在變形面板、內容面板或控制列中變更寬度或高度時,另一項依比例變更。
|
||||
A live rectangle's properties show one Corner Radius field for all four corners; off, each corner has its own field. 即時矩形的屬性中為四個角顯示一個圓角半徑欄位;關閉時,每個角都有自己的欄位。
|
||||
What edits in the Transform panel transform: the object, its pattern tiles or both; Default follows Transform Pattern Tiles. 變形面板中的編輯所變形的內容:物件、其圖樣拼貼或兩者;預設依照變形圖樣拼貼。
|
||||
With one symbol instance selected, the Transform panel uses the symbol's registration point as its reference point. 選取一個符號實體時,變形面板使用符號的註冊點作為參考點。
|
||||
Darkens the canvas outside the artboards while the Artboard tool is active. 使用工作區域工具時調暗工作區域以外的畫布。
|
||||
With Fade Region Outside Artboard on, the area outside the artboards stays dark while you drag with the Artboard tool. 調暗工作區域外的區域開啟時,用工作區域工具拖曳期間工作區域以外的區域保持變暗。
|
||||
The unit for new documents from built-in sizes other than pixel sizes and for opened files that record no unit; choosing one here and clicking OK also sets the active document's units. 除像素尺寸外,以內建尺寸新增的文件及未記錄單位的已開啟檔案使用此單位;在此選擇並按下確定,也會變更目前文件的單位。
|
||||
Stroke weights, dashes and gaps show in this unit, and numbers typed for them are read in it. 筆畫寬度、虛線和間隙以此單位顯示,為其輸入的數字也以此單位讀取。
|
||||
Type sizes, leading and baseline shift show in this unit, and numbers typed for them are read in it. 字體大小、行距和基線位移以此單位顯示,為其輸入的數字也以此單位讀取。
|
||||
@@ -4473,6 +4512,7 @@ digits Malayalam 馬來亞拉姆數字
|
||||
@plural {shown} of {n} result. Keep typing to narrow them.|{shown} of {n} results. Keep typing to narrow them. 共 {n} 個結果,顯示 {shown} 個。繼續輸入以縮小範圍。
|
||||
Recent Commands 最近使用的指令
|
||||
No recent commands 沒有最近使用的指令
|
||||
Search commands 搜尋指令
|
||||
Search Commands… 搜尋指令…
|
||||
Secondary 次要
|
||||
Section Symbol 章節符號
|
||||
@@ -7524,6 +7564,7 @@ breakText Glyphs 字符
|
||||
@msg Too many Revolve faces for visibility evaluation 迴轉的面過多,無法計算可見性
|
||||
@msg VectorCraft reads at most {ASE_MAX_ENTRIES} colors and groups from a swatch exchange file, and this library has {entries} VectorCraft 從色票交換檔案最多讀取 {ASE_MAX_ENTRIES} 個顏色和群組,而此資料庫有 {entries} 個
|
||||
@msg WebP encoding failed: {e} WebP 編碼失敗:{e}
|
||||
@msg WebP encoding failed: the image is too large for lossy WebP: lower the resolution or choose Lossless WebP 編碼失敗:影像太大,無法產生有失真 WebP:請降低解析度或選擇無失真
|
||||
@msg [{j}] `{_1}`: {why} [{j}] `{_1}`:{why}
|
||||
@msg `answers[{i}]` {e} `answers[{i}]` {e}
|
||||
@msg `view` is smallThumb, mediumThumb, largeThumb, smallList or largeList `view` 必須是 smallThumb、mediumThumb、largeThumb、smallList 或 largeList
|
||||
|
||||
|
Can't render this file because it is too large.
|
@@ -190,20 +190,23 @@ mod tests {
|
||||
assert_eq!(app.ui.status_notes, Some((app.ui.status.clone(), notes)));
|
||||
}
|
||||
|
||||
/// An export whose encoder notes an option it didn't apply (lossy WebP) before what the file
|
||||
/// loses (type in a font that isn't installed): the status bar names what the file loses, and
|
||||
/// the hover lists it first.
|
||||
/// An export whose encoder notes what an option left out (the fill hatches that
|
||||
/// `includeHatches: false` leaves out of a DXF drawing) and what the file loses (a see-through
|
||||
/// rectangle that DXF 2000 writes opaque): the status bar names what the file loses, and the
|
||||
/// hover lists the option's note last.
|
||||
#[test]
|
||||
fn an_export_names_what_the_file_loses_before_a_note_on_the_options() {
|
||||
let (mut app, _) = app();
|
||||
app.run("file.new", json!({"width": 100, "height": 100})).unwrap();
|
||||
app.run("text.create", json!({"x": 5, "y": 20, "text": "Ab", "font": "Nonexistent Sans Probe"})).unwrap();
|
||||
let r = export(&mut app, Some("webp"), Some("/out/d.webp".into()), &json!({"lossless": false})).unwrap();
|
||||
app.run("shape.rectangle", json!({"x": 10, "y": 10, "width": 30, "height": 20})).unwrap();
|
||||
app.run("object.setProps", json!({"opacity": 50})).unwrap();
|
||||
let r = export(&mut app, Some("dxf"), Some("/out/d.dxf".into()), &json!({"version": "2000", "includeHatches": false})).unwrap();
|
||||
let notes = notes_of(&r);
|
||||
assert_eq!(notes.len(), 2, "{r}");
|
||||
assert!(notes[0].contains("Nonexistent Sans Probe"), "{r}");
|
||||
assert!(notes[1].starts_with("lossy WebP"), "{r}");
|
||||
assert_eq!(app.ui.status, exported_with_notes("/out/d.webp", 2, ¬es[0]));
|
||||
let Some((option, losses)) = notes.split_last() else { panic!("no notes: {r}") };
|
||||
assert!(option.starts_with("fill hatches are left out"), "{r}");
|
||||
assert!(losses.iter().any(|n| n.starts_with("transparency needs DXF 2004")), "{r}");
|
||||
assert!(!losses.iter().any(|n| n.starts_with("fill hatches")), "{r}");
|
||||
assert_eq!(app.ui.status, exported_with_notes("/out/d.dxf", notes.len(), ¬es[0]));
|
||||
assert_eq!(app.ui.status_notes, Some((app.ui.status.clone(), notes)));
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,32 @@ fn file_ends_with_exit() {
|
||||
assert!(matches!(last, Item::Cmd("Exit", "app.quit", _)), "{last:?}");
|
||||
}
|
||||
|
||||
/// Help starts with Search Commands…, the command search's own command, showing its shortcut,
|
||||
/// then a separator; the menus list it once.
|
||||
#[test]
|
||||
fn help_starts_with_search_commands() {
|
||||
let app = VectorcraftApp::new(vectorcraft_engine::Session::new(), crate::Services::default());
|
||||
let tree = menu_tree();
|
||||
let (_, help) = tree.iter().find(|(t, _)| *t == "Help").unwrap();
|
||||
assert!(matches!(help[0], Item::Cmd("Search Commands…", "help.commandPalette", _)), "{:?}", help[0]);
|
||||
assert!(matches!(help[1], Item::Sep), "{:?}", help[1]);
|
||||
let Some(Entry::Item(row)) = entry(&app, &help[0]) else { panic!("Search Commands… is not shown") };
|
||||
assert!(row.enabled);
|
||||
assert_eq!(row.shortcut, shortcut_of("help.commandPalette"));
|
||||
assert!(row.shortcut.is_some(), "the search's shortcut shows next to the item");
|
||||
fn count(items: &[Item]) -> usize {
|
||||
items
|
||||
.iter()
|
||||
.map(|it| match it {
|
||||
Item::Cmd(_, "help.commandPalette", _) => 1,
|
||||
Item::Sub(_, children) => count(children),
|
||||
_ => 0,
|
||||
})
|
||||
.sum()
|
||||
}
|
||||
assert_eq!(tree.iter().map(|(_, items)| count(items)).sum::<usize>(), 1);
|
||||
}
|
||||
|
||||
/// No application menu in the window (as in Illustrator): the bar starts at File.
|
||||
#[test]
|
||||
fn the_bar_starts_at_file() {
|
||||
|
||||
@@ -738,12 +738,13 @@ pub fn menu_tree_named(english_names: bool) -> Vec<(&'static str, Vec<Item>)> {
|
||||
(
|
||||
"Help",
|
||||
vec![
|
||||
c("Search Commands…", "help.commandPalette"),
|
||||
Sep,
|
||||
c("Join Our Discord", "help.discord"),
|
||||
c("ArtCraft Website", "help.website"),
|
||||
c("VectorCraft on getartcraft.com", "help.appPage"),
|
||||
c("VectorCraft on GitHub", "help.github"),
|
||||
Sep,
|
||||
c("Search Commands…", "help.commandPalette"),
|
||||
todos("VectorCraft Help…", "F1"),
|
||||
c("Safe Mode…", "help.safeMode"),
|
||||
c("Copy Troubleshooting Info", "help.copyTroubleshootingInfo"),
|
||||
|
||||
@@ -1337,7 +1337,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
|
||||
"ui.dialogReset",
|
||||
"Reset",
|
||||
"",
|
||||
"{} the open dialog's Reset, which its Cancel button reads while Alt (Option on macOS) is held (Flare Tool Options, dialog `flareOptions`): its fields go back to their defaults and the dialog stays open, so OK applies them → the dialog; an error when no dialog is open or the open one has no Reset",
|
||||
"{} the open dialog's Reset, which its Cancel button reads while Alt (Option on macOS) is held (Flare Tool Options, dialog `flareOptions`; Save PDF, dialog `savePdf`): its fields go back to their defaults (Save PDF: the chosen preset's settings, with the path and artboards kept) and the dialog stays open, so OK applies them → the dialog; an error when no dialog is open, the open one has no Reset, or Save PDF's chosen preset was deleted (the fields stay as they are)",
|
||||
),
|
||||
(
|
||||
"ui.justification",
|
||||
|
||||
@@ -2543,13 +2543,13 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
/// The click on the app bar's search button that opens the palette leaves it open; the next
|
||||
/// click on the button closes it.
|
||||
/// The click on the app bar's search field that opens the palette leaves it open; the next
|
||||
/// click on the field closes it.
|
||||
#[test]
|
||||
fn the_click_that_opens_the_palette_does_not_close_it() {
|
||||
let mut window = Window::new();
|
||||
let nodes = window.frame(vec![]);
|
||||
let at = button_at(&nodes, "Search commands, tools, panels and effects");
|
||||
let at = button_at(&nodes, "Search commands");
|
||||
window.click(at);
|
||||
assert!(window.app.ui.palette_open, "the click opens the palette");
|
||||
window.frame(vec![]);
|
||||
|
||||
@@ -870,7 +870,7 @@ pub(crate) fn show_sized(app: &mut VectorcraftApp, ui: &mut Ui, height: f32) {
|
||||
}
|
||||
if let (Some((t, phase)), Some(tint)) = (tinted, tgt.tint()) {
|
||||
if phase == Live::Released {
|
||||
super::color_guide::choose_base(app, tint.base.tinted(t));
|
||||
super::color_guide::choose_linked_base(app, tint.base.tinted(t), Some((tint.swatch.clone(), t)));
|
||||
}
|
||||
apply_tint(app, &tgt, tint, t, phase);
|
||||
}
|
||||
|
||||
@@ -10,34 +10,141 @@
|
||||
//! Swatches saves as one group (without a selection, the group holds the harmony colors). The
|
||||
//! selection lasts until the guide changes. A harmony color or a cell dragged with the primary button
|
||||
//! carries its color alone, as shown, without applying it or changing the selection; the Swatches
|
||||
//! panel makes a swatch of it. Limit to Library (the library button,
|
||||
//! panel makes a swatch of it. When the base is a spot color, or a tint of one, chosen from the
|
||||
//! Swatches panel, the Color panel's tint slider or the base chip ([`SpotBase`]), the cells right of
|
||||
//! the center in the base row of Tints/Shades are tints of that spot color: a click applies the tint,
|
||||
//! a drag carries it, and saving makes tint swatches linked to the spot color. Every other cell is
|
||||
//! a process color. Limit to Library (the library button,
|
||||
//! `ui.colorGuideLimit`) snaps every colour to a swatch library or the document's swatches; Edit or
|
||||
//! Apply Colors opens Recolor Artwork with the harmony colours, limited the same way.
|
||||
|
||||
use egui::{Rect, Sense, Ui, vec2};
|
||||
use serde_json::{Value, json};
|
||||
use vectorcraft_color::harmony::{Guide, GuideOptions, Harmony, Variation};
|
||||
use vectorcraft_color::harmony::{self, Guide, GuideOptions, Harmony, Variation};
|
||||
use vectorcraft_color::{Color, Paint};
|
||||
use vectorcraft_engine::cmd::swatchlib;
|
||||
|
||||
use super::swatches::{self, colour_libraries, limit_key, limit_name};
|
||||
use super::{active_paint, apply_click, c32, color_json, library_panel, pstate, set_pstate};
|
||||
use super::{active_paint, apply_click, c32, color_json, library_panel, paint_params, pstate, set_pstate};
|
||||
use crate::VectorcraftApp;
|
||||
use crate::widgets::{self, PanelDrag, menu_item};
|
||||
|
||||
/// The base colour before one is set: an orange.
|
||||
const DEFAULT_BASE: Color = Color::Rgb { r: 230.0 / 255.0, g: 120.0 / 255.0, b: 40.0 / 255.0 };
|
||||
|
||||
/// The guide's base color: the one last chosen or set with the base chip; before that, the current
|
||||
/// color.
|
||||
/// The spot color swatch the guide's base is a tint of (`UiState::color_guide_spot`).
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct SpotBase {
|
||||
/// The document the swatch belongs to (its `uid`).
|
||||
pub doc: u64,
|
||||
/// The spot color swatch's name.
|
||||
pub swatch: String,
|
||||
/// The base's tint of it, 0..1.
|
||||
pub tint: f32,
|
||||
}
|
||||
|
||||
/// The spot color the base is a tint of, while its swatch is still a spot color of the active
|
||||
/// document.
|
||||
fn live_spot(app: &VectorcraftApp) -> Option<&SpotBase> {
|
||||
let s = app.ui.color_guide_spot.as_ref()?;
|
||||
let st = app.session.active()?;
|
||||
let spot = st.doc.swatch(&s.swatch).is_some_and(|w| w.spot) && st.doc.global_color(&s.swatch).is_some();
|
||||
(st.uid == s.doc && spot).then_some(s)
|
||||
}
|
||||
|
||||
/// The color of tint `tint` (0..1) of global swatch `name` in the active document.
|
||||
fn tint_color(app: &VectorcraftApp, name: &str, tint: f32) -> Option<Color> {
|
||||
app.session.active()?.doc.tint_paint(name, tint)?.color()
|
||||
}
|
||||
|
||||
/// The guide's base color: the one last chosen or set with the base chip (a spot color base
|
||||
/// follows edits to its swatch); before that, the current color.
|
||||
pub(crate) fn base_color(app: &VectorcraftApp) -> Color {
|
||||
if let Some(c) = live_spot(app).and_then(|s| tint_color(app, &s.swatch, s.tint)) {
|
||||
return c;
|
||||
}
|
||||
app.ui.color_guide_base.unwrap_or_else(|| active_paint(app).color().unwrap_or(DEFAULT_BASE))
|
||||
}
|
||||
|
||||
/// Make `c` the guide's base color: a color chosen in the Color panel, the Swatches panel or the
|
||||
/// Color Picker. A color applied from the guide itself leaves the base as it is.
|
||||
pub(crate) fn choose_base(app: &mut VectorcraftApp, c: Color) {
|
||||
choose_linked_base(app, c, None);
|
||||
}
|
||||
|
||||
/// [`choose_base`] for a color linked to a global swatch at a tint (0..1): when that swatch is a
|
||||
/// spot color of the active document, the base is that tint of it ([`SpotBase`]).
|
||||
pub(crate) fn choose_linked_base(app: &mut VectorcraftApp, c: Color, link: Option<(String, f32)>) {
|
||||
app.ui.color_guide_base = Some(c);
|
||||
app.ui.color_guide_spot = link.and_then(|(swatch, tint)| {
|
||||
let st = app.session.active()?;
|
||||
st.doc.swatch(&swatch).filter(|w| w.spot)?;
|
||||
Some(SpotBase { doc: st.uid, swatch, tint: tint.clamp(0.0, 1.0) })
|
||||
});
|
||||
}
|
||||
|
||||
/// `swatch.edit` renamed swatch `from` of the active document to `to`: a spot color base linked to
|
||||
/// it links to `to`.
|
||||
pub(crate) fn swatch_renamed(app: &mut VectorcraftApp, from: &str, to: &str) {
|
||||
let uid = app.session.active().map(|st| st.uid);
|
||||
if let Some(s) = app.ui.color_guide_spot.as_mut()
|
||||
&& Some(s.doc) == uid
|
||||
&& s.swatch == from
|
||||
{
|
||||
s.swatch = to.to_string();
|
||||
}
|
||||
}
|
||||
|
||||
/// The global swatch and tint (0..1) a solid paint links to.
|
||||
fn paint_link(p: &Paint) -> Option<(String, f32)> {
|
||||
match p {
|
||||
Paint::Solid { swatch: Some(n), tint, .. } => Some((n.clone(), *tint)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
/// The tint of the spot color base that cell (`row`, `col`) of the guide `g` is: a cell right of
|
||||
/// the center in the base row of Tints/Shades, without a library limit. Its tint is the base's
|
||||
/// tint less the share the cell goes towards white. → (swatch, tint 0..1)
|
||||
fn cell_tint(app: &VectorcraftApp, g: &Guide, row: usize, col: usize) -> Option<(String, f32)> {
|
||||
let opts = app.ui.color_guide.clamped();
|
||||
let centre = g.centre();
|
||||
if row != 0 || col <= centre || opts.variation != Variation::TintsShades || !app.ui.color_guide_limit.is_empty() {
|
||||
return None;
|
||||
}
|
||||
let s = live_spot(app)?;
|
||||
let step = i32::try_from(col - centre).ok()?;
|
||||
Some((s.swatch.clone(), s.tint * (1.0 - harmony::step_fraction(&opts, step))))
|
||||
}
|
||||
|
||||
/// The paint cell (`row`, `col`) of `g` applies, carries and saves: a tint of the spot color base
|
||||
/// ([`cell_tint`]) or the color the cell shows.
|
||||
fn cell_paint(app: &VectorcraftApp, g: &Guide, row: usize, col: usize) -> Option<Paint> {
|
||||
let color = *g.grid.get(row)?.get(col)?;
|
||||
Some(match cell_tint(app, g, row, col) {
|
||||
Some((name, tint)) => Paint::Solid { color, swatch: Some(name), tint },
|
||||
None => Paint::solid(color),
|
||||
})
|
||||
}
|
||||
|
||||
/// The `swatch.new` / `swatch.newGroup` entry for cell (`row`, `col`) of `g`: `{swatch, tint}` for
|
||||
/// a tint of the spot color base, the color otherwise.
|
||||
fn cell_entry(app: &VectorcraftApp, g: &Guide, row: usize, col: usize) -> Option<Value> {
|
||||
Some(match cell_paint(app, g, row, col)? {
|
||||
p @ Paint::Solid { swatch: Some(_), .. } => paint_params(&p),
|
||||
p => color_json(&p.color()?),
|
||||
})
|
||||
}
|
||||
|
||||
/// `g` with the base row's spot color tints ([`cell_tint`]) shown in their own colors.
|
||||
fn with_spot_tints(app: &VectorcraftApp, mut g: Guide) -> Guide {
|
||||
let cols = g.grid.first().map_or(0, Vec::len);
|
||||
let tints: Vec<(usize, Color)> =
|
||||
(0..cols).filter_map(|col| cell_tint(app, &g, 0, col).and_then(|(n, t)| tint_color(app, &n, t)).map(|c| (col, c))).collect();
|
||||
for (col, c) in tints {
|
||||
g.grid[0][col] = c;
|
||||
}
|
||||
g
|
||||
}
|
||||
|
||||
fn rule(ctx: &egui::Context) -> Harmony {
|
||||
@@ -59,6 +166,7 @@ fn clear_selection(ctx: &egui::Context) {
|
||||
#[derive(Clone, PartialEq)]
|
||||
struct SelKey {
|
||||
base: Color,
|
||||
spot: Option<SpotBase>,
|
||||
opts: GuideOptions,
|
||||
rule: usize,
|
||||
limit: String,
|
||||
@@ -68,6 +176,7 @@ struct SelKey {
|
||||
fn sel_key(app: &VectorcraftApp, ctx: &egui::Context, g: &Guide) -> SelKey {
|
||||
SelKey {
|
||||
base: base_color(app),
|
||||
spot: live_spot(app).cloned(),
|
||||
opts: app.ui.color_guide,
|
||||
rule: pstate(ctx, "cg-harmony"),
|
||||
limit: app.ui.color_guide_limit.clone(),
|
||||
@@ -93,12 +202,13 @@ struct GuideKey {
|
||||
doc: Option<(u64, u64)>,
|
||||
}
|
||||
|
||||
/// The guide the panel shows, limited to the Limit to Library colours.
|
||||
/// The guide the panel shows, limited to the Limit to Library colours; without a limit, a spot
|
||||
/// color base's tints show in their own colors.
|
||||
fn guide(app: &VectorcraftApp, ctx: &egui::Context) -> Guide {
|
||||
let (base, rule, opts) = (base_color(app), rule(ctx), app.ui.color_guide);
|
||||
let limit = &app.ui.color_guide_limit;
|
||||
if limit.is_empty() {
|
||||
return Guide::new(base, rule, &opts);
|
||||
return with_spot_tints(app, Guide::new(base, rule, &opts));
|
||||
}
|
||||
let doc = app.session.active().filter(|_| limit == swatchlib::DOCUMENT_SWATCHES).map(|d| (d.uid, d.revision));
|
||||
let key = GuideKey { base, rule, opts, limit: limit.clone(), doc };
|
||||
@@ -156,10 +266,11 @@ fn edit_or_apply(app: &mut VectorcraftApp, g: &Guide) {
|
||||
app.run("ui.recolorDialog", p).ok();
|
||||
}
|
||||
|
||||
/// Save the selected cells' colors as swatches (one undo step), each in its own model.
|
||||
/// Save the selected cells' colors as swatches (one undo step), each in its own model; a tint of a
|
||||
/// spot color base becomes a tint swatch of it.
|
||||
fn save_selected(app: &mut VectorcraftApp, ctx: &egui::Context) {
|
||||
let g = guide(app, ctx);
|
||||
let colors: Vec<Value> = live_selection(app, ctx, &g).into_iter().filter_map(|(r, c)| g.grid.get(r)?.get(c)).map(color_json).collect();
|
||||
let colors: Vec<Value> = live_selection(app, ctx, &g).into_iter().filter_map(|(r, c)| cell_entry(app, &g, r, c)).collect();
|
||||
if !colors.is_empty() {
|
||||
app.run("swatch.new", json!({ "colors": colors, "keepModel": true })).ok();
|
||||
}
|
||||
@@ -168,13 +279,13 @@ fn save_selected(app: &mut VectorcraftApp, ctx: &egui::Context) {
|
||||
/// Save Color Group to Swatches: the selected cells as one swatch group, in grid order (row by
|
||||
/// row, left to right), each cell once; with no cell of the shown guide selected, the harmony
|
||||
/// colors. The group is named after the harmony rule, saved in one undo step, and each color
|
||||
/// keeps its own model.
|
||||
/// keeps its own model; a tint of a spot color base becomes a tint swatch of it.
|
||||
fn save_group(app: &mut VectorcraftApp, ctx: &egui::Context) {
|
||||
let g = guide(app, ctx);
|
||||
let mut cells = live_selection(app, ctx, &g);
|
||||
cells.sort_unstable();
|
||||
cells.dedup();
|
||||
let mut colors: Vec<Value> = cells.into_iter().filter_map(|(r, c)| g.grid.get(r)?.get(c)).map(color_json).collect();
|
||||
let mut colors: Vec<Value> = cells.into_iter().filter_map(|(r, c)| cell_entry(app, &g, r, c)).collect();
|
||||
if colors.is_empty() {
|
||||
colors = g.colors.iter().map(color_json).collect();
|
||||
}
|
||||
@@ -186,27 +297,30 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
let ctx = ui.ctx().clone();
|
||||
// The current color becomes the base when the panel first shows; selecting artwork later
|
||||
// leaves it as it is.
|
||||
let first = base_color(app);
|
||||
let set = *app.ui.color_guide_base.get_or_insert(first);
|
||||
if app.ui.color_guide_base.is_none() {
|
||||
let current = active_paint(app);
|
||||
choose_linked_base(app, current.color().unwrap_or(DEFAULT_BASE), paint_link(¤t));
|
||||
}
|
||||
let h = rule(&ctx);
|
||||
let g = guide(app, &ctx);
|
||||
// Selected cells belong to the guide they were picked from: a new base, new options, another
|
||||
// harmony rule, another library limit or new grid colors clear them.
|
||||
let key = SelKey { base: set, ..sel_key(app, &ctx, &g) };
|
||||
let key = sel_key(app, &ctx, &g);
|
||||
if pstate::<Option<SelKey>>(&ctx, "cg-sel-key").as_ref() != Some(&key) {
|
||||
set_pstate(&ctx, "cg-sel-key", Some(key));
|
||||
clear_selection(&ctx);
|
||||
}
|
||||
let base = g.colors[0];
|
||||
let mut chosen: Option<Color> = None;
|
||||
let mut chosen: Option<Paint> = None;
|
||||
ui.horizontal(|ui| {
|
||||
let (r, resp) = ui.allocate_exact_size(vec2(26.0, 26.0), Sense::click());
|
||||
widgets::swatch_tile(ui, r, &Paint::solid(base), false, resp.hovered());
|
||||
if resp.on_hover_text(tl!("Set base color to the current color")).clicked()
|
||||
&& let Some(c) = active_paint(app).color()
|
||||
{
|
||||
app.ui.color_guide_base = Some(c);
|
||||
clear_selection(&ctx);
|
||||
if resp.on_hover_text(tl!("Set base color to the current color")).clicked() {
|
||||
let current = active_paint(app);
|
||||
if let Some(c) = current.color() {
|
||||
choose_linked_base(app, c, paint_link(¤t));
|
||||
clear_selection(&ctx);
|
||||
}
|
||||
}
|
||||
let labels: Vec<&str> = Harmony::ALL.iter().map(|h| h.label()).collect();
|
||||
if let Some(i) = widgets::dropdown(ui, "cg-rule", h.label(), &labels, ui.available_width() - 4.0) {
|
||||
@@ -223,7 +337,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
widgets::drag_source(ui, &resp, || PanelDrag::paint(Paint::solid(*c)));
|
||||
ui.painter().rect_filled(r, 0.0, c32(c));
|
||||
if resp.on_hover_text(c.to_hex()).clicked() {
|
||||
chosen = Some(*c);
|
||||
chosen = Some(Paint::solid(*c));
|
||||
}
|
||||
}
|
||||
ui.add_space(6.0);
|
||||
@@ -241,7 +355,8 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
for (ci, v) in row.iter().enumerate() {
|
||||
let r = Rect::from_min_size(rr.min + vec2(x(ci), 0.0), vec2(x(ci + 1) - x(ci) - gap, 17.0));
|
||||
let resp = ui.interact(r, ui.scope_id().with(("cg-v", ri, ci)), Sense::click_and_drag());
|
||||
widgets::drag_source(ui, &resp, || PanelDrag::paint(Paint::solid(*v)));
|
||||
let paint = cell_paint(app, &g, ri, ci).unwrap_or_else(|| Paint::solid(*v));
|
||||
widgets::drag_source(ui, &resp, || PanelDrag::paint(paint.clone()));
|
||||
ui.painter().rect_filled(r, 0.0, c32(v));
|
||||
if sel.contains(&(ri, ci)) {
|
||||
ui.painter().rect_stroke(r.shrink(1.0), 0.0, egui::Stroke::new(1.0, egui::Color32::WHITE), egui::StrokeKind::Inside);
|
||||
@@ -252,7 +367,7 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
if resp.on_hover_text(v.to_hex()).clicked() {
|
||||
if !multi {
|
||||
sel.clear();
|
||||
chosen = Some(*v);
|
||||
chosen = Some(paint);
|
||||
}
|
||||
match sel.iter().position(|s| *s == (ri, ci)) {
|
||||
Some(i) => {
|
||||
@@ -299,8 +414,8 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
save_group(app, &ctx);
|
||||
}
|
||||
});
|
||||
if let Some(c) = chosen {
|
||||
apply_click(app, ui, json!({"color": color_json(&c)}));
|
||||
if let Some(p) = chosen {
|
||||
apply_click(app, ui, paint_params(&p));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -703,6 +818,184 @@ mod tests {
|
||||
assert!(selected(&ctx).is_empty(), "the panel clears the selection");
|
||||
}
|
||||
|
||||
/// A document with a selected rectangle and the spot color swatch "Ink", made the guide's base
|
||||
/// as clicking it in the Swatches panel makes it, at `tint` (0..1) of the spot color.
|
||||
fn spot_app(tint: f32) -> VectorcraftApp {
|
||||
let mut app = app();
|
||||
app.run("swatch.new", json!({"name": "Ink", "color": "#0066cc", "spot": true})).unwrap();
|
||||
app.run("shape.rectangle", json!({"x": 0, "y": 0, "width": 10, "height": 10})).unwrap();
|
||||
app.run("paint.setFill", json!({"color": "#808080"})).unwrap();
|
||||
let ink = app.session.active().unwrap().doc.global_color("Ink").unwrap();
|
||||
choose_linked_base(&mut app, ink.tinted(tint), Some(("Ink".to_string(), tint)));
|
||||
app
|
||||
}
|
||||
|
||||
/// The selected art's fill: (the swatch it links to, its tint 0..1, its color).
|
||||
fn fill_link(app: &VectorcraftApp) -> (Option<String>, f32, String) {
|
||||
match crate::panels::current_paints(app).0 {
|
||||
Paint::Solid { color, swatch, tint } => (swatch, tint, color.to_hex()),
|
||||
other => panic!("a solid fill: {other:?}"),
|
||||
}
|
||||
}
|
||||
|
||||
/// The tint the cell `steps` right of the centre has with a base at `base` tint.
|
||||
fn expected_tint(app: &VectorcraftApp, base: f32, steps: i32) -> f32 {
|
||||
base * (1.0 - harmony::step_fraction(&app.ui.color_guide.clamped(), steps))
|
||||
}
|
||||
|
||||
/// With a spot color base, a cell right of the centre in the base row of Tints/Shades paints the
|
||||
/// art with a tint of the spot color, which follows an edit of the spot color; the shades, the
|
||||
/// other rows, the other variation modes and a library limit give process colors.
|
||||
#[test]
|
||||
fn a_spot_color_base_gives_tints_of_that_spot_color() {
|
||||
let mut app = spot_app(1.0);
|
||||
let ctx = egui::Context::default();
|
||||
frame(&mut app, &ctx);
|
||||
let g = guide(&app, &ctx);
|
||||
let c = g.centre();
|
||||
let ink = app.session.active().unwrap().doc.global_color("Ink").unwrap();
|
||||
assert_eq!(g.grid[0][c].to_hex(), ink.to_hex(), "the spot color in the centre");
|
||||
let at = rect_of(&mut app, &ctx, ("cg-v", 0usize, c + 2)).center();
|
||||
click(&mut app, &ctx, at);
|
||||
let (swatch, tint, hex) = fill_link(&app);
|
||||
assert_eq!(swatch.as_deref(), Some("Ink"), "a tint of the spot color");
|
||||
let want = expected_tint(&app, 1.0, 2);
|
||||
assert!((tint - want).abs() < 1e-4, "{tint} vs {want}");
|
||||
assert_eq!(hex, g.grid[0][c + 2].to_hex(), "the color the cell shows");
|
||||
assert_eq!(hex, ink.tinted(tint).to_hex());
|
||||
// The painted tint follows an edit of the spot color, and so does the base.
|
||||
app.run("swatch.edit", json!({"name": "Ink", "color": "#cc0000"})).unwrap();
|
||||
let red = app.session.active().unwrap().doc.global_color("Ink").unwrap();
|
||||
assert_eq!(fill_link(&app).2, red.tinted(tint).to_hex(), "the art follows the spot color");
|
||||
assert_eq!(base_color(&app), red, "the base follows the spot color");
|
||||
frame(&mut app, &ctx);
|
||||
// Shades, another harmony row and the harmony strip are process colors.
|
||||
for id in [("cg-v", 0usize, c - 1), ("cg-v", 1, c + 1)] {
|
||||
let at = rect_of(&mut app, &ctx, id).center();
|
||||
click(&mut app, &ctx, at);
|
||||
assert_eq!(fill_link(&app).0, None, "{id:?}");
|
||||
}
|
||||
let at = rect_of(&mut app, &ctx, ("cg-h", 0usize)).center();
|
||||
click(&mut app, &ctx, at);
|
||||
assert_eq!(fill_link(&app).0, None, "the harmony strip");
|
||||
// Warm/Cool and a library limit: process colors.
|
||||
app.ui.color_guide.variation = Variation::WarmCool;
|
||||
frame(&mut app, &ctx);
|
||||
let at = rect_of(&mut app, &ctx, ("cg-v", 0usize, c + 1)).center();
|
||||
click(&mut app, &ctx, at);
|
||||
assert_eq!(fill_link(&app).0, None, "Warm/Cool");
|
||||
app.ui.color_guide.variation = Variation::TintsShades;
|
||||
app.run("ui.colorGuideLimit", json!({"library": "web-safe-216"})).unwrap();
|
||||
frame(&mut app, &ctx);
|
||||
let at = rect_of(&mut app, &ctx, ("cg-v", 0usize, c + 1)).center();
|
||||
click(&mut app, &ctx, at);
|
||||
assert_eq!(fill_link(&app).0, None, "limited to a library");
|
||||
}
|
||||
|
||||
/// A base that is already a tint of the spot color gives lighter tints of it; a plain color with
|
||||
/// the spot color's values, a deleted swatch and a swatch that is no longer a spot color give
|
||||
/// process colors.
|
||||
#[test]
|
||||
fn a_tinted_spot_base_gives_lighter_tints_and_a_lost_link_gives_process_colors() {
|
||||
let mut app = spot_app(0.5);
|
||||
let ctx = egui::Context::default();
|
||||
frame(&mut app, &ctx);
|
||||
let c = guide(&app, &ctx).centre();
|
||||
let cell = |app: &VectorcraftApp, ctx: &egui::Context, col| cell_paint(app, &guide(app, ctx), 0, col).unwrap();
|
||||
let Paint::Solid { swatch, tint, .. } = cell(&app, &ctx, c + 1) else { panic!("a solid") };
|
||||
assert_eq!(swatch.as_deref(), Some("Ink"));
|
||||
let want = expected_tint(&app, 0.5, 1);
|
||||
assert!((tint - want).abs() < 1e-4 && tint < 0.5, "{tint} vs {want}");
|
||||
// The same values without the link.
|
||||
choose_base(&mut app, Color::from_hex("#0066cc").unwrap());
|
||||
assert_eq!(cell(&app, &ctx, c + 1), Paint::solid(guide(&app, &ctx).grid[0][c + 1]));
|
||||
// The spot color made a process color, then deleted.
|
||||
let link = Some(("Ink".to_string(), 1.0));
|
||||
let ink = app.session.active().unwrap().doc.global_color("Ink").unwrap();
|
||||
choose_linked_base(&mut app, ink, link.clone());
|
||||
assert!(matches!(cell(&app, &ctx, c + 1), Paint::Solid { swatch: Some(_), .. }));
|
||||
app.run("swatch.edit", json!({"name": "Ink", "spot": false, "global": false})).unwrap();
|
||||
assert!(matches!(cell(&app, &ctx, c + 1), Paint::Solid { swatch: None, .. }), "no longer a spot color");
|
||||
choose_linked_base(&mut app, ink, link.clone());
|
||||
assert!(app.ui.color_guide_spot.is_none(), "a process swatch gives no spot base");
|
||||
app.run("swatch.edit", json!({"name": "Ink", "spot": true})).unwrap();
|
||||
choose_linked_base(&mut app, ink, link);
|
||||
app.run("swatch.delete", json!({"name": "Ink"})).unwrap();
|
||||
assert!(matches!(cell(&app, &ctx, c + 1), Paint::Solid { swatch: None, .. }), "a deleted swatch");
|
||||
}
|
||||
|
||||
/// A spot color base stays linked to its swatch when Swatch Options renames it: the tints link to
|
||||
/// the new name and follow an edit of it.
|
||||
#[test]
|
||||
fn a_renamed_spot_color_stays_the_base() {
|
||||
let mut app = spot_app(1.0);
|
||||
let ctx = egui::Context::default();
|
||||
frame(&mut app, &ctx);
|
||||
let c = guide(&app, &ctx).centre();
|
||||
app.run("swatch.edit", json!({"name": "Ink", "newName": "Deep Ink"})).unwrap();
|
||||
let Paint::Solid { swatch, .. } = cell_paint(&app, &guide(&app, &ctx), 0, c + 1).unwrap() else { panic!("a solid") };
|
||||
assert_eq!(swatch.as_deref(), Some("Deep Ink"));
|
||||
app.run("swatch.edit", json!({"name": "Deep Ink", "color": "#cc0000"})).unwrap();
|
||||
let red = app.session.active().unwrap().doc.global_color("Deep Ink").unwrap();
|
||||
assert_eq!(base_color(&app), red, "the base follows the renamed spot color");
|
||||
}
|
||||
|
||||
/// Save Colors as Swatches and Save Color Group save a spot color base's tints as tint swatches
|
||||
/// linked to it, beside process colors for the other cells, each in one undo step.
|
||||
#[test]
|
||||
fn saved_spot_tints_are_tint_swatches_of_the_spot_color() {
|
||||
let mut app = spot_app(1.0);
|
||||
let ctx = egui::Context::default();
|
||||
frame(&mut app, &ctx);
|
||||
let g = guide(&app, &ctx);
|
||||
let c = g.centre();
|
||||
let undo = app.session.doc().unwrap().history.undo.len();
|
||||
set_pstate(&ctx, "cg-sel", vec![(0usize, c + 1), (0, c - 1), (0, c + 3)]);
|
||||
save_selected(&mut app, &ctx);
|
||||
let st = app.session.doc().unwrap();
|
||||
assert_eq!(st.history.undo.len(), undo + 1, "one undo step");
|
||||
let made: Vec<_> = st.doc.swatches[st.doc.swatches.len() - 3..].to_vec();
|
||||
let tint = |w: &vectorcraft_color::Swatch| w.tint_of().map(|(b, t)| (b.to_string(), t));
|
||||
assert_eq!(tint(&made[0]).map(|(b, _)| b).as_deref(), Some("Ink"));
|
||||
assert!((tint(&made[0]).unwrap().1 - expected_tint(&app, 1.0, 1)).abs() < 1e-4);
|
||||
assert_eq!(made[1].paint, Paint::solid(g.grid[0][c - 1]), "a shade is a process color");
|
||||
assert_eq!(tint(&made[2]).map(|(b, _)| b).as_deref(), Some("Ink"));
|
||||
assert!(made[0].name.starts_with("Ink ") && made[0].name.ends_with('%'), "{}", made[0].name);
|
||||
// A group of the selected cells, in grid order.
|
||||
set_pstate(&ctx, "cg-sel", vec![(1usize, c + 1), (0, c + 2)]);
|
||||
save_group(&mut app, &ctx);
|
||||
let group = app.session.doc().unwrap().doc.swatch_groups.last().cloned().unwrap();
|
||||
assert_eq!(group.swatches.len(), 2);
|
||||
assert_eq!(tint(&group.swatches[0]).map(|(b, _)| b).as_deref(), Some("Ink"), "the base row's tint");
|
||||
assert_eq!(group.swatches[1].paint, Paint::solid(g.grid[1][c + 1]), "another row is a process color");
|
||||
// The saved tints follow an edit of the spot color.
|
||||
app.run("swatch.edit", json!({"name": "Ink", "color": "#cc0000"})).unwrap();
|
||||
let d = &app.session.active().unwrap().doc;
|
||||
let red = d.global_color("Ink").unwrap();
|
||||
let first = d.swatch(&made[0].name).unwrap();
|
||||
assert_eq!(first.paint.color(), Some(red.tinted(first.tint_of().unwrap().1)));
|
||||
}
|
||||
|
||||
/// A spot color base's tint dragged from the guide carries the tint, and the Swatches panel makes
|
||||
/// a tint swatch of it.
|
||||
#[test]
|
||||
fn a_dragged_spot_tint_becomes_a_tint_swatch() {
|
||||
let mut app = spot_app(1.0);
|
||||
let ctx = egui::Context::default();
|
||||
crate::theme::install_fonts(&ctx);
|
||||
guide_frame(&mut app, &ctx, vec![], 0.0, true, ("cg-h", 0usize));
|
||||
let g = guide(&app, &ctx);
|
||||
let c = g.centre();
|
||||
let tile = |ctx: &egui::Context| ctx.read_response(egui::Id::unique(("swatch-tile", "Red"))).expect("the Red swatch is drawn").rect.center();
|
||||
let held = drag_from(&mut app, &ctx, ("cg-v", 0, c + 1), Some(tile(&ctx)), 1.0, true);
|
||||
let Some(PanelDrag::Paint { paint: Paint::Solid { swatch, tint, .. }, .. }) = held else { panic!("a solid paint: {held:?}") };
|
||||
assert_eq!(swatch.as_deref(), Some("Ink"));
|
||||
let newest = app.session.doc().unwrap().doc.swatches.last().cloned().expect("a swatch");
|
||||
let (base, made) = newest.tint_of().unwrap_or_else(|| panic!("a tint swatch: {newest:?} {}", app.ui.status));
|
||||
assert_eq!(base, "Ink");
|
||||
assert!((made - tint).abs() < 1e-4, "{made} vs {tint}");
|
||||
}
|
||||
|
||||
/// Every colour of the panel's guide.
|
||||
fn shown(app: &VectorcraftApp, ctx: &egui::Context) -> Vec<String> {
|
||||
let g = guide(app, ctx);
|
||||
|
||||
@@ -815,7 +815,7 @@ fn ramp(app: &mut VectorcraftApp, ui: &mut Ui, g: &Gradient, is_grad: bool, w: f
|
||||
let add_resp = ui.interact(below, ui.scope_id().with("grad-add"), Sense::click());
|
||||
let bar_resp = ui.interact(bar, ui.scope_id().with("grad-bar"), Sense::click());
|
||||
if add_resp.hovered() && is_grad {
|
||||
ui.ctx().set_cursor_icon(egui::CursorIcon::Copy);
|
||||
crate::cursors::set_add_cursor(app, ui.ctx());
|
||||
}
|
||||
if !is_grad && (bar_resp.clicked() || add_resp.clicked()) {
|
||||
edit(app, json!({}), Live::Released);
|
||||
|
||||
@@ -915,3 +915,43 @@ fn a_stop_dragged_off_the_ramp_or_deleted_with_the_button_beside_it_goes() {
|
||||
p.click(&mut app, del.center());
|
||||
assert_eq!(hexes(&app), ["#ffffff", "#000000"]);
|
||||
}
|
||||
|
||||
/// #8241: over the strip under the ramp, where a click adds a stop, the panel shows the white arrow
|
||||
/// with a plus. Where the window shows glyphs as OS cursors (Windows, X11), it hands the glyph to
|
||||
/// the OS, since winit shows the plain arrow for the system copy cursor there; elsewhere the
|
||||
/// system copy cursor. Over the ramp itself, which adds nothing, neither.
|
||||
#[test]
|
||||
fn the_strip_under_the_ramp_shows_the_add_cursor() {
|
||||
let stops = json!([{"offset": 0, "color": "#ffffff"}, {"offset": 1, "color": "#000000"}]);
|
||||
let mut app = app(json!({"gradient": {"stops": stops}}));
|
||||
let mut p = Panel::new();
|
||||
p.frame(&mut app, vec![], Modifiers::NONE);
|
||||
let bar = p.widget("grad-bar");
|
||||
let output = |p: &mut Panel, app: &mut VectorcraftApp, at: Pos2| {
|
||||
p.time += 0.1;
|
||||
let events = vec![Event::PointerMoved(at)];
|
||||
let input = egui::RawInput {
|
||||
time: Some(p.time),
|
||||
events,
|
||||
screen_rect: Some(Rect::from_min_size(Pos2::ZERO, vec2(260.0, 600.0))),
|
||||
..Default::default()
|
||||
};
|
||||
let mut out = p.ctx.run_ui(input, |ui| show(app, ui));
|
||||
out.textures_delta.clear();
|
||||
out.platform_output
|
||||
};
|
||||
// Between the two stops, just under the ramp.
|
||||
let under = output(&mut p, &mut app, pos2(bar.center().x, bar.bottom() + 10.0));
|
||||
assert_eq!(under.cursor_icon, egui::CursorIcon::Copy);
|
||||
// The same condition the panel uses (the build, Wayland, VECTORCRAFT_SYSTEM_CURSORS).
|
||||
if crate::cursors::add_cursor_is_a_glyph(&app) {
|
||||
let glyph = app.canvas.cursors.get(vectorcraft_tools::Cursor::GroupSelection, 1.0);
|
||||
assert!(glyph.is_some());
|
||||
assert_eq!(under.cursor_image, glyph, "the white arrow with a plus, as an OS cursor");
|
||||
} else {
|
||||
assert!(under.cursor_image.is_none(), "the system copy cursor alone");
|
||||
}
|
||||
let over = output(&mut p, &mut app, bar.center());
|
||||
assert_ne!(over.cursor_icon, egui::CursorIcon::Copy);
|
||||
assert!(over.cursor_image.is_none(), "over the ramp, no add cursor");
|
||||
}
|
||||
@@ -378,6 +378,19 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
{
|
||||
drag_ghost(ui, &view, widgets::ghost_row(ids, grabbed), pos);
|
||||
}
|
||||
let alt = ui.input(|i| i.modifiers.alt);
|
||||
let over_list = ui.input(|i| i.pointer.hover_pos()).is_some_and(|p| list_rect.contains(p));
|
||||
if !released
|
||||
&& let Some(drag) = egui::DragAndDrop::payload::<LayersDrag>(ui.ctx())
|
||||
&& let Some(cursor) = drag_cursor(&drag, alt, over_list)
|
||||
{
|
||||
// The copy cursor is the panels' add cursor, which Windows can show (#8217, #8241).
|
||||
if cursor == egui::CursorIcon::Copy {
|
||||
crate::cursors::set_add_cursor(app, ui.ctx());
|
||||
} else {
|
||||
ui.ctx().set_cursor_icon(cursor);
|
||||
}
|
||||
}
|
||||
// Keyboard: Delete removes the highlighted rows while the panel has the keyboard (a row was
|
||||
// clicked last, not the canvas).
|
||||
// The panel keeps it while it is drawn ([`super::has_row_keys`]); the app's shortcuts leave
|
||||
@@ -409,6 +422,19 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) {
|
||||
see_selection(app, ui, selected);
|
||||
}
|
||||
|
||||
/// The cursor while `drag` is held (`alt` down, `over_list`: the pointer is over the rows): the
|
||||
/// copy cursor where a drop copies, as a drop in the list with Alt does, else the grabbing hand.
|
||||
/// The trash and New Layer ignore Alt, so outside the list the hand stays. Read every frame, as
|
||||
/// the drop reads Alt when it lands (#8217). None for guide rows, which never copy and set their
|
||||
/// own cursor.
|
||||
fn drag_cursor(drag: &LayersDrag, alt: bool, over_list: bool) -> Option<egui::CursorIcon> {
|
||||
match drag {
|
||||
LayersDrag::Rows(_) | LayersDrag::Art if alt && over_list => Some(egui::CursorIcon::Copy),
|
||||
LayersDrag::Rows(_) | LayersDrag::Art => Some(egui::CursorIcon::Grabbing),
|
||||
LayersDrag::Guides(_) => None,
|
||||
}
|
||||
}
|
||||
|
||||
/// The search typed into the Layers panel's Search All field, as the panel matches it.
|
||||
fn search_query(ctx: &egui::Context) -> String {
|
||||
ctx.data(|d| d.get_temp::<String>(egui::Id::unique("layers-search"))).unwrap_or_default().trim().to_lowercase()
|
||||
|
||||
@@ -446,9 +446,7 @@ pub(super) fn row(ui: &mut Ui, view: &View, item: &Row, out: &mut Out) {
|
||||
d.insert_temp(key("grabbed"), n.id);
|
||||
});
|
||||
}
|
||||
if resp.dragged_by(egui::PointerButton::Primary) {
|
||||
ui.ctx().set_cursor_icon(egui::CursorIcon::Grabbing);
|
||||
}
|
||||
// The cursor of a row drag is the panel's ([`super::drag_cursor`]): Alt can change it on any frame.
|
||||
drop_target(ui, view, n, r, x - 16.0, open, &resp, out);
|
||||
}
|
||||
|
||||
|
||||
@@ -1493,6 +1493,57 @@ fn dragging_rows_moves_them_into_other_layers_and_alt_copies() {
|
||||
let _ = (layer, c);
|
||||
}
|
||||
|
||||
/// One headless frame of the panel with `events` (Alt held when `alt`) → the cursor it asks for,
|
||||
/// and the cursor bitmap it hands the OS, if any.
|
||||
fn cursor_frame(
|
||||
app: &mut VectorcraftApp,
|
||||
ctx: &egui::Context,
|
||||
events: Vec<egui::Event>,
|
||||
alt: bool,
|
||||
) -> (egui::CursorIcon, Option<egui::CustomCursorImage>) {
|
||||
let mut events = events;
|
||||
events.insert(0, egui::Event::ModifiersChanged(egui::Modifiers { alt, ..Default::default() }));
|
||||
let mut out = ctx.run_ui(egui::RawInput { events, ..Default::default() }, |ui| show(app, ui));
|
||||
out.textures_delta.clear();
|
||||
(out.platform_output.cursor_icon, out.platform_output.cursor_image)
|
||||
}
|
||||
|
||||
/// #8217: a row dragged over the list shows the copy cursor while Alt is held, as the drop then
|
||||
/// copies, and the grabbing hand otherwise, following Alt as it goes down and up mid-drag. The copy
|
||||
/// cursor is the panels' add cursor (#8241): where the window shows glyphs as OS cursors (Windows,
|
||||
/// X11, which have no system copy cursor winit can show), the white arrow with a plus.
|
||||
#[test]
|
||||
fn alt_shows_the_copy_cursor_while_rows_are_dragged() {
|
||||
let (mut app, _) = nested();
|
||||
let ctx = egui::Context::default();
|
||||
// Rows: Layer 1, Sub, g, b, a, c.
|
||||
let (circles, _) = frame(&mut app, &ctx, vec![], false);
|
||||
assert_eq!(circles.len(), 6);
|
||||
let (from, to) = (egui::pos2(150.0, circles[2].y), egui::pos2(150.0, circles[5].y));
|
||||
frame(&mut app, &ctx, vec![egui::Event::PointerMoved(from)], false);
|
||||
frame(&mut app, &ctx, vec![button(from, true)], false);
|
||||
frame(&mut app, &ctx, vec![egui::Event::PointerMoved(from + vec2(0.0, 6.0))], false);
|
||||
let glyph = crate::cursors::add_cursor_is_a_glyph(&app).then(|| app.canvas.cursors.get(vectorcraft_tools::Cursor::GroupSelection, 1.0)).flatten();
|
||||
assert_eq!(cursor_frame(&mut app, &ctx, vec![egui::Event::PointerMoved(to)], false), (egui::CursorIcon::Grabbing, None), "a move");
|
||||
assert_eq!(cursor_frame(&mut app, &ctx, vec![], true), (egui::CursorIcon::Copy, glyph), "Alt held: the drop copies");
|
||||
assert_eq!(cursor_frame(&mut app, &ctx, vec![], false), (egui::CursorIcon::Grabbing, None), "Alt let go: a move again");
|
||||
cursor_frame(&mut app, &ctx, vec![button(to, false)], false);
|
||||
assert_ne!(cursor_frame(&mut app, &ctx, vec![], true).0, egui::CursorIcon::Copy, "no drag, no copy cursor");
|
||||
}
|
||||
|
||||
/// The selected-art square copies with Alt as rows do; off the list (the trash, New Layer) Alt
|
||||
/// copies nothing, and guide rows keep their own cursor.
|
||||
#[test]
|
||||
fn drag_cursor_shows_a_copy_only_where_the_drop_copies() {
|
||||
let (copy, grabbing) = (Some(egui::CursorIcon::Copy), Some(egui::CursorIcon::Grabbing));
|
||||
for drag in [LayersDrag::Rows(vec![NodeId(1)]), LayersDrag::Art] {
|
||||
assert_eq!(super::drag_cursor(&drag, true, true), copy);
|
||||
assert_eq!(super::drag_cursor(&drag, false, true), grabbing);
|
||||
assert_eq!(super::drag_cursor(&drag, true, false), grabbing, "off the list");
|
||||
}
|
||||
assert_eq!(super::drag_cursor(&LayersDrag::Guides(vec![0]), true, true), None);
|
||||
}
|
||||
|
||||
/// An Intertwine group's row takes a dragged row inside it, as a group's does, and the object
|
||||
/// becomes a member; a row that can't be intertwined gets no inside box and goes beside it.
|
||||
#[test]
|
||||
|
||||
@@ -104,10 +104,10 @@ fn explore_tutorials_on_the_app_bar_shows_and_hides_the_learn_panel() {
|
||||
let ctx = context();
|
||||
assert!(!shown(&app));
|
||||
let nodes = frame(&mut app, &ctx, vec![], app_bar);
|
||||
let search = center_where(&nodes, |label| label.starts_with("Search commands, tools, panels and effects"));
|
||||
let search = center_where(&nodes, |label| label.starts_with("Search commands"));
|
||||
let learn = center(&nodes, "Explore tutorials");
|
||||
let (search, learn) = (search.expect("the search icon shows"), learn.expect("the app bar has Explore tutorials"));
|
||||
assert!(learn.x < search.x && (learn.y - search.y).abs() < 1.0, "beside the search icon: {learn:?}, {search:?}");
|
||||
let (search, learn) = (search.expect("the search field shows"), learn.expect("the app bar has Explore tutorials"));
|
||||
assert!(learn.x < search.x && (learn.y - search.y).abs() < 1.0, "beside the search field: {learn:?}, {search:?}");
|
||||
click(&mut app, &ctx, "Explore tutorials", app_bar);
|
||||
assert!(shown(&app), "{}", app.ui.status);
|
||||
click(&mut app, &ctx, "Explore tutorials", app_bar);
|
||||
|
||||
@@ -190,13 +190,14 @@ fn swatch_params(e: &Entry) -> Option<Value> {
|
||||
/// Apply a clicked swatch to the active proxy (Alt: the inactive one). An Alt-click on a color
|
||||
/// swatch with a gradient stop selected recolors the stop as dropping the swatch on it does,
|
||||
/// and with a freeform gradient point selected it recolors the point. A color swatch also becomes
|
||||
/// the Color Guide's base color.
|
||||
/// the Color Guide's base color, linked to the spot color it is or is a tint of.
|
||||
fn apply(app: &mut VectorcraftApp, ui: &Ui, e: &Entry) {
|
||||
let Some(params) = swatch_params(e) else { return };
|
||||
if let Entry::Swatch { paint, .. } = e
|
||||
if let Entry::Swatch { name, paint, .. } = e
|
||||
&& let Some(c) = paint.color()
|
||||
{
|
||||
super::color_guide::choose_base(app, c);
|
||||
let link = app.session.active().and_then(|st| st.doc.swatch_link(name));
|
||||
super::color_guide::choose_linked_base(app, c, link);
|
||||
}
|
||||
if super::alt_held(ui)
|
||||
&& let Some(c) = drag_of(e, vec![]).color()
|
||||
|
||||
Loaded 100 of 115 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user