VectorCraft: An open-source, vector art tool written by scratch in pure Rust
Overprint Preview: overprinting characters draw with Darken too (#2415)
bflatastic2a3efa02f27c
diff --git a/crates/render/src/lib.rs b/crates/render/src/lib.rsindex 5791bd49b..24bf5a0e0 100644--- a/crates/render/src/lib.rs+++ b/crates/render/src/lib.rs@@ -1773,12 +1773,12 @@ impl Renderer {return;}let tb = t.xf.transform_rect_bbox(g.bounds);- // Overprinting characters multiply per draw, like overprinting fills and strokes+ // Overprinting characters darken per draw, like overprinting fills and strokes// ([`proof`]); the object blend mode is Normal here or applied by an enclosing layer.let overprints = proof::overprints(f.opts);let overprint = |ctx: &mut RenderContext, on: bool| {if overprints {- ctx.set_blend_mode(if on { blend_mode(vectorcraft_color::BlendMode::Multiply) } else { BlendMode::default() });+ ctx.set_blend_mode(if on { blend_mode(vectorcraft_color::BlendMode::Darken) } else { BlendMode::default() });}};// The object's own fills and strokes paint the whole outline: those below the Charactersdiff --git a/crates/render/src/proof.rs b/crates/render/src/proof.rsindex 86c0319ed..e308e2b4f 100644--- a/crates/render/src/proof.rs+++ b/crates/render/src/proof.rs@@ -103,7 +103,7 @@ impl PartialEq for Plates {}}-/// What [`prepare`] does to the fills and strokes of each node: overprinting ones multiply+/// What [`prepare`] does to the fills and strokes of each node: overprinting ones darken/// ([`darken_overprints`]), and with Separations Preview every color shows as the visible plates/// print it ([`plate_color`]).struct How<'a> {