Skip to content

VectorCraft: An open-source, vector art tool written by scratch in pure Rust

CI: simplify boolean guards and translate EPS mask errors

Roman Vasilyev8b8c164e3fbe
diff --git a/crates/engine/src/cmd/object.rs b/crates/engine/src/cmd/object.rs
index bbd159151..bd71c073e 100644
--- a/crates/engine/src/cmd/object.rs
+++ b/crates/engine/src/cmd/object.rs
@@ -459,7 +459,7 @@ pub(crate) fn preview_copies(s: &mut Session, roots: &[NodeId], with_guides: boo
if let Some(k) = &it.copies
&& Arc::ptr_eq(&k.from, &it.doc)
&& k.roots == roots
- && (!k.selection.guides.is_empty() == has_guide_copies)
+ && (k.selection.guides.is_empty() != has_guide_copies)
{
return Ok(Some(k.clone()));
}
diff --git a/crates/render/src/fx.rs b/crates/render/src/fx.rs
index f5281fb47..3082d49aa 100644
--- a/crates/render/src/fx.rs
+++ b/crates/render/src/fx.rs
@@ -879,7 +879,7 @@ impl Renderer {
off.flush();
let mut pm = vello_cpu::Pixmap::new(w, h);
off.render(&mut pm, &mut self.resources);
- if !self.shadows.get(&old).is_some_and(|e| silhouette(&pm, colored) == e.made.pixels) {
+ if self.shadows.get(&old).is_none_or(|e| silhouette(&pm, colored) != e.made.pixels) {
return;
}
if let Some(mut e) = self.shadows.remove(&old) {
diff --git a/crates/trace/tests/shared_boundaries.rs b/crates/trace/tests/shared_boundaries.rs
index 926ecd067..9210c5a80 100644
--- a/crates/trace/tests/shared_boundaries.rs
+++ b/crates/trace/tests/shared_boundaries.rs
@@ -270,7 +270,7 @@ fn variants(art: &Art, n: usize, soft: bool, settings: &[Setting]) -> Vec<String
for &(name, set) in settings {
let mut params = params.clone();
set(&mut params);
- let expect = (!soft && !(tiny && name == LOOSEST.0)).then_some(counts.as_slice());
+ let expect = (!(soft || tiny && name == LOOSEST.0)).then_some(counts.as_slice());
let (line, w) = run(art, soft, bw, &params, name, expect);
println!("{line}");
wrong.extend(w);
diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv
index b289026ba..c82dac4bd 100644
--- a/crates/ui-egui/src/i18n/cs.tsv
+++ b/crates/ui-egui/src/i18n/cs.tsv
@@ -4999,3 +4999,5 @@ mark-style Japanese Japonské
Movie Clip Filmový klip
@msg name is empty název je prázdný
@msg no symbol named `{n}` žádný symbol s názvem `{n}`
+@msg a mask has more than one art block maska má více než jeden blok kresby
+@msg mask art ends outside a mask dictionary kresba masky končí mimo slovník masky
diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv
index 0dd943820..4dab81245 100644
--- a/crates/ui-egui/src/i18n/de.tsv
+++ b/crates/ui-egui/src/i18n/de.tsv
@@ -4536,3 +4536,5 @@ theme Appearance Erscheinungsbild
Movie Clip Movieclip
@msg name is empty Name ist leer
@msg no symbol named `{n}` kein Symbol namens `{n}`
+@msg a mask has more than one art block eine Maske enthält mehr als einen Grafikblock
+@msg mask art ends outside a mask dictionary die Maskengrafik endet außerhalb eines Maskenwörterbuchs
diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv
index 56703aea0..7a7faf3ef 100644
--- a/crates/ui-egui/src/i18n/el.tsv
+++ b/crates/ui-egui/src/i18n/el.tsv
@@ -4951,3 +4951,5 @@ effect Points Σημεία
Movie Clip Κλιπ ταινίας
@msg name is empty το όνομα είναι κενό
@msg no symbol named `{n}` κανένα σύμβολο με όνομα `{n}`
+@msg a mask has more than one art block η μάσκα έχει περισσότερα από ένα μπλοκ γραφικών
+@msg mask art ends outside a mask dictionary τα γραφικά της μάσκας τελειώνουν έξω από το λεξικό της μάσκας
diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv
index 4c6b07cb3..5b9a77e07 100644
--- a/crates/ui-egui/src/i18n/es.tsv
+++ b/crates/ui-egui/src/i18n/es.tsv
@@ -4941,3 +4941,5 @@ mark-style Japanese Japonesas
Movie Clip Clip de película
@msg name is empty el nombre está vacío
@msg no symbol named `{n}` no hay ningún símbolo llamado `{n}`
+@msg a mask has more than one art block una máscara tiene más de un bloque de ilustración
+@msg mask art ends outside a mask dictionary la ilustración de la máscara termina fuera de un diccionario de máscara
diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv
index f2750d8a0..c56c95af8 100644
--- a/crates/ui-egui/src/i18n/fi.tsv
+++ b/crates/ui-egui/src/i18n/fi.tsv
@@ -4963,3 +4963,5 @@ mark-style Japanese Japanilainen
Movie Clip Elokuvaleike
@msg name is empty nimi on tyhjä
@msg no symbol named `{n}` symbolia nimeltä `{n}` ei ole
+@msg a mask has more than one art block maskissa on useampi kuin yksi grafiikkalohko
+@msg mask art ends outside a mask dictionary maskin grafiikka päättyy maskin sanakirjan ulkopuolelle
diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv
index 03146f17a..747fdce72 100644
--- a/crates/ui-egui/src/i18n/fr.tsv
+++ b/crates/ui-egui/src/i18n/fr.tsv
@@ -4998,3 +4998,5 @@ theme Appearance Apparence
Movie Clip Clip
@msg name is empty le nom est vide
@msg no symbol named `{n}` aucun symbole nommé `{n}`
+@msg a mask has more than one art block un masque contient plusieurs blocs graphiques
+@msg mask art ends outside a mask dictionary les éléments graphiques du masque se terminent en dehors d’un dictionnaire de masque
diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv
index 461070dcf..d3de3b4f7 100644
--- a/crates/ui-egui/src/i18n/hu.tsv
+++ b/crates/ui-egui/src/i18n/hu.tsv
@@ -4966,3 +4966,5 @@ imageTrace Outline Körvonal
Movie Clip Mozgóklip
@msg name is empty a név üres
@msg no symbol named `{n}` nincs `{n}` nevű szimbólum
+@msg a mask has more than one art block egy maszk egynél több grafikai blokkot tartalmaz
+@msg mask art ends outside a mask dictionary a maszk grafikája a maszk szótárán kívül ér véget
diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv
index 21cfcf18a..cf158f674 100644
--- a/crates/ui-egui/src/i18n/it.tsv
+++ b/crates/ui-egui/src/i18n/it.tsv
@@ -4576,3 +4576,5 @@ lighting Light Luce
Movie Clip Clip filmato
@msg name is empty il nome è vuoto
@msg no symbol named `{n}` nessun simbolo denominato `{n}`
+@msg a mask has more than one art block una maschera contiene più di un blocco grafico
+@msg mask art ends outside a mask dictionary la grafica della maschera termina fuori da un dizionario di maschera
diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv
index 525c112f4..1e7363b0d 100644
--- a/crates/ui-egui/src/i18n/ja.tsv
+++ b/crates/ui-egui/src/i18n/ja.tsv
@@ -4617,3 +4617,5 @@ lighting Light ライト
Movie Clip ムービークリップ
@msg name is empty 名前が空です
@msg no symbol named `{n}` `{n}` という名前のシンボルはありません
+@msg a mask has more than one art block マスクに複数のアートブロックがあります
+@msg mask art ends outside a mask dictionary マスクのアートがマスク辞書の外で終わっています
diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv
index 6443cfcc4..f344bd74d 100644
--- a/crates/ui-egui/src/i18n/ko.tsv
+++ b/crates/ui-egui/src/i18n/ko.tsv
@@ -4540,3 +4540,5 @@ lighting Light 광원
Movie Clip 무비 클립
@msg name is empty 이름이 비어 있습니다
@msg no symbol named `{n}` 이름이 `{n}`인 심볼이 없습니다
+@msg a mask has more than one art block 마스크에 아트 블록이 두 개 이상 있습니다
+@msg mask art ends outside a mask dictionary 마스크 아트가 마스크 사전 밖에서 끝납니다
diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv
index ae9765d1d..f393772ab 100644
--- a/crates/ui-egui/src/i18n/pl.tsv
+++ b/crates/ui-egui/src/i18n/pl.tsv
@@ -4844,3 +4844,5 @@ mark-style Japanese Japońskie
Movie Clip Klip filmowy
@msg name is empty nazwa jest pusta
@msg no symbol named `{n}` brak symbolu o nazwie `{n}`
+@msg a mask has more than one art block maska ma więcej niż jeden blok grafiki
+@msg mask art ends outside a mask dictionary grafika maski kończy się poza słownikiem maski
diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv
index 63e725edf..52ddf636d 100644
--- a/crates/ui-egui/src/i18n/pt-br.tsv
+++ b/crates/ui-egui/src/i18n/pt-br.tsv
@@ -4916,3 +4916,5 @@ mark-style Japanese Japonesas
# Symbol Options › Export Type
@msg name is empty o nome está vazio
@msg no symbol named `{n}` nenhum símbolo chamado `{n}`
+@msg a mask has more than one art block uma máscara contém mais de um bloco de arte
+@msg mask art ends outside a mask dictionary a arte da máscara termina fora de um dicionário de máscara
diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv
index ee7c6e5cd..d7967aeba 100644
--- a/crates/ui-egui/src/i18n/ru.tsv
+++ b/crates/ui-egui/src/i18n/ru.tsv
@@ -4572,3 +4572,5 @@ lighting Light Свет
Movie Clip Видеоклип
@msg name is empty имя пустое
@msg no symbol named `{n}` нет символа с именем `{n}`
+@msg a mask has more than one art block маска содержит более одного блока графики
+@msg mask art ends outside a mask dictionary графика маски заканчивается за пределами словаря маски
diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv
index fb6ef9f23..1f623cfbc 100644
--- a/crates/ui-egui/src/i18n/sv.tsv
+++ b/crates/ui-egui/src/i18n/sv.tsv
@@ -4955,3 +4955,5 @@ theme Appearance Utseende
Movie Clip Filmklipp
@msg name is empty namnet är tomt
@msg no symbol named `{n}` ingen symbol med namnet `{n}`
+@msg a mask has more than one art block en mask innehåller mer än ett grafikblock
+@msg mask art ends outside a mask dictionary maskens grafik slutar utanför en maskordlista
diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv
index d80b7657e..509f2507f 100644
--- a/crates/ui-egui/src/i18n/uk.tsv
+++ b/crates/ui-egui/src/i18n/uk.tsv
@@ -4556,3 +4556,5 @@ lighting Light Світло
Movie Clip Кліп
@msg name is empty ім’я порожнє
@msg no symbol named `{n}` немає символу з назвою `{n}`
+@msg a mask has more than one art block маска містить більше одного блоку графіки
+@msg mask art ends outside a mask dictionary графіка маски закінчується за межами словника маски
diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv
index 68faa3b09..250c3e2bc 100644
--- a/crates/ui-egui/src/i18n/vi.tsv
+++ b/crates/ui-egui/src/i18n/vi.tsv
@@ -4556,3 +4556,5 @@ theme Appearance Giao diện
Movie Clip Clip phim
@msg name is empty tên trống
@msg no symbol named `{n}` không có biểu tượng nào tên `{n}`
+@msg a mask has more than one art block mặt nạ có nhiều hơn một khối đồ họa
+@msg mask art ends outside a mask dictionary đồ họa mặt nạ kết thúc bên ngoài từ điển mặt nạ