diff --git a/crates/engine/src/cmd/brushlib.rs b/crates/engine/src/cmd/brushlib.rs index fc5bbe120a..d777e31a45 100644 --- a/crates/engine/src/cmd/brushlib.rs +++ b/crates/engine/src/cmd/brushlib.rs @@ -178,6 +178,7 @@ pub const BUILTIN: &[BuiltinBrushLibrary] = &[ BuiltinBrushLibrary { id: "paint", name: "Paint", make: paint }, BuiltinBrushLibrary { id: "pattern-borders", name: "Pattern Borders", make: pattern_borders }, BuiltinBrushLibrary { id: "decorative", name: "Decorative", make: decorative }, + BuiltinBrushLibrary { id: "ornamental", name: "Ornamental", make: ornamental }, BuiltinBrushLibrary { id: "scatter-shapes", name: "Scatter Shapes", make: scatter_shapes }, BuiltinBrushLibrary { id: "stipple", name: "Stipple", make: stipple }, BuiltinBrushLibrary { id: "game-trails", name: "Game Trails", make: game_trails }, @@ -733,6 +734,53 @@ fn decorative() -> BrushLibrary { ) } +/// Ornamental: one-pass flourishes and arrow accents that stretch with the path rather than +/// repeating a pattern tile. Every shape is original filled vector art. +fn ornamental() -> BrushLibrary { + let scrollwork = group(vec![ + black(band(100.0, 1.2, 64, |x| 2.6 * (x / 100.0 * std::f64::consts::TAU).sin())), + ring(Point::new(7.0, 0.0), 4.0, 2.0), + ring(Point::new(93.0, 0.0), 4.0, 2.0), + black(polygon(&[(28.0, 1.0), (34.0, -5.0), (40.0, -3.0), (33.0, 2.0)])), + black(polygon(&[(60.0, 3.0), (66.0, 5.0), (72.0, -1.0), (67.0, -2.0)])), + ]); + let arrow = group(vec![ + // The shaft runs into the head's notch at x = 85 so the two overlap. + black(shapes::rectangle(Rect::new(4.0, -0.7, 86.0, 0.7))), + black(polygon(&[(80.0, -6.5), (100.0, 0.0), (80.0, 6.5), (85.0, 0.0)])), + ring(Point::new(7.0, 0.0), 4.0, 1.7), + black(polygon(&[(25.0, -0.4), (31.0, -4.4), (37.0, -2.0), (31.0, 0.8)])), + black(polygon(&[(43.0, 0.4), (49.0, 4.4), (55.0, 2.0), (49.0, -0.8)])), + ]); + let mut petals = vec![black(band(100.0, 1.0, 48, |x| 1.8 * (x / 100.0 * std::f64::consts::PI).sin()))]; + for x in [19.0, 43.0, 67.0, 87.0] { + let y = 1.8 * (x / 100.0 * std::f64::consts::PI).sin(); + petals.push(black(shapes::ellipse(Rect::new(x - 4.5, y - 7.5, x + 4.5, y - 0.3)))); + petals.push(black(shapes::ellipse(Rect::new(x - 3.5, y + 0.3, x + 3.5, y + 5.5)))); + } + let petal_sweep = group(petals); + let twin_curl = group(vec![ + black(band(100.0, 0.9, 64, |x| -3.8 + 1.6 * (x / 100.0 * 2.0 * std::f64::consts::TAU).sin())), + black(band(100.0, 0.9, 64, |x| 3.8 - 1.6 * (x / 100.0 * 2.0 * std::f64::consts::TAU).sin())), + ring(Point::new(8.0, -3.8), 3.0, 1.5), + ring(Point::new(92.0, 3.8), 3.0, 1.5), + ]); + let ornament = |name: &str, art: Node| Brush { + name: name.into(), + kind: BrushKind::Art(ArtBrush { art, width: 300.0, colorization: Colorization::Tints, ..Default::default() }), + }; + built( + "Ornamental", + Document::new(100.0, 100.0), + vec![ + ornament("Scrollwork", scrollwork), + ornament("Filigree Arrow", arrow), + ornament("Petal Sweep", petal_sweep), + ornament("Twin Curl", twin_curl), + ], + ) +} + fn scatter(name: &str, art: Node, s: Scatter) -> Brush { Brush { name: name.into(), kind: BrushKind::Scatter(Scatter { art, ..s }) } } diff --git a/crates/engine/src/tests/brushlib.rs b/crates/engine/src/tests/brushlib.rs index 756db7a859..f2fe9860ca 100644 --- a/crates/engine/src/tests/brushlib.rs +++ b/crates/engine/src/tests/brushlib.rs @@ -115,6 +115,7 @@ fn the_builtin_libraries_are_original_brushes_generated_in_code() { "paint", "pattern-borders", "decorative", + "ornamental", "scatter-shapes", "stipple", "game-trails", @@ -197,6 +198,7 @@ fn every_builtin_library_brush_has_its_kind_and_draws() { ("paint", "art"), ("pattern-borders", "pattern"), ("decorative", "pattern"), + ("ornamental", "art"), ("scatter-shapes", "scatter"), ("stipple", "scatter"), ("game-trails", "art"), @@ -661,6 +663,57 @@ fn decorative_brushes_repeat_distinct_art_and_survive_a_saved_library() { assert_eq!(vectorcraft_brush::library(&reopened), lib.brushes); } +#[test] +fn ornamental_brushes_draw_flourishes_and_survive_a_saved_library() { + let mut s = session(); + let (_, lib) = cmd::brushlib::library(&s, "Ornamental").unwrap(); + let names = ["Scrollwork", "Filigree Arrow", "Petal Sweep", "Twin Curl"]; + assert_eq!(lib.brushes.iter().map(|b| b.name.as_str()).collect::>(), names); + let path = run(&mut s, "shape.line", json!({"x1": 10, "y1": 40, "x2": 190, "y2": 40}))["id"].as_u64().unwrap(); + let mut curve = line_to(20.0); + curve.curve_to((60.0, -25.0), (140.0, 25.0), (180.0, 0.0)); + for b in &lib.brushes { + let BrushKind::Art(art) = &b.kind else { panic!("{} is not an art brush", b.name) }; + assert_eq!(art.colorization, vectorcraft_brush::Colorization::Tints); + assert_eq!(art.width, 300.0); + for line in [line_to(2.0), line_to(180.0), curve.clone()] { + let pieces = vectorcraft_brush::stroke_pieces(&lib.doc, b, &line, &black_stroke()); + let points = anchors(&pieces.iter().collect::>()); + assert!(!points.is_empty() && points.iter().all(|p| p.x.is_finite() && p.y.is_finite()), "{}", b.name); + } + let before = undo_len(&s); + let added = run(&mut s, "brush.addFromLibrary", json!({"library": "ornamental", "name": b.name, "apply": true, "ids": [path]})); + assert_eq!(strs(&added["added"]), [b.name.as_str()]); + assert_eq!(added["applied"], json!([path])); + assert_eq!(undo_len(&s), before + 1); + assert_eq!(doc(&s).node(NodeId(path)).unwrap().appearance.stroke().unwrap().brush.as_deref(), Some(b.name.as_str())); + } + let saved = run(&mut s, "brush.saveLibrary", json!({"names": names})); + let bytes = vectorcraft_format::base64_decode(saved["dataBase64"].as_str().unwrap()).unwrap(); + let reopened = vectorcraft_format::load(&bytes).unwrap(); + assert_eq!(vectorcraft_brush::library(&reopened), lib.brushes); +} + +/// Filigree Arrow's shaft runs into its head with no gap, so a straight stroke draws one arrow. +#[test] +fn the_filigree_arrow_shaft_meets_its_head() { + let s = session(); + let (_, lib) = cmd::brushlib::library(&s, "Ornamental").unwrap(); + let BrushKind::Art(art) = &lib.brush("Filigree Arrow").unwrap().kind else { panic!("Filigree Arrow is not an art brush") }; + let mut parts = vec![]; + art.art.walk(&mut |c| { + if c.path_data().is_some() { + parts.push(c.contains_fn()); + } + }); + for y in [-0.6, 0.0, 0.6] { + for i in 0..=930 { + let p = vectorcraft_geom::Point::new(4.05 + 0.1 * f64::from(i), y); + assert!(parts.iter().any(|inside| inside(p)), "gap at {p:?}"); + } + } +} + #[test] fn pressure_sensitive_brushes_widen_with_pen_pressure_and_survive_a_saved_library() { let mut s = session(); diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index 1ffb352a36..f5a23b32d5 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -7930,6 +7930,11 @@ breakText Glyphs Глифи @msg A joint does not close by {gap} pt. Една връзка не се затваря с {gap} pt. @msg Two panels pass through each other. Два панела минават един през друг. @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer трябва да е "singleLine", "everyLine", "standardSingleLine" или "standardEveryLine" + Ornamental Орнаментални + Scrollwork Завитък + Filigree Arrow Филигранна стрела + Petal Sweep Венчелистен замах + Twin Curl Двоен завитък Vector Packs Векторни пакети Compass Rose Роза на компаса Botanical Sprig Ботаническо клонче diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 712106379f..a874985ab0 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -7985,6 +7985,11 @@ shape Open Otvoren @msg A joint does not close by {gap} pt. Spoj se ne zatvara za {gap} pt. @msg Two panels pass through each other. Dva panela prolaze jedan kroz drugi. @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer mora biti "singleLine", "everyLine", "standardSingleLine" ili "standardEveryLine" + Ornamental Ornamentalno + Scrollwork Ukrasni zavoj + Filigree Arrow Filigranska strelica + Petal Sweep Potez latica + Twin Curl Dvostruki zavoj Vector Packs Vektorski paketi Compass Rose Ruža kompasa Botanical Sprig Botanička grančica diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index a431a69ae7..da58cbeb49 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -8975,6 +8975,11 @@ breakText Glyphs Glifs @msg A joint does not close by {gap} pt. Una unió no es tanca per {gap} pt. @msg Two panels pass through each other. Dos panells es travessen l’un a l’altre. @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer ha de ser "singleLine", "everyLine", "standardSingleLine" o "standardEveryLine" + Ornamental Ornamental + Scrollwork Voluta + Filigree Arrow Fletxa de filigrana + Petal Sweep Traç de pètals + Twin Curl Voluta doble Vector Packs Paquets vectorials Compass Rose Rosa dels vents Botanical Sprig Branqueta botànica diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index ce1a3db865..76b653cd74 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -10799,6 +10799,11 @@ breakText Glyphs Glyfy @msg A panel is not joined to the rest by a crease. Panel není se zbytkem spojen žádnou linií bigu. @msg A fold line is on a non-printing layer. Linie skladu je na netisknutelné vrstvě. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panely: {panels}, panty: {hinges}, chyby: {errors}, upozornění: {warnings} + Ornamental Ornamentální + Scrollwork Rozvilina + Filigree Arrow Filigránový šíp + Petal Sweep Tah okvětních lístků + Twin Curl Dvojitá rozvilina Vector Packs Vektorové balíčky Compass Rose Směrová růžice Botanical Sprig Botanická větvička diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index efccd17560..e7bcfda887 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -10861,6 +10861,11 @@ breakText Glyphs Glyffer @msg A joint does not close by {gap} pt. En samling lukker ikke med {gap} pt. @msg Two panels pass through each other. To paneler går gennem hinanden. @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer skal være "singleLine", "everyLine", "standardSingleLine" eller "standardEveryLine" + Ornamental Ornamentik + Scrollwork Slyngværk + Filigree Arrow Filigranpil + Petal Sweep Kronbladssvirp + Twin Curl Dobbelt slyng Vector Packs Vektorpakker Compass Rose Kompasrose Botanical Sprig Botanisk kvist diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index fe6d9599a1..b3cce4d2d6 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -10441,6 +10441,11 @@ breakText Glyphs Glyphen @msg A panel is not joined to the rest by a crease. Ein Feld ist durch keine Rilllinie mit den übrigen verbunden. @msg A fold line is on a non-printing layer. Eine Faltlinie liegt auf einer nicht druckbaren Ebene. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Felder: {panels}, Scharniere: {hinges}, Fehler: {errors}, Warnungen: {warnings} + Ornamental Ornamental + Scrollwork Schnörkel + Filigree Arrow Filigranpfeil + Petal Sweep Blütenblattschwung + Twin Curl Doppelschnörkel Vector Packs Vektorpakete Compass Rose Kompassrose Botanical Sprig Botanischer Zweig diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index db9bcfef44..f5064c32ca 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -8948,6 +8948,11 @@ breakText Glyphs Γλύφοι @msg A joint does not close by {gap} pt. Μια ένωση δεν κλείνει κατά {gap} pt. @msg Two panels pass through each other. Δύο πάνελ διαπερνούν το ένα το άλλο. @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" το composer πρέπει να είναι "singleLine", "everyLine", "standardSingleLine" ή "standardEveryLine" + Ornamental Διακοσμητικά μοτίβα + Scrollwork Σπείρα + Filigree Arrow Φιλιγκράν βέλος + Petal Sweep Καμπύλη πετάλων + Twin Curl Διπλή σπείρα Vector Packs Διανυσματικά πακέτα Compass Rose Ρόδο πυξίδας Botanical Sprig Βοτανικό κλαδάκι diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 91c9c4e676..f79ba84cf9 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -10692,6 +10692,11 @@ breakText Glyphs Glifos @msg A joint does not close by {gap} pt. Una unión no cierra por {gap} pt. @msg Two panels pass through each other. Dos paneles se atraviesan entre sí. @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer debe ser "singleLine", "everyLine", "standardSingleLine" o "standardEveryLine" + Ornamental Ornamental + Scrollwork Voluta + Filigree Arrow Flecha de filigrana + Petal Sweep Trazo de pétalos + Twin Curl Voluta doble Vector Packs Paquetes vectoriales Compass Rose Rosa de los vientos Botanical Sprig Ramita botánica diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 7c337e3b0d..c69234089e 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -9031,6 +9031,11 @@ breakText Glyphs Merkit @msg A joint does not close by {gap} pt. Liitos ei sulkeudu, rako {gap} pt. @msg Two panels pass through each other. Kaksi paneelia kulkee toistensa läpi. @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer on oltava "singleLine", "everyLine", "standardSingleLine" tai "standardEveryLine" + Ornamental Koristekuviot + Scrollwork Kiemura + Filigree Arrow Filigraanin nuoli + Petal Sweep Terälehtipyyhkäisy + Twin Curl Kaksoiskiemura Vector Packs Vektoripaketit Compass Rose Kompassiruusu Botanical Sprig Kasvinoksa diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 8f0a4f121e..c18befdebc 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -10762,6 +10762,11 @@ breakText Glyphs Glyphes @msg A joint does not close by {gap} pt. Un joint ne se ferme pas, avec un écart de {gap} pt. @msg Two panels pass through each other. Deux panneaux se traversent. @msg {_1} × {_2} pixels is too large for GIF (at most 65535 pixels a side): lower the resolution {_1} × {_2} pixels, c’est trop grand pour le GIF (65535 pixels par côté au plus) : réduisez la résolution + Ornamental Ornemental + Scrollwork Volute + Filigree Arrow Flèche filigrane + Petal Sweep Courbe de pétales + Twin Curl Double volute Vector Packs Packs vectoriels Compass Rose Rose des vents Botanical Sprig Rameau botanique diff --git a/crates/ui-egui/src/i18n/gu.tsv b/crates/ui-egui/src/i18n/gu.tsv index 0394c46530..6fbbfcc5ed 100644 --- a/crates/ui-egui/src/i18n/gu.tsv +++ b/crates/ui-egui/src/i18n/gu.tsv @@ -5669,6 +5669,11 @@ swatch [Registration] [રજિસ્ટ્રેશન] Standard Single-line Composer સ્ટાન્ડર્ડ સિંગલ-લાઇન કમ્પોઝર Standard Every-line Composer સ્ટાન્ડર્ડ એવરી-લાઇન કમ્પોઝર @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer આમાંથી એક હોવું જોઈએ: "singleLine", "everyLine", "standardSingleLine" અથવા "standardEveryLine" + Ornamental અલંકારિક + Scrollwork વળાંકવાળી સજાવટ + Filigree Arrow નાજુક કોતરણીવાળું તીર + Petal Sweep પાંખડીઓનો વળાંક + Twin Curl બેવડો વળાંક Vector Packs વેક્ટર પૅક Compass Rose દિશાસૂચક ગુલાબ Botanical Sprig વનસ્પતિ ડાળી diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index ecf0047d8b..da43faae04 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -10405,6 +10405,11 @@ theme Appearance अपीयरेंस @msg A panel is not joined to the rest by a crease. कोई पैनल किसी क्रीज़ लाइन से बाकी से जुड़ा नहीं है। @msg A fold line is on a non-printing layer. एक फ़ोल्ड लाइन नॉन-प्रिंटिंग लेयर पर है। @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} पैनल: {panels}, हिंज: {hinges}, एरर: {errors}, वॉर्निंग: {warnings} + Ornamental अलंकरण + Scrollwork अलंकारी घुमाव + Filigree Arrow जालीदार तीर + Petal Sweep पंखुड़ियों का घुमाव + Twin Curl दोहरा घुमाव Vector Packs वेक्टर पैक Compass Rose दिशासूचक गुलाब Botanical Sprig वनस्पति टहनी diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 085633cf7e..cd2e5fb72b 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -10788,6 +10788,11 @@ breakText Glyphs Glifák @msg A panel is not joined to the rest by a crease. Egy panelt egyetlen bigvonal sem köt a többihez. @msg A fold line is on a non-printing layer. Egy hajtásvonal nem nyomtatható rétegen van. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panelek: {panels}, zsanérok: {hinges}, hibák: {errors}, figyelmeztetések: {warnings} + Ornamental Díszítőmotívumok + Scrollwork Kacskaringó + Filigree Arrow Filigrán nyíl + Petal Sweep Sziromív + Twin Curl Kettős kacskaringó Vector Packs Vektorcsomagok Compass Rose Iránytűrózsa Botanical Sprig Növényi ágacska diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 33ded71456..930fe53b63 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -8633,6 +8633,11 @@ breakText Glyphs Glif @msg A joint does not close by {gap} pt. Sebuah sambungan tidak menutup sejauh {gap} pt. @msg Two panels pass through each other. Dua panel saling menembus. @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer harus "singleLine", "everyLine", "standardSingleLine", atau "standardEveryLine" + Ornamental Ornamental + Scrollwork Sulur Hias + Filigree Arrow Panah Filigran + Petal Sweep Sapuan Kelopak + Twin Curl Sulur Ganda Vector Packs Paket Vektor Compass Rose Mawar Kompas Botanical Sprig Ranting Botani diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 17b5623c1f..79e76e8fb7 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -10475,6 +10475,11 @@ breakText Glyphs Glifi @msg A panel is not joined to the rest by a crease. Un pannello non è unito al resto da alcuna linea di cordonatura. @msg A fold line is on a non-printing layer. Una linea di piega si trova su un livello non stampabile. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Pannelli: {panels}, cerniere: {hinges}, errori: {errors}, avvisi: {warnings} + Ornamental Ornamentale + Scrollwork Voluta + Filigree Arrow Freccia filigranata + Petal Sweep Tratto a petali + Twin Curl Doppia voluta Vector Packs Pacchetti vettoriali Compass Rose Rosa dei venti Botanical Sprig Rametto botanico diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 31e6213b03..30d7c5abbe 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -10538,6 +10538,11 @@ breakText Glyphs 字形 @msg A panel is not joined to the rest by a crease. パネルがどの筋入れ線でも他とつながっていません。 @msg A fold line is on a non-printing layer. 折り線が印刷しないレイヤーにあります。 @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} パネル: {panels}、ヒンジ: {hinges}、エラー: {errors}、警告: {warnings} + Ornamental 装飾模様 + Scrollwork スクロール装飾 + Filigree Arrow フィリグリーの矢 + Petal Sweep 花びらの流線 + Twin Curl 二重カール Vector Packs ベクターパック Compass Rose 羅針盤のバラ Botanical Sprig 植物の小枝 diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index fe14db5457..f3f3036fc1 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -11085,6 +11085,11 @@ font-script Japanese იაპონური @msg A joint does not close by {gap} pt. შეერთება არ იხურება {gap} pt-ით. @msg Two panels pass through each other. ორი პანელი ერთმანეთში გადის. @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer უნდა იყოს "singleLine", "everyLine", "standardSingleLine" ან "standardEveryLine" + Ornamental ორნამენტული + Scrollwork ხვეული + Filigree Arrow ფილიგრანული ისარი + Petal Sweep ფურცლების რკალი + Twin Curl ორმაგი ხვეული Vector Packs ვექტორული პაკეტები Compass Rose კომპასის ვარდი Botanical Sprig ბოტანიკური ტოტი diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 1d10c26313..a62f21e460 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -10438,6 +10438,11 @@ breakText Glyphs 글리프 @msg A panel is not joined to the rest by a crease. 패널이 어떤 오시선으로도 나머지와 연결되어 있지 않습니다. @msg A fold line is on a non-printing layer. 접는 선이 인쇄되지 않는 레이어에 있습니다. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} 패널: {panels}, 힌지: {hinges}, 오류: {errors}, 경고: {warnings} + Ornamental 장식 문양 + Scrollwork 소용돌이 장식 + Filigree Arrow 세공 화살표 + Petal Sweep 꽃잎 곡선 + Twin Curl 이중 소용돌이 Vector Packs 벡터 팩 Compass Rose 나침반 장미 Botanical Sprig 식물 가지 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 9d65ae28f6..78ad1b6891 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -10838,6 +10838,11 @@ breakText Glyphs Glyphs @msg A panel is not joined to the rest by a crease. Een paneel is door geen rillijn met de rest verbonden. @msg A fold line is on a non-printing layer. Een vouwlijn staat op een laag die niet wordt afgedrukt. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panelen: {panels}, scharnieren: {hinges}, fouten: {errors}, waarschuwingen: {warnings} + Ornamental Ornamentaal + Scrollwork Krulwerk + Filigree Arrow Filigraanpijl + Petal Sweep Bloemblaadjeszwaai + Twin Curl Dubbele krul Vector Packs Vectorpakketten Compass Rose Kompasroos Botanical Sprig Botanisch takje diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index aaaff09fdf..4356fd0ae5 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -10664,6 +10664,11 @@ breakText Glyphs Glify @msg A panel is not joined to the rest by a crease. Panel nie jest połączony z resztą żadną linią bigowania. @msg A fold line is on a non-printing layer. Linia zgięcia znajduje się na warstwie niedrukowanej. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Panele: {panels}, zawiasy: {hinges}, błędy: {errors}, ostrzeżenia: {warnings} + Ornamental Ornamentalne + Scrollwork Zawijas + Filigree Arrow Filigranowa strzałka + Petal Sweep Smuga płatków + Twin Curl Podwójny zawijas Vector Packs Pakiety wektorowe Compass Rose Róża wiatrów Botanical Sprig Gałązka botaniczna diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 0dfd797bee..a4b75c87c9 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -10871,6 +10871,11 @@ swatch Yellow Green Verde-amarelado @msg A panel is not joined to the rest by a crease. Um painel não está unido ao restante por nenhuma linha de vinco. @msg A fold line is on a non-printing layer. Uma linha de dobra está em uma camada não imprimível. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Painéis: {panels}, dobradiças: {hinges}, erros: {errors}, avisos: {warnings} + Ornamental Ornamental + Scrollwork Voluta + Filigree Arrow Seta filigranada + Petal Sweep Traço de pétalas + Twin Curl Voluta dupla Vector Packs Pacotes vetoriais Compass Rose Rosa dos ventos Botanical Sprig Ramo botânico diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index ceb5c16f75..26376b52aa 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -10855,6 +10855,11 @@ shape Open Открытый @msg Two panels pass through each other. Две панели проходят друг сквозь друга. @msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} пикселей — слишком большой размер для PSD (не более {MAX_SIDE} пикселей по стороне): уменьшите разрешение @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer должен быть "singleLine", "everyLine", "standardSingleLine" или "standardEveryLine" + Ornamental Орнаментальные + Scrollwork Завиток + Filigree Arrow Филигранная стрела + Petal Sweep Лепестковый росчерк + Twin Curl Двойной завиток Vector Packs Векторные наборы Compass Rose Роза ветров Botanical Sprig Ботаническая ветвь diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 40402919e7..2605d6af24 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -10892,6 +10892,11 @@ digits Hindi Hindi @msg A joint does not close by {gap} pt. En fog sluter inte med {gap} pt. @msg Two panels pass through each other. Två paneler går igenom varandra. @msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} pixlar är för stort för PSD (högst {MAX_SIDE} pixlar per sida): sänk upplösningen + Ornamental Ornament + Scrollwork Snirkel + Filigree Arrow Filigranpil + Petal Sweep Kronbladssvep + Twin Curl Dubbel snirkel Vector Packs Vektorpaket Compass Rose Kompassros Botanical Sprig Botanisk kvist diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index f23a781cd0..4482711345 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -10757,6 +10757,11 @@ breakText Glyphs Glifler @msg A panel is not joined to the rest by a crease. Bir panel geri kalanlara hiçbir pilyaj çizgisiyle bağlı değil. @msg A fold line is on a non-printing layer. Bir katlama çizgisi yazdırılmayan bir katmanda. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Paneller: {panels}, menteşeler: {hinges}, hatalar: {errors}, uyarılar: {warnings} + Ornamental Süslemeli + Scrollwork Kıvrım süsü + Filigree Arrow Telkari ok + Petal Sweep Yaprakçık kıvrımı + Twin Curl Çift kıvrım Vector Packs Vektör Paketleri Compass Rose Pusula Gülü Botanical Sprig Botanik Dal diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index efc5b68554..7f44f83566 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -10451,6 +10451,11 @@ breakText Glyphs Гліфи @msg A panel is not joined to the rest by a crease. Панель не з’єднана з рештою жодною лінією біговки. @msg A fold line is on a non-printing layer. Лінія згину лежить на шарі, що не друкується. @msg Panels: {panels}, hinges: {hinges}, errors: {errors}, warnings: {warnings} Панелі: {panels}, шарніри: {hinges}, помилки: {errors}, попередження: {warnings} + Ornamental Орнаментальні + Scrollwork Завиток + Filigree Arrow Філігранна стріла + Petal Sweep Пелюстковий розчерк + Twin Curl Подвійний завиток Vector Packs Векторні набори Compass Rose Роза вітрів Botanical Sprig Ботанічна гілочка diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 5d7ee18fdf..bda1d15a3b 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -8648,6 +8648,11 @@ breakText Glyphs Glyph @msg {width} × {height} pixels is too large for Targa (at most 65535 pixels a side): lower the resolution {width} × {height} điểm ảnh quá lớn cho Targa (tối đa 65535 điểm ảnh mỗi cạnh): hãy giảm độ phân giải @msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} điểm ảnh quá lớn cho PSD (tối đa {MAX_SIDE} điểm ảnh mỗi cạnh): hãy giảm độ phân giải @msg composer must be "singleLine", "everyLine", "standardSingleLine" or "standardEveryLine" composer phải là "singleLine", "everyLine", "standardSingleLine" hoặc "standardEveryLine" + Ornamental Hoa văn + Scrollwork Nét cuộn + Filigree Arrow Mũi tên hoa văn + Petal Sweep Nét cánh hoa + Twin Curl Nét cuộn đôi Vector Packs Bộ cọ véc-tơ Compass Rose Hoa la bàn Botanical Sprig Cành cây diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 1259dd74e6..f7f2999a0f 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -10642,6 +10642,11 @@ breakText Glyphs 字形 @msg A joint does not close by {gap} pt. 有一处接缝相差 {gap} pt 未闭合。 @msg Two panels pass through each other. 两个面板相互穿插。 @msg {w} × {h} pixels is too large for PSD (at most {MAX_SIDE} pixels a side): lower the resolution {w} × {h} 像素对 PSD 而言过大 (每边最多 {MAX_SIDE} 像素):请降低分辨率 + Ornamental 装饰纹样 + Scrollwork 卷饰 + Filigree Arrow 花丝箭头 + Petal Sweep 花瓣曲线 + Twin Curl 双重卷饰 Vector Packs 矢量画笔包 Compass Rose 罗盘玫瑰 Botanical Sprig 植物枝条 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 633296c767..2147fa2742 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -10458,6 +10458,11 @@ breakText Glyphs 字符 @msg A joint does not close by {gap} pt. 有一處接縫相差 {gap} pt 未閉合。 @msg Two panels pass through each other. 兩個面板相互穿插。 @msg {what} would print on more than {MAX_TILES} tiles: scale it down {what} 會列印在超過 {MAX_TILES} 個拼貼上:請縮小 + Ornamental 裝飾紋樣 + Scrollwork 卷飾 + Filigree Arrow 花絲箭頭 + Petal Sweep 花瓣曲線 + Twin Curl 雙重卷飾 Vector Packs 向量筆刷包 Compass Rose 羅盤玫瑰 Botanical Sprig 植物枝條 diff --git a/crates/ui-egui/src/panels/tests_brush_libraries.rs b/crates/ui-egui/src/panels/tests_brush_libraries.rs index 49b25e987b..53c5611d20 100644 --- a/crates/ui-egui/src/panels/tests_brush_libraries.rs +++ b/crates/ui-egui/src/panels/tests_brush_libraries.rs @@ -200,6 +200,7 @@ fn the_window_menu_and_the_brushes_panel_open_brush_libraries() { json!("paint"), json!("pattern-borders"), json!("decorative"), + json!("ornamental"), json!("scatter-shapes"), json!("stipple"), json!("game-trails"), @@ -257,6 +258,17 @@ fn the_window_menu_and_the_brushes_panel_open_brush_libraries() { click(&mut app, &ctx, "Compass Rose", Modifiers::NONE, 4.0); assert!(has(&app, "Compass Rose") && !has(&app, "Facet Diamond")); assert_eq!(undo_len(&app), undo + 1); + let r = app.run("window.brushLibrary", json!({"library": "Ornamental"})).unwrap(); + assert_eq!((r["open"].as_str(), r["count"].as_u64()), (Some("ornamental"), Some(4))); + let path = app.run("shape.line", json!({"x1": 10, "y1": 100, "x2": 180, "y2": 100})).unwrap()["id"].as_u64().unwrap(); + let undo = undo_len(&app); + click(&mut app, &ctx, "Scrollwork", Modifiers::NONE, 5.0); + assert!(has(&app, "Scrollwork") && !has(&app, "Twin Curl")); + assert_eq!(undo_len(&app), undo + 1); + assert_eq!( + app.session.doc().unwrap().doc.node(vectorcraft_doc::NodeId(path)).unwrap().appearance.stroke().unwrap().brush.as_deref(), + Some("Scrollwork") + ); // Without brushes there is nothing to save. let all: Vec = vectorcraft_brush::library(&app.session.doc().unwrap().doc).into_iter().map(|b| b.name).collect(); app.run("brush.delete", json!({ "names": all })).unwrap();