mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-10 20:41:55 +00:00
Integration: #1451 screened outer glows and blended shadows isolate the spread from the paper
This commit is contained in:
1 parent
e040354eb4
commit
7d16fffb39
2 files changed
+22
-1
No files matched your search
@@ -202,7 +202,11 @@ pub(crate) fn overprints(f: &Frame, swatch: &str, tint: f32, flag: bool) -> bool
|
||||
pub(crate) fn spread_blends(doc: &Document, sp: &designcraft_doc::Spread) -> bool {
|
||||
let blends = |it: &Item| {
|
||||
let mut any = false;
|
||||
it.walk(&mut |i| any |= i.blend != Default::default());
|
||||
// A screened glow or a shadow with a blend mode blends with the objects below too, not the paper.
|
||||
let fx_blends = |e: &designcraft_doc::Effects| {
|
||||
(e.outer_glow.on && e.outer_glow.mode != Default::default()) || (e.drop_shadow.on && e.drop_shadow.mode != Default::default())
|
||||
};
|
||||
it.walk(&mut |i| any |= i.blend != Default::default() || fx_blends(&i.effects));
|
||||
any
|
||||
};
|
||||
sp.items.iter().any(|i| blends(i)) || doc.parents.iter().any(|p| p.items.iter().any(|i| blends(i)))
|
||||
|
||||
Reference in new issue
Block a user