diff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsv index c42766e7c..62e63236c 100644 --- a/crates/ui-egui/src/i18n/bg.tsv +++ b/crates/ui-egui/src/i18n/bg.tsv @@ -1331,6 +1331,8 @@ font-technology Variable Променливи Grays Сиви Grays and Neutrals Сиви и неутрални Grayscale Черно-бяло + High Color Много цветове + Low Color Малко цветове Grayscale images Черно-бели изображения Greek & Cyrillic Гръцки и кирилица Green Зелено diff --git a/crates/ui-egui/src/i18n/bs.tsv b/crates/ui-egui/src/i18n/bs.tsv index 07e429218..f9440a3ac 100644 --- a/crates/ui-egui/src/i18n/bs.tsv +++ b/crates/ui-egui/src/i18n/bs.tsv @@ -3829,6 +3829,8 @@ axis Both Obje Center Sredina Transform in Perspective Transformiši u perspektivi Grayscale Nijanse sive + High Color Mnogo boja + Low Color Malo boja Embed Ugradi Star Zvijezda Power Saving (integrated) Ušteda energije (integrisana) diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 354541faf..4b7620122 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -1778,6 +1778,8 @@ digits Malayalam Malaiàlam Grays Grisos Grays and Neutrals Grisos i neutres Grayscale Escala de grisos + High Color Molts colors + Low Color Pocs colors Grayscale images Imatges en escala de grisos Greek & Cyrillic Grec i ciríl·lic Green Verd diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 8ebf53aac..1d97c368b 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -3870,6 +3870,8 @@ axis Both Obě Center Střed Transform in Perspective Transformovat v perspektivě Grayscale Stupně šedi + High Color Mnoho barev + Low Color Málo barev Embed Vložit Star Hvězda Power Saving (integrated) Úsporný režim (integrovaná) diff --git a/crates/ui-egui/src/i18n/da.tsv b/crates/ui-egui/src/i18n/da.tsv index 423388739..f8a359ab6 100644 --- a/crates/ui-egui/src/i18n/da.tsv +++ b/crates/ui-egui/src/i18n/da.tsv @@ -3598,6 +3598,8 @@ axis Both Begge Center Midt Transform in Perspective Transformer i perspektiv Grayscale Gråtoner + High Color Mange farver + Low Color Få farver Embed Integrér Star Stjerne Power Saving (integrated) Strømbesparende (integreret) diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index 99d4def70..1546be1ae 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -1362,6 +1362,8 @@ file-filter Templates Vorlagen Grays Grautöne Grays and Neutrals Grautöne und neutrale Farben Grayscale Graustufen + High Color Viele Farben + Low Color Wenige Farben Grayscale images Graustufenbilder Greek & Cyrillic Griechisch und Kyrillisch Green Grün diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 21deaf13f..2d7ffc5b2 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -1301,6 +1301,8 @@ font-technology Variable Μεταβλητές Grays Γκρι τόνοι Grays and Neutrals Γκρι και ουδέτεροι τόνοι Grayscale Κλίμακα του γκρι + High Color Πολλά χρώματα + Low Color Λίγα χρώματα Grayscale images Εικόνες σε κλίμακα του γκρι Greek & Cyrillic Ελληνικά και κυριλλικά Green Πράσινο diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 1a6d4677a..e5c6f889d 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -1380,6 +1380,8 @@ font-technology Variable Variables Grays Grises Grays and Neutrals Grises y neutros Grayscale Escala de grises + High Color Muchos colores + Low Color Pocos colores Grayscale images Imágenes en escala de grises Greek & Cyrillic Griego y cirílico Green Verde diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index 0954e96eb..86a651070 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -3794,6 +3794,8 @@ axis Both Molemmat Center Keskitä Transform in Perspective Muunna perspektiivissä Grayscale Harmaasävy + High Color Paljon värejä + Low Color Vähän värejä Embed Upota Star Tähti Power Saving (integrated) Virransäästö (integroitu) diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index 49353e65d..3fa64c5b2 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -1374,6 +1374,8 @@ font-technology Variable Variables Grays Gris Grays and Neutrals Gris et neutres Grayscale Niveaux de gris + High Color Beaucoup de couleurs + Low Color Peu de couleurs Grayscale images Images en niveaux de gris Greek & Cyrillic Grec et cyrillique Green Vert diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 5b388b2b1..7e766cf6e 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -1971,6 +1971,8 @@ Grays ग्रे Grays and Neutrals ग्रे और तटस्थ Grayscale ग्रेस्केल + High Color अधिक रंग + Low Color कम रंग Grayscale images ग्रेस्केल इमेज Grayscale Images ग्रे स्केल इमेज Greek & Cyrillic ग्रीक & Cyrillic diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index c1db67e2a..26cad4650 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -1749,6 +1749,8 @@ file-filter Templates Sablonok Grays Szürkék Grays and Neutrals Szürkék és semleges színek Grayscale Szürkeárnyalatos + High Color Sok szín + Low Color Kevés szín Grayscale images Szürkeárnyalatos képek Greek & Cyrillic Görög és cirill Green Zöld diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv index 9465638a6..c7677a71f 100644 --- a/crates/ui-egui/src/i18n/id.tsv +++ b/crates/ui-egui/src/i18n/id.tsv @@ -3598,6 +3598,8 @@ axis Both Keduanya Center Tengah Transform in Perspective Transformasi dalam perspektif Grayscale Skala abu-abu + High Color Banyak warna + Low Color Sedikit warna Embed Sematkan Star Bintang Power Saving (integrated) Hemat daya (terintegrasi) diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 112e2d340..a6ac70bb4 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -1392,6 +1392,8 @@ file-filter Templates Modelli Grays Grigi Grays and Neutrals Grigi e neutri Grayscale Scala di grigi + High Color Molti colori + Low Color Pochi colori Grayscale images Immagini in scala di grigi Greek & Cyrillic Greco e cirillico Green Verde diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index 9acface09..3884362fc 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -1731,6 +1731,8 @@ digits Malayalam マラヤーラム数字 Graphics: {adapter} グラフィックス: {adapter} Grays グレー Grayscale グレースケール + High Color 多色 + Low Color 少色 Flat Logo フラットロゴ Grayscale images グレースケールイメージ Green グリーン diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 36a6ea1ba..42ab753ae 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -3393,6 +3393,8 @@ axis Both ორივე Center ცენტრში Transform in Perspective პერსპექტივაში გარდაქმნა Grayscale ნაცრისფერი გრადაციები + High Color ბევრი ფერი + Low Color ცოტა ფერი Embed ჩაშენება Star ვარსკვლავი Power Saving (integrated) ენერგიის დაზოგვა (ინტეგრირებული) diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index bd3859a2e..97d8eaaef 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -1721,6 +1721,8 @@ digits Malayalam 말라얄람어 Graphics: {adapter} 그래픽: {adapter} Grays 회색 계열 Grayscale 그레이스케일 + High Color 많은 색상 + Low Color 적은 색상 Flat Logo 단색 로고 Grayscale images 그레이스케일 이미지 Green 녹색 diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index 09368f0f5..986489e61 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -3612,6 +3612,8 @@ axis Both Beide Center Midden Transform in Perspective In perspectief transformeren Grayscale Grijswaarden + High Color Veel kleuren + Low Color Weinig kleuren Embed Insluiten Star Ster Power Saving (integrated) Energiebesparend (geïntegreerd) diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 31ec50b67..a0b0ca47e 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -3713,6 +3713,8 @@ axis Both Obie Center Środek Transform in Perspective Przekształć w perspektywie Grayscale Skala szarości + High Color Wiele kolorów + Low Color Mało kolorów Embed Osadź Star Gwiazda Power Saving (integrated) Oszczędzanie energii (zintegrowany) diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index bae1d67dc..fe87b21ea 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -1207,6 +1207,8 @@ Grays Cinzas Grays and Neutrals Cinzas e Neutros Grayscale Escala de Cinza + High Color Muitas Cores + Low Color Poucas Cores Grayscale images Imagens em escala de cinza Green Verde Grid Grade diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 1f5c3249a..1f6bab7e7 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -1389,6 +1389,8 @@ file-filter Templates Шаблоны Grays Серые Grays and Neutrals Серые и нейтральные Grayscale Оттенки серого + High Color Много цветов + Low Color Мало цветов Grayscale images Изображения в оттенках серого Greek & Cyrillic Греческий и кириллица Green Зелёный diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 717b5a947..d1e716e64 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -1339,6 +1339,8 @@ font-technology Variable Variabla Grays Gråtoner Grays and Neutrals Gråtoner och neutrala toner Grayscale Gråskala + High Color Många färger + Low Color Få färger Grayscale images Gråskalebilder Greek & Cyrillic Grekiska och kyrilliska Green Grön diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index 6bb74f042..59ae480bc 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -1303,6 +1303,8 @@ font-technology Variable Değişken Grays Griler Grays and Neutrals Griler ve Nötrler Grayscale Gri tonlamalı + High Color Çok Renk + Low Color Az Renk Grayscale images Gri tonlamalı görüntüler Greek & Cyrillic Yunanca ve Kiril Green Yeşil diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 337e92826..ec1b07ec3 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -1386,6 +1386,8 @@ file-filter Templates Шаблони Grays Сірі Grays and Neutrals Сірі та нейтральні Grayscale Відтінки сірого + High Color Багато кольорів + Low Color Мало кольорів Grayscale images Зображення у відтінках сірого Greek & Cyrillic Грецька та кирилиця Green Зелений diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 771e1a930..0ed0816b6 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -1599,6 +1599,8 @@ file-filter Templates Mẫu Grays Các màu xám Grays and Neutrals Xám và trung tính Grayscale Thang xám + High Color Nhiều màu + Low Color Ít màu Grayscale images Ảnh thang xám Greek & Cyrillic Hy Lạp & Cyrillic Green Xanh lá diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 65dae513b..71975b2b8 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -1328,6 +1328,8 @@ file-filter Templates 模板 Grays 灰度级数 Grays and Neutrals 灰色和中性色 Grayscale 灰度 + High Color 多色 + Low Color 少色 Flat Logo 扁平徽标 Grayscale images 灰度图像 Greek & Cyrillic 希腊文与西里尔文 diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 852e1e4ce..6dbbd1e20 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -1356,6 +1356,8 @@ file-filter Templates 範本 Grays 灰色 Grays and Neutrals 灰色與中性色 Grayscale 灰階 + High Color 多色 + Low Color 少色 Flat Logo 扁平標誌 Grayscale images 灰階影像 Greek & Cyrillic 希臘文與西里爾文 diff --git a/crates/ui-egui/src/panels/image_trace.rs b/crates/ui-egui/src/panels/image_trace.rs index 73a1b8986..ce5a5955b 100644 --- a/crates/ui-egui/src/panels/image_trace.rs +++ b/crates/ui-egui/src/panels/image_trace.rs @@ -270,6 +270,21 @@ fn preset_label(name: &str) -> &str { crate::i18n::tr_ctx(crate::i18n::current(), "imageTrace", name) } +/// The buttons above the Image Trace panel's Preset dropdown, in panel order: each one's name and the +/// built-in preset a click chooses. The help page lists these options before Preset +/// (); +/// which preset each one chooses is VectorCraft's own. +fn preset_buttons() -> [(&'static str, &'static str); 6] { + [ + (preset_label("Auto Color"), "Auto Color"), + (tl!("High Color"), "High Fidelity Photo"), + (tl!("Low Color"), "Low Fidelity Photo"), + (tl!("Grayscale"), "Shades of Gray"), + (tl!("Black and White"), "Black and White Logo"), + (preset_label("Outline"), "Outline"), + ] +} + fn preset_list(app: &mut VectorcraftApp, ui: &mut Ui, current: &str) -> Option { let mut chosen = None; let list = presets(app, ui.ctx()); @@ -559,6 +574,23 @@ pub fn show(app: &mut VectorcraftApp, ui: &mut Ui) { let restored = sync_with_object(&mut st, stored, object, &all, &changes); let mut retrace = false; + // A preset button chooses its preset as the Preset dropdown does; the button of the panel's + // preset shows as selected. + ui.horizontal_wrapped(|ui| { + for (label, name) in preset_buttons() { + let selected = st.preset == name; + if cfg!(test) { + ui.ctx().data_mut(|d| d.insert_temp(egui::Id::unique(("trace-preset-button", name)), selected)); + } + if ui.add(egui::Button::selectable(selected, label)).on_hover_text(preset_label(name)).clicked() + && let Some(p) = all.iter().find(|p| p.0 == name) + { + st.preset = name.to_string(); + st.params = p.1.clone(); + retrace = true; + } + } + }); ui.horizontal(|ui| { widgets::dim_label(ui, tl!("Preset:")); let manage = 24.0; diff --git a/crates/ui-egui/src/panels/image_trace/tests.rs b/crates/ui-egui/src/panels/image_trace/tests.rs index 56de0cdb0..7e797cead 100644 --- a/crates/ui-egui/src/panels/image_trace/tests.rs +++ b/crates/ui-egui/src/panels/image_trace/tests.rs @@ -1217,6 +1217,111 @@ fn the_preset_list_is_read_once_for_each_change_of_the_saved_presets() { assert_eq!((reads(), shown_preset(&ctx)), (start + 4, "D".to_string())); } +/// Choose `preset` from the Preset dropdown, which shows `shown`. +fn choose_from_preset_menu(app: &mut VectorcraftApp, ctx: &egui::Context, shown: &str, preset: &str) { + let texts = frame(app, ctx, vec![]); + let combo = texts.iter().rfind(|(t, _)| t == shown).map(|(_, r)| r.center()).unwrap_or_else(|| panic!("no `{shown}` in {texts:?}")); + click_at(app, ctx, combo); + let texts = frame(app, ctx, vec![]); + let at = texts.iter().rfind(|(t, _)| t == preset).map(|(_, r)| r.center()).unwrap_or_else(|| panic!("no `{preset}` in {texts:?}")); + click_at(app, ctx, at); +} + +/// Which preset buttons showed as selected at the last frame. +fn selected_preset_buttons(ctx: &egui::Context) -> Vec<&'static str> { + preset_buttons() + .into_iter() + .filter(|(_, name)| ctx.data(|d| d.get_temp::(egui::Id::unique(("trace-preset-button", *name)))) == Some(true)) + .map(|(_, name)| name) + .collect() +} + +#[test] +fn each_preset_button_traces_the_selected_object_again_with_its_preset() { + let mut app = traced_app_with_ink(100); + trace_and_open(&mut app, "Default"); + let ctx = egui::Context::default(); + crate::theme::install_fonts(&ctx); + frame(&mut app, &ctx, vec![]); + let undo = |app: &VectorcraftApp| app.session.active().unwrap().history.undo.len(); + for (label, preset) in [ + ("Auto Color", "Auto Color"), + ("High Color", "High Fidelity Photo"), + ("Low Color", "Low Fidelity Photo"), + ("Grayscale", "Shades of Gray"), + ("Black and White", "Black and White Logo"), + ("Outline", "Outline"), + ] { + let steps = undo(&app); + click(&mut app, &ctx, label); + frame(&mut app, &ctx, vec![]); + assert_eq!(selected_trace(&app).unwrap().0, preset, "{label}"); + assert_eq!(undo(&app), steps + 1, "{label} traces as one undo step"); + let all = presets(&mut app, &ctx); + assert_eq!(target(&app).2.unwrap()["params"], find_preset(&all, preset).unwrap().1, "{label} traces with the preset's settings"); + assert_eq!((shown_preset(&ctx), selected_preset_buttons(&ctx)), (preset.to_string(), vec![preset]), "{label}"); + } + // Undo returns to the object's previous preset, and the buttons follow it. + app.run("edit.undo", json!({})).unwrap(); + frame(&mut app, &ctx, vec![]); + frame(&mut app, &ctx, vec![]); + assert_eq!(selected_trace(&app).unwrap().0, "Black and White Logo"); + assert_eq!(selected_preset_buttons(&ctx), ["Black and White Logo"]); +} + +#[test] +fn the_selected_preset_button_follows_the_preset_menu() { + let mut app = traced_app_with_ink(100); + trace_and_open(&mut app, "Default"); + let ctx = egui::Context::default(); + crate::theme::install_fonts(&ctx); + frame(&mut app, &ctx, vec![]); + assert!(selected_preset_buttons(&ctx).is_empty(), "Default has no button"); + choose_from_preset_menu(&mut app, &ctx, "Default", "Shades of Gray"); + assert_eq!(selected_trace(&app).unwrap().0, "Shades of Gray"); + assert_eq!(selected_preset_buttons(&ctx), ["Shades of Gray"]); + choose_from_preset_menu(&mut app, &ctx, "Shades of Gray", "6 Colors"); + assert_eq!(selected_trace(&app).unwrap().0, "6 Colors"); + assert!(selected_preset_buttons(&ctx).is_empty(), "6 Colors has no button"); + // A changed setting makes the preset Custom, and no button shows as selected. + click(&mut app, &ctx, "Outline"); + frame(&mut app, &ctx, vec![]); + assert_eq!(selected_preset_buttons(&ctx), ["Outline"]); + click(&mut app, &ctx, "Preview"); + click(&mut app, &ctx, "Fills"); + frame(&mut app, &ctx, vec![]); + assert_eq!(shown_preset(&ctx), "Custom"); + assert!(selected_preset_buttons(&ctx).is_empty()); +} + +#[test] +fn a_preset_button_with_no_image_selected_changes_the_panel_settings_as_the_preset_menu_does() { + let blank = || { + let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default()); + app.run("file.new", json!({"width": 100, "height": 100})).unwrap(); + app + }; + let mut app = blank(); + let ctx = egui::Context::default(); + crate::theme::install_fonts(&ctx); + frame(&mut app, &ctx, vec![]); + let steps = app.session.active().unwrap().history.undo.len(); + click(&mut app, &ctx, "High Color"); + frame(&mut app, &ctx, vec![]); + let by_button: TraceUi = pstate(&ctx, "image-trace"); + assert_eq!(app.session.active().unwrap().history.undo.len(), steps, "nothing is traced"); + assert!(target(&app).2.is_none(), "no Image Trace object"); + assert_eq!(selected_preset_buttons(&ctx), ["High Fidelity Photo"]); + + let mut menu_app = blank(); + let menu_ctx = egui::Context::default(); + crate::theme::install_fonts(&menu_ctx); + choose_from_preset_menu(&mut menu_app, &menu_ctx, "Default", "High Fidelity Photo"); + let by_menu: TraceUi = pstate(&menu_ctx, "image-trace"); + assert_eq!(menu_app.session.active().unwrap().history.undo.len(), steps); + assert_eq!((by_button.preset, by_button.params), (by_menu.preset, by_menu.params)); +} + #[test] fn panel_and_menu_draw_headless() { let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default()); diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index a5ecfce14..92848cc5e 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1071,6 +1071,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur - **Image Trace, Preview:** the Image Trace panel's Preview checkbox, before Trace, is on by default, and a setting change traces the selected Image Trace object again at once. Off, changes wait in the panel until Trace applies them as one undo step, or until Preview is turned on again. Changes stay with the object they were made for while another object is selected. When Preview is turned on with that object not selected, the object is traced with its changes when it is selected again. Preview is kept with the UI preferences, and Reset to Default leaves it. The `imageTrace.preview` command turns it on or off. - **Image Trace small contours:** closed fits too small to form an editable subpath retain their positioned outline, including holes. Source-generated island, hole/winding and stepped-region regressions cover Corners and Noise; defaults, parity scores and estimates are unchanged. - **Image Trace, custom presets:** Manage Presets next to the Image Trace panel's Preset dropdown saves the panel's settings as a new preset under a name (Save as New Preset…) and renames or deletes the saved preset shown; built-in presets don't change. Saved presets are kept with the preferences and follow the built-in ones in the panel, Control bar and Properties preset lists. `imageTrace.presets.save` and `imageTrace.presets.delete` save, rename and delete them, `imageTrace.presets` lists them, and `imageTrace.make {preset}` traces with one by name. +- **Image Trace, preset buttons:** six buttons above the Image Trace panel's Preset dropdown choose a preset as the dropdown does, for the options the [help page](https://helpx.adobe.com/illustrator/desktop/manage-objects/traces-mockups-symbols/image-trace-panel-options.html) lists before Preset. The presets each button chooses are VectorCraft's own: Auto Color chooses Auto Color, High Color chooses High Fidelity Photo, Low Color chooses Low Fidelity Photo, Grayscale chooses Shades of Gray, Black and White chooses Black and White Logo, and Outline chooses Outline. With Preview on, a click traces the selected Image Trace object again as one undo step; with nothing traced selected, it changes the panel's settings only. The button of the panel's preset shows as selected. - **Create Strokes baseline (2026-10-17, measured):** the ignored centre-lines class covers 23 exact code-drawn scenes in aa and hard variants, including junctions, crossings, fills meeting strokes and varying widths. [Baseline and metric definitions](image-trace-quality.md#centre-lines). Topology is recovered from emitted geometry; width-profile metrics remain unavailable. No behaviour change or score increase. - **Image Trace, collapsed loops keep few segments:** a loop whose fit collapses to one cubic keeps the fewest segments that hold its area and course, so a higher Paths gives no fewer segments; a code-drawn Paths sweep in `crates/trace` (see [quality notes](image-trace-quality.md#collapsed-loops-keep-few-segments)). - **Image Trace, stacked layers only under their own areas:** with Method Overlapping, a layer reaches under the colors above it only within the connected areas that hold its own color, so a shape that sits apart from a color is no longer written again, at the same bounds, in that color, and the edge of that color's layer no longer shows through that shape's anti-aliased rim. *Measured* by `crates/trace/tests/quality` on each preset's own inputs: High Fidelity Photo 121 paths to 69.6 with ΔE 1.74 to 1.72, Low Fidelity Photo 37.1 paths to 26.1. Code-drawn disc, square and line tests in `crates/trace`.