From 79dade24e5ebc2bded2bc1279d48990374304280 Mon Sep 17 00:00:00 2001 From: Dennis Kobert Date: Thu, 13 Apr 2023 10:44:33 +0200 Subject: [PATCH] Fix opacity blending on colored brush strokes (#1119) Make apply opacity function use associated alpha --- node-graph/gcore/src/raster/color.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node-graph/gcore/src/raster/color.rs b/node-graph/gcore/src/raster/color.rs index 1c555984..a649d0f5 100644 --- a/node-graph/gcore/src/raster/color.rs +++ b/node-graph/gcore/src/raster/color.rs @@ -608,7 +608,7 @@ impl Color { } pub fn apply_opacity(&self, opacity: f32) -> Self { - Self::from_rgbaf32_unchecked(self.r(), self.g(), self.b(), self.a() * opacity) + Self::from_rgbaf32_unchecked(self.r() * opacity, self.g() * opacity, self.b() * opacity, self.a() * opacity) } pub fn to_associated_alpha(&self, alpha: f32) -> Self {