mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
PDF export: warn about tiles only for a pattern swatch that exists
This commit is contained in:
@@ -1353,11 +1353,13 @@ impl Exporter<'_> {
|
|||||||
let doc = self.doc;
|
let doc = self.doc;
|
||||||
match p {
|
match p {
|
||||||
Paint::Pattern { pattern, xf } => {
|
Paint::Pattern { pattern, xf } => {
|
||||||
|
if let Some(def) = doc.pattern(pattern) {
|
||||||
self.warn("pattern fills nested more than 4 patterns deep, or with tiles too large for PDF, are written as their tiles");
|
self.warn("pattern fills nested more than 4 patterns deep, or with tiles too large for PDF, are written as their tiles");
|
||||||
for inst in doc.pattern(pattern).map(|def| def.instances_in(*xf, area)).unwrap_or_default() {
|
for inst in def.instances_in(*xf, area) {
|
||||||
self.node(s, &inst, area, true);
|
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),
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user