PDF export: warn about tiles only for a pattern swatch that exists

This commit is contained in:
bflatastic
2026-10-24 05:59:04 +07:00
parent a564fe5d8e
commit 3225315ce1
+5 -3
View File
@@ -1353,9 +1353,11 @@ impl Exporter<'_> {
let doc = self.doc; let doc = self.doc;
match p { match p {
Paint::Pattern { pattern, xf } => { Paint::Pattern { pattern, xf } => {
self.warn("pattern fills nested more than 4 patterns deep, or with tiles too large for PDF, are written as their tiles"); if let Some(def) = doc.pattern(pattern) {
for inst in doc.pattern(pattern).map(|def| def.instances_in(*xf, area)).unwrap_or_default() { self.warn("pattern fills nested more than 4 patterns deep, or with tiles too large for PDF, are written as their tiles");
self.node(s, &inst, area, true); for inst in def.instances_in(*xf, area) {
self.node(s, &inst, area, true);
}
} }
} }
Paint::Gradient(g) => self.field_image(s, g, bounds, area, fill), Paint::Gradient(g) => self.field_image(s, g, bounds, area, fill),