From 938d6fc052bbe59295039ff4d6931f0d4ec94576 Mon Sep 17 00:00:00 2001 From: Chad Brokaw Date: Thu, 19 May 2022 16:59:14 -0400 Subject: [PATCH] Add clip mode for blends This matches the changes in the fix_blends PR. --- piet-scene/src/scene/blend.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/piet-scene/src/scene/blend.rs b/piet-scene/src/scene/blend.rs index 09b6e50..d6aa080 100644 --- a/piet-scene/src/scene/blend.rs +++ b/piet-scene/src/scene/blend.rs @@ -34,6 +34,8 @@ pub enum Mix { Saturation = 13, Color = 14, Luminosity = 15, + // Clip is the same as normal, but doesn't always push a blend group. + Clip = 128, } /// Defines the layer composition function for a blend operation. @@ -76,7 +78,7 @@ impl Blend { impl Default for Blend { fn default() -> Self { Self { - mix: Mix::Normal, + mix: Mix::Clip, compose: Compose::SrcOver, } }