From 7da444db697c0984a0547b0fa8c53f67fb427099 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Wed, 18 Nov 2026 01:58:46 -0800 Subject: [PATCH] Color Wheel: contrast refuses a color drawn through an opacity mask An enabled opacity mask on the proxy's object, or on a group, layer or instance around it, sets how much of the color shows at each point, so color.contrast has no one opacity to measure. Without `color` it now answers with an error that asks for one, as for a hidden row. A disabled mask leaves the answer as it was. --- crates/engine/src/cmd/colorcmds.rs | 13 ++++++++- crates/engine/src/tests/colorcontrast.rs | 37 ++++++++++++++++++++++++ crates/ui-egui/src/i18n/ca.tsv | 1 + crates/ui-egui/src/i18n/cs.tsv | 1 + crates/ui-egui/src/i18n/de.tsv | 1 + crates/ui-egui/src/i18n/el.tsv | 1 + crates/ui-egui/src/i18n/es.tsv | 1 + crates/ui-egui/src/i18n/fi.tsv | 1 + crates/ui-egui/src/i18n/fr.tsv | 1 + crates/ui-egui/src/i18n/hi.tsv | 1 + crates/ui-egui/src/i18n/hu.tsv | 1 + crates/ui-egui/src/i18n/it.tsv | 1 + crates/ui-egui/src/i18n/ja.tsv | 1 + crates/ui-egui/src/i18n/ka.tsv | 1 + crates/ui-egui/src/i18n/ko.tsv | 1 + crates/ui-egui/src/i18n/nl.tsv | 1 + crates/ui-egui/src/i18n/pl.tsv | 1 + crates/ui-egui/src/i18n/pt-br.tsv | 1 + crates/ui-egui/src/i18n/ru.tsv | 1 + crates/ui-egui/src/i18n/sv.tsv | 1 + crates/ui-egui/src/i18n/tr.tsv | 1 + crates/ui-egui/src/i18n/uk.tsv | 1 + crates/ui-egui/src/i18n/vi.tsv | 1 + crates/ui-egui/src/i18n/zh-hans.tsv | 1 + crates/ui-egui/src/i18n/zh-hant.tsv | 1 + docs/mcp.md | 4 ++- 26 files changed, 75 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/cmd/colorcmds.rs b/crates/engine/src/cmd/colorcmds.rs index 6aa839d550..c74524650a 100644 --- a/crates/engine/src/cmd/colorcmds.rs +++ b/crates/engine/src/cmd/colorcmds.rs @@ -1137,6 +1137,13 @@ struct Level { blend: BlendMode, isolate: bool, part: Part, + /// Whether it has an opacity mask that is not disabled. + masked: bool, +} + +/// Whether object `n` has an opacity mask that is not disabled. +fn masked(n: &Node) -> bool { + n.extras().mask.as_ref().is_some_and(|m| !m.disabled) } /// How the proxy's color is drawn: the object's opacity, its fill or stroke row's blend mode and @@ -1330,6 +1337,10 @@ fn drawn_settings(s: &Session, n: &Node, item: Option, stroke: bool) -> s // The groups and layer the object is in draw it too (`enclosing` lists the outermost first). let mut around = enclosing(s, n.id); around.reverse(); + // An opacity mask sets how much of the color shows at each point, which no one opacity gives. + if masked(n) || around.iter().any(|l| l.masked) { + return Err("the active fill or stroke is drawn through an opacity mask: give `color`".to_string()); + } Ok(Drawn { opacity: n.opacity, row: own.map(|o| (o.1, o.0)), blend: n.blend, isolate: n.isolate, around }) } @@ -1354,7 +1365,7 @@ fn stained(s: &Session, color: Color) -> Color { fn enclosing(s: &Session, id: NodeId) -> Vec { let Some(st) = s.active() else { return vec![] }; let doc = &st.doc; - let level = |n: &Node, part: Part| Level { opacity: n.opacity, blend: n.blend, isolate: n.isolate, part }; + let level = |n: &Node, part: Part| Level { opacity: n.opacity, blend: n.blend, isolate: n.isolate, part, masked: masked(n) }; // `ancestry` lists the object itself last. let in_doc = |id: NodeId, own: bool| { let ids = doc.ancestry(id).unwrap_or_default(); diff --git a/crates/engine/src/tests/colorcontrast.rs b/crates/engine/src/tests/colorcontrast.rs index 0a8d348e00..e436b637d1 100644 --- a/crates/engine/src/tests/colorcontrast.rs +++ b/crates/engine/src/tests/colorcontrast.rs @@ -508,6 +508,43 @@ fn a_hidden_fill_row_has_no_color_to_measure() { assert!((ratio(&given) - 21.0).abs() < 1e-6, "{given}"); } +/// An opacity mask on the object, or on a group around it, sets how much of the color shows at each +/// point, so the color has no one opacity to measure; a disabled mask draws nothing. +#[test] +fn a_color_drawn_through_an_opacity_mask_has_no_one_answer() { + let mut s = session(); + let rect = |s: &mut Session, color: &str| { + let id = s.execute("shape.rectangle", &json!({"x": 50, "y": 50, "width": 100, "height": 100})).unwrap()["id"].as_u64().unwrap(); + s.execute("paint.setFill", &json!({"color": color, "ids": [id]})).unwrap(); + id + }; + let masked = |s: &mut Session, owner: u64, color: &str| { + let m = rect(s, color); + s.execute("select.set", &json!({"ids": [owner, m]})).unwrap(); + s.execute("transparency.makeOpacityMask", &json!({})).unwrap(); + s.execute("select.set", &json!({"ids": [owner]})).unwrap(); + }; + let black = rect(&mut s, "#000000"); + masked(&mut s, black, "#000000"); + let e = s.execute("color.contrast", &json!({})).unwrap_err().to_string(); + assert!(e.contains("drawn through an opacity mask: give `color`"), "{e}"); + let e = s.execute("color.contrast", &json!({"against": "#ffffff", "opacity": 100})).unwrap_err().to_string(); + assert!(e.contains("drawn through an opacity mask"), "{e}"); + let given = s.execute("color.contrast", &json!({"color": "#000000", "against": "#ffffff"})).unwrap(); + assert!((ratio(&given) - 21.0).abs() < 1e-6, "{given}"); + s.execute("transparency.disableOpacityMask", &json!({})).unwrap(); + let r = s.execute("color.contrast", &json!({})).unwrap(); + assert!((ratio(&r) - 21.0).abs() < 1e-3, "a disabled mask leaves the black as it is: {r}"); + // A group's mask counts for the objects inside it. + let mut s = session(); + let inner = rect(&mut s, "#000000"); + let group = s.execute("object.group", &json!({"ids": [inner]})).unwrap()["id"].as_u64().unwrap(); + masked(&mut s, group, "#000000"); + s.execute("select.set", &json!({"ids": [inner]})).unwrap(); + let e = s.execute("color.contrast", &json!({})).unwrap_err().to_string(); + assert!(e.contains("drawn through an opacity mask"), "{e}"); +} + /// A background sampled across an edge averages two colors; the answer's `against` is exactly the /// background the ratio used, so giving it back answers the same ratio. #[test] diff --git a/crates/ui-egui/src/i18n/ca.tsv b/crates/ui-egui/src/i18n/ca.tsv index 2003912da1..8462bbd07d 100644 --- a/crates/ui-egui/src/i18n/ca.tsv +++ b/crates/ui-egui/src/i18n/ca.tsv @@ -6452,6 +6452,7 @@ liquify-list-end {0}, {1} {0} i {1} @msg the selected objects' colors differ: give `color` els colors dels objectes seleccionats són diferents: indiqueu `color` @msg the active fill or stroke has no color: give `color` l’emplenament o el traç actiu no té color: indiqueu `color` @msg the active fill or stroke is hidden: give `color` l’emplenament o el traç actiu està ocult: indiqueu `color` +@msg the active fill or stroke is drawn through an opacity mask: give `color` l’emplenament o el traç actiu es dibuixa a través d’una màscara d’opacitat: indiqueu `color` @msg nothing to align no hi ha res per alinear @msg nothing to distort no hi ha res per distorsionar @msg nothing to export: the document has no visible art (or turn on Use Artboards) no hi ha res per exportar: el document no té art visible (o activeu Utilitza els taulers) diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv index 984a1231a0..03657edb3a 100644 --- a/crates/ui-egui/src/i18n/cs.tsv +++ b/crates/ui-egui/src/i18n/cs.tsv @@ -5574,6 +5574,7 @@ liquify-list-end {0}, {1} {0} a {1} @msg the selected objects' colors differ: give `color` barvy vybraných objektů se liší: zadejte `color` @msg the active fill or stroke has no color: give `color` aktivní výplň nebo tah nemá barvu: zadejte `color` @msg the active fill or stroke is hidden: give `color` aktivní výplň nebo tah je skrytý: zadejte `color` +@msg the active fill or stroke is drawn through an opacity mask: give `color` aktivní výplň nebo tah je kreslen přes masku krytí: zadejte `color` @msg nothing selected is in a group nic z výběru není ve skupině @msg nothing to align není co zarovnat @msg nothing to distort není co deformovat diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv index e9f347494a..a055c2d01e 100644 --- a/crates/ui-egui/src/i18n/de.tsv +++ b/crates/ui-egui/src/i18n/de.tsv @@ -5178,6 +5178,7 @@ liquify-list-end {0}, {1} {0} und {1} @msg the selected objects' colors differ: give `color` die Farben der ausgewählten Objekte unterscheiden sich: geben Sie `color` an @msg the active fill or stroke has no color: give `color` die aktive Fläche oder Kontur hat keine Farbe: geben Sie `color` an @msg the active fill or stroke is hidden: give `color` die aktive Fläche oder Kontur ist ausgeblendet: geben Sie `color` an +@msg the active fill or stroke is drawn through an opacity mask: give `color` die aktive Fläche oder Kontur wird durch eine Deckkraftmaske gezeichnet: geben Sie `color` an @msg nothing selected is in a group nichts Ausgewähltes befindet sich in einer Gruppe @msg nothing to align nichts auszurichten @msg nothing to distort nichts zu verzerren diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv index 1ad742de98..1fc488dcc3 100644 --- a/crates/ui-egui/src/i18n/el.tsv +++ b/crates/ui-egui/src/i18n/el.tsv @@ -5234,6 +5234,7 @@ digits Malayalam Μαλαγιάλαμ @msg the selected objects' colors differ: give `color` τα χρώματα των επιλεγμένων αντικειμένων διαφέρουν: δώστε `color` @msg the active fill or stroke has no color: give `color` το ενεργό γέμισμα ή η πινελιά δεν έχει χρώμα: δώστε `color` @msg the active fill or stroke is hidden: give `color` το ενεργό γέμισμα ή η πινελιά είναι κρυφό: δώστε `color` +@msg the active fill or stroke is drawn through an opacity mask: give `color` το ενεργό γέμισμα ή η πινελιά σχεδιάζεται μέσα από μάσκα αδιαφάνειας: δώστε `color` @msg nothing selected is in a group τίποτα από τα επιλεγμένα δεν βρίσκεται σε ομάδα @msg nothing to align δεν υπάρχει τίποτα για στοίχιση @msg nothing to distort δεν υπάρχει τίποτα για παραμόρφωση diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv index 3bbc5d83e5..7a9c8fbf66 100644 --- a/crates/ui-egui/src/i18n/es.tsv +++ b/crates/ui-egui/src/i18n/es.tsv @@ -5284,6 +5284,7 @@ liquify-list-end {0}, {1} {0}, {1} @msg the selected objects' colors differ: give `color` los colores de los objetos seleccionados difieren: indique `color` @msg the active fill or stroke has no color: give `color` el relleno o trazo activo no tiene color: indique `color` @msg the active fill or stroke is hidden: give `color` el relleno o trazo activo está oculto: indique `color` +@msg the active fill or stroke is drawn through an opacity mask: give `color` el relleno o trazo activo se dibuja a través de una máscara de opacidad: indique `color` @msg nothing selected is in a group nada de lo seleccionado está en un grupo @msg nothing to align no hay nada que alinear @msg nothing to distort no hay nada que distorsionar diff --git a/crates/ui-egui/src/i18n/fi.tsv b/crates/ui-egui/src/i18n/fi.tsv index c3b378696e..564de8d071 100644 --- a/crates/ui-egui/src/i18n/fi.tsv +++ b/crates/ui-egui/src/i18n/fi.tsv @@ -5499,6 +5499,7 @@ liquify-list-end {0}, {1} {0} ja {1} @msg the selected objects' colors differ: give `color` valittujen objektien värit eroavat: anna `color` @msg the active fill or stroke has no color: give `color` aktiivisella täytöllä tai viivalla ei ole väriä: anna `color` @msg the active fill or stroke is hidden: give `color` aktiivinen täyttö tai viiva on piilotettu: anna `color` +@msg the active fill or stroke is drawn through an opacity mask: give `color` aktiivinen täyttö tai viiva piirretään peittävyysmaskin läpi: anna `color` @msg nothing selected is in a group mikään valituista ei ole ryhmässä @msg nothing to align ei tasattavaa @msg nothing to distort ei vääristettävää diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv index b161a497bc..7c410fc607 100644 --- a/crates/ui-egui/src/i18n/fr.tsv +++ b/crates/ui-egui/src/i18n/fr.tsv @@ -5241,6 +5241,7 @@ liquify-list-end {0}, {1} {0} et {1} @msg the selected objects' colors differ: give `color` les couleurs des objets sélectionnés diffèrent : indiquez `color` @msg the active fill or stroke has no color: give `color` le fond ou le contour actif n’a pas de couleur : indiquez `color` @msg the active fill or stroke is hidden: give `color` le fond ou le contour actif est masqué : indiquez `color` +@msg the active fill or stroke is drawn through an opacity mask: give `color` le fond ou le contour actif est dessiné à travers un masque d’opacité : indiquez `color` @msg nothing selected is in a group aucun élément sélectionné ne se trouve dans un groupe @msg nothing to align rien à aligner @msg nothing to distort rien à déformer diff --git a/crates/ui-egui/src/i18n/hi.tsv b/crates/ui-egui/src/i18n/hi.tsv index 91ff023f22..cc8f7d05ec 100644 --- a/crates/ui-egui/src/i18n/hi.tsv +++ b/crates/ui-egui/src/i18n/hi.tsv @@ -8074,6 +8074,7 @@ liquify-list-end {0}, {1} {0} और {1} @msg the selected objects' colors differ: give `color` चुने गए ऑब्जेक्ट्स के रंग अलग-अलग हैं: `color` दें @msg the active fill or stroke has no color: give `color` सक्रिय फ़िल या स्ट्रोक में कोई रंग नहीं है: `color` दें @msg the active fill or stroke is hidden: give `color` सक्रिय फ़िल या स्ट्रोक छिपा हुआ है: `color` दें +@msg the active fill or stroke is drawn through an opacity mask: give `color` सक्रिय फ़िल या स्ट्रोक ओपेसिटी मास्क से होकर बनाया जाता है: `color` दें @msg nothing selected is in a group कुछ भी नहीं चुना गया है एक समूह में @msg nothing to align संरेखित करने के लिए कुछ नहीं @msg nothing to bind बाध्य करने के लिए कुछ नहीं diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv index 67adc21bb2..47d44c8538 100644 --- a/crates/ui-egui/src/i18n/hu.tsv +++ b/crates/ui-egui/src/i18n/hu.tsv @@ -5956,6 +5956,7 @@ liquify-list-end {0}, {1} {0} és {1} @msg the selected objects' colors differ: give `color` a kijelölt objektumok színei eltérnek: adja meg a `color` értékét @msg the active fill or stroke has no color: give `color` az aktív kitöltésnek vagy körvonalnak nincs színe: adja meg a `color` értékét @msg the active fill or stroke is hidden: give `color` az aktív kitöltés vagy körvonal rejtett: adja meg a `color` értékét +@msg the active fill or stroke is drawn through an opacity mask: give `color` az aktív kitöltés vagy körvonal átlátszósági maszkon keresztül rajzolódik: adja meg a `color` értékét @msg nothing selected is in a group a kijelölésből semmi sincs csoportban @msg nothing to align nincs mit igazítani @msg nothing to distort nincs mit torzítani diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv index 8f54510a14..f80ad5731a 100644 --- a/crates/ui-egui/src/i18n/it.tsv +++ b/crates/ui-egui/src/i18n/it.tsv @@ -5314,6 +5314,7 @@ liquify-list-end {0}, {1} {0} e {1} @msg the selected objects' colors differ: give `color` i colori degli oggetti selezionati sono diversi: indica `color` @msg the active fill or stroke has no color: give `color` il riempimento o la traccia attivi non hanno colore: indica `color` @msg the active fill or stroke is hidden: give `color` il riempimento o la traccia attivi sono nascosti: indica `color` +@msg the active fill or stroke is drawn through an opacity mask: give `color` il riempimento o la traccia attivi sono disegnati attraverso una maschera di opacità: indica `color` @msg nothing selected is in a group nessun elemento selezionato si trova in un gruppo @msg nothing to align niente da allineare @msg nothing to distort niente da distorcere diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv index e2bc655235..10671fa6d4 100644 --- a/crates/ui-egui/src/i18n/ja.tsv +++ b/crates/ui-egui/src/i18n/ja.tsv @@ -5756,6 +5756,7 @@ liquify-list-end {0}, {1} {0}、{1} @msg the selected objects' colors differ: give `color` 選択したオブジェクトのカラーが異なります:`color` を指定してください @msg the active fill or stroke has no color: give `color` アクティブな塗りまたは線にカラーがありません:`color` を指定してください @msg the active fill or stroke is hidden: give `color` アクティブな塗りまたは線が非表示です:`color` を指定してください +@msg the active fill or stroke is drawn through an opacity mask: give `color` アクティブな塗りまたは線は不透明マスクを通して描画されます:`color` を指定してください @msg nothing selected is in a group 選択したオブジェクトはどれもグループ内にありません @msg the {tool} tool has no options {tool} ツールにはオプションがありません @msg unknown tool `{tool}` `{tool}` は不明なツールです diff --git a/crates/ui-egui/src/i18n/ka.tsv b/crates/ui-egui/src/i18n/ka.tsv index 556cac8bce..a995f5dfce 100644 --- a/crates/ui-egui/src/i18n/ka.tsv +++ b/crates/ui-egui/src/i18n/ka.tsv @@ -7045,6 +7045,7 @@ font-technology Variable ცვლადი @msg the selected objects' colors differ: give `color` მონიშნული ობიექტების ფერები განსხვავდება: მიუთითეთ `color` @msg the active fill or stroke has no color: give `color` აქტიურ შევსებას ან კონტურს ფერი არ აქვს: მიუთითეთ `color` @msg the active fill or stroke is hidden: give `color` აქტიური შევსება ან კონტური დამალულია: მიუთითეთ `color` +@msg the active fill or stroke is drawn through an opacity mask: give `color` აქტიური შევსება ან კონტური იხატება გაუმჭვირვალობის ნიღბით: მიუთითეთ `color` @msg nothing selected is in a group მონიშნულთაგან არაფერია ჯგუფში @msg nothing to align გასასწორებელი არაფერია @msg nothing to distort დასადეფორმირებელი არაფერია diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv index 26d9643570..180bca4403 100644 --- a/crates/ui-egui/src/i18n/ko.tsv +++ b/crates/ui-egui/src/i18n/ko.tsv @@ -5683,6 +5683,7 @@ liquify-list-end {0}, {1} {0} 및 {1} @msg the selected objects' colors differ: give `color` 선택한 개체의 색상이 서로 다릅니다: `color`를 지정하세요 @msg the active fill or stroke has no color: give `color` 활성 칠 또는 획에 색상이 없습니다: `color`를 지정하세요 @msg the active fill or stroke is hidden: give `color` 활성 칠 또는 획이 숨겨져 있습니다: `color`를 지정하세요 +@msg the active fill or stroke is drawn through an opacity mask: give `color` 활성 칠 또는 획이 불투명 마스크를 통해 그려집니다: `color`를 지정하세요 @msg nothing selected is in a group 선택한 항목 중 그룹에 속한 항목이 없습니다 @msg the {tool} tool has no options {tool} 도구에는 옵션이 없습니다 @msg unknown tool `{tool}` 알 수 없는 도구 `{tool}` diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv index c18a8bbacf..5c21102547 100644 --- a/crates/ui-egui/src/i18n/nl.tsv +++ b/crates/ui-egui/src/i18n/nl.tsv @@ -5616,6 +5616,7 @@ imageTrace Outline Contour @msg the selected objects' colors differ: give `color` de kleuren van de geselecteerde objecten verschillen: geef `color` op @msg the active fill or stroke has no color: give `color` de actieve vulling of lijn heeft geen kleur: geef `color` op @msg the active fill or stroke is hidden: give `color` de actieve vulling of lijn is verborgen: geef `color` op +@msg the active fill or stroke is drawn through an opacity mask: give `color` de actieve vulling of lijn wordt door een dekkingmasker getekend: geef `color` op @msg nothing selected is in a group niets van de selectie zit in een groep @msg nothing to align niets om uit te lijnen @msg nothing to distort niets om te vervormen diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv index 4472fc363e..a8dfe57fc3 100644 --- a/crates/ui-egui/src/i18n/pl.tsv +++ b/crates/ui-egui/src/i18n/pl.tsv @@ -5401,6 +5401,7 @@ liquify-list-end {0}, {1} {0} i {1} @msg the selected objects' colors differ: give `color` kolory zaznaczonych obiektów się różnią: podaj `color` @msg the active fill or stroke has no color: give `color` aktywne wypełnienie lub obrys nie ma koloru: podaj `color` @msg the active fill or stroke is hidden: give `color` aktywne wypełnienie lub obrys jest ukryte: podaj `color` +@msg the active fill or stroke is drawn through an opacity mask: give `color` aktywne wypełnienie lub obrys jest rysowane przez maskę krycia: podaj `color` @msg nothing selected is in a group nic z zaznaczenia nie należy do grupy @msg nothing to align nie ma czego wyrównać @msg nothing to distort nie ma czego zniekształcić diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv index 605931d7e3..1925c200dd 100644 --- a/crates/ui-egui/src/i18n/pt-br.tsv +++ b/crates/ui-egui/src/i18n/pt-br.tsv @@ -4547,6 +4547,7 @@ axis Both Ambos @msg the selected objects' colors differ: give `color` as cores dos objetos selecionados são diferentes: informe `color` @msg the active fill or stroke has no color: give `color` o preenchimento ou traçado ativo não tem cor: informe `color` @msg the active fill or stroke is hidden: give `color` o preenchimento ou traçado ativo está oculto: informe `color` +@msg the active fill or stroke is drawn through an opacity mask: give `color` o preenchimento ou traçado ativo é desenhado através de uma máscara de opacidade: informe `color` @msg nothing selected is in a group nada do que está selecionado está em um grupo @msg nothing to align nada para alinhar @msg nothing to distort nada para distorcer diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv index 4437144d2f..5369e14177 100644 --- a/crates/ui-egui/src/i18n/ru.tsv +++ b/crates/ui-egui/src/i18n/ru.tsv @@ -5303,6 +5303,7 @@ liquify-list-end {0}, {1} {0} и {1} @msg the selected objects' colors differ: give `color` цвета выделенных объектов различаются: укажите `color` @msg the active fill or stroke has no color: give `color` у активной заливки или обводки нет цвета: укажите `color` @msg the active fill or stroke is hidden: give `color` активная заливка или обводка скрыта: укажите `color` +@msg the active fill or stroke is drawn through an opacity mask: give `color` активная заливка или обводка рисуется через непрозрачную маску: укажите `color` @msg nothing selected is in a group ничего из выделенного не находится в группе @msg nothing to align нечего выравнивать @msg nothing to distort нечего искажать diff --git a/crates/ui-egui/src/i18n/sv.tsv b/crates/ui-egui/src/i18n/sv.tsv index 97e38d4420..195552b7c5 100644 --- a/crates/ui-egui/src/i18n/sv.tsv +++ b/crates/ui-egui/src/i18n/sv.tsv @@ -5172,6 +5172,7 @@ liquify-list-end {0}, {1} {0} och {1} @msg the selected objects' colors differ: give `color` de markerade objektens färger skiljer sig: ange `color` @msg the active fill or stroke has no color: give `color` den aktiva fyllningen eller linjen har ingen färg: ange `color` @msg the active fill or stroke is hidden: give `color` den aktiva fyllningen eller linjen är dold: ange `color` +@msg the active fill or stroke is drawn through an opacity mask: give `color` den aktiva fyllningen eller linjen ritas genom en opacitetsmask: ange `color` @msg nothing selected is in a group inget av det markerade ligger i en grupp @msg nothing to align inget att justera @msg nothing to distort inget att förvränga diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv index fbe1c4836f..f753e5f949 100644 --- a/crates/ui-egui/src/i18n/tr.tsv +++ b/crates/ui-egui/src/i18n/tr.tsv @@ -5018,6 +5018,7 @@ liquify-list-end {0}, {1} {0} ve {1} @msg the selected objects' colors differ: give `color` seçili nesnelerin renkleri farklı: `color` belirtin @msg the active fill or stroke has no color: give `color` etkin dolgu veya konturun rengi yok: `color` belirtin @msg the active fill or stroke is hidden: give `color` etkin dolgu veya kontur gizli: `color` belirtin +@msg the active fill or stroke is drawn through an opacity mask: give `color` etkin dolgu veya kontur bir opaklık maskesi üzerinden çiziliyor: `color` belirtin @msg nothing selected is in a group seçilenlerin hiçbiri bir grupta değil @msg nothing to align hizalanacak hiçbir şey yok @msg nothing to distort çarpıtılacak hiçbir şey yok diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv index 6bb0ea937d..54e81487df 100644 --- a/crates/ui-egui/src/i18n/uk.tsv +++ b/crates/ui-egui/src/i18n/uk.tsv @@ -5298,6 +5298,7 @@ liquify-list-end {0}, {1} {0} і {1} @msg the selected objects' colors differ: give `color` кольори виділених об’єктів відрізняються: укажіть `color` @msg the active fill or stroke has no color: give `color` активна заливка чи обведення не має кольору: укажіть `color` @msg the active fill or stroke is hidden: give `color` активна заливка чи обведення приховані: укажіть `color` +@msg the active fill or stroke is drawn through an opacity mask: give `color` активна заливка чи обведення малюються крізь маску непрозорості: укажіть `color` @msg nothing selected is in a group нічого з виділеного не перебуває в групі @msg nothing to align нічого вирівнювати @msg nothing to distort нічого спотворювати diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv index 6a9c0e23f9..60c207abbf 100644 --- a/crates/ui-egui/src/i18n/vi.tsv +++ b/crates/ui-egui/src/i18n/vi.tsv @@ -5653,6 +5653,7 @@ liquify-list-end {0}, {1} {0} và {1} @msg the selected objects' colors differ: give `color` màu của các đối tượng đã chọn khác nhau: hãy cung cấp `color` @msg the active fill or stroke has no color: give `color` phần tô hoặc nét đang hoạt động không có màu: hãy cung cấp `color` @msg the active fill or stroke is hidden: give `color` phần tô hoặc nét đang hoạt động bị ẩn: hãy cung cấp `color` +@msg the active fill or stroke is drawn through an opacity mask: give `color` phần tô hoặc nét đang hoạt động được vẽ qua mặt nạ độ mờ: hãy cung cấp `color` @msg nothing selected is in a group không mục nào được chọn nằm trong nhóm @msg nothing to align không có gì để căn chỉnh @msg nothing to distort không có gì để làm méo diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv index 2e1805d395..c03bea15f0 100644 --- a/crates/ui-egui/src/i18n/zh-hans.tsv +++ b/crates/ui-egui/src/i18n/zh-hans.tsv @@ -5430,6 +5430,7 @@ liquify-list-end {0}, {1} {0}和{1} @msg the selected objects' colors differ: give `color` 所选对象的颜色不同:请提供 `color` @msg the active fill or stroke has no color: give `color` 现用填色或描边没有颜色:请提供 `color` @msg the active fill or stroke is hidden: give `color` 现用填色或描边已隐藏:请提供 `color` +@msg the active fill or stroke is drawn through an opacity mask: give `color` 现用填色或描边通过不透明度蒙版绘制:请提供 `color` @msg nothing selected is in a group 所选对象均不在编组中 @msg the {tool} tool has no options {tool} 工具没有选项 @msg unknown tool `{tool}` 未知工具 `{tool}` diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv index 03a3b86c18..500e682180 100644 --- a/crates/ui-egui/src/i18n/zh-hant.tsv +++ b/crates/ui-egui/src/i18n/zh-hant.tsv @@ -2910,6 +2910,7 @@ liquify-list-end {0}, {1} {0}和{1} @msg the selected objects' colors differ: give `color` 所選物件的顏色不同:請提供 `color` @msg the active fill or stroke has no color: give `color` 作用中的填色或筆畫沒有顏色:請提供 `color` @msg the active fill or stroke is hidden: give `color` 作用中的填色或筆畫已隱藏:請提供 `color` +@msg the active fill or stroke is drawn through an opacity mask: give `color` 作用中的填色或筆畫透過不透明度遮色片繪製:請提供 `color` @msg nothing selected is in a group 選取的物件都不在群組中 @msg the {tool} tool has no options {tool} 工具沒有選項 @msg unknown tool `{tool}` 未知的工具 `{tool}` diff --git a/docs/mcp.md b/docs/mcp.md index 336b667176..bbbde91c46 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1140,7 +1140,9 @@ is drawn); a picked object of a dynamic symbol instance hides only itself, and t These are errors: `"below"` with nothing selected; a "?" proxy (hidden objects count there, as in the Color panel); selected objects that draw one color with different blend modes, or at different opacities without `opacity` (with `"below"`, also in different groups or layers that are translucent, have a blend mode or isolate their blending), -where hidden objects do not count; and a proxy of None, a pattern or a hidden row without `color`. `against` in the +where hidden objects do not count; a proxy of None, a pattern or a hidden row without `color`; and without `color`, a +proxy's object drawn through an opacity mask that is not disabled, its own or that of a group, layer or instance +around it, since the mask sets how much of the color shows at each point. `against` in the answer is the background as a working RGB `#rrggbb`, the form `against` takes; the sampled background is rounded to 8 bits, so giving it back answers the same ratio, except when `opacity` is omitted and a group or layer around the object is translucent, has a blend mode or isolates its blending, or the measured row is translucent or blends over