mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-01 22:26:49 -06:00
Integration: #1451 screened outer glows and blended shadows isolate the spread from the paper
This commit is contained in:
@@ -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