drawinglayer/source/primitive2d/glowprimitive2d.cxx |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

New commits:
commit c3073c81223e9bf0f499d9fd3cfa8a7e8cb497a5
Author:     Patrick Luby <plub...@neooffice.org>
AuthorDate: Mon Oct 9 11:38:00 2023 -0400
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Oct 9 20:56:33 2023 +0200

    tdf#157502 and tdf#157652 invert alpha mask
    
    Due to the switch from transparency to alpha in commit
    81994cb2b8b32453a92bcb011830fcb884f22ff3, invert the alpha
    mask.
    
    Change-Id: Ib6df3523be36ba5d5aaf3887557d4a6a8fa6098c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157731
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/drawinglayer/source/primitive2d/glowprimitive2d.cxx 
b/drawinglayer/source/primitive2d/glowprimitive2d.cxx
index 8504b1a902a8..c49ea68c9089 100644
--- a/drawinglayer/source/primitive2d/glowprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/glowprimitive2d.cxx
@@ -205,9 +205,15 @@ void GlowPrimitive2D::create2DDecomposition(
             // When blurring a sharp boundary (our case), it gets 50% of 
original intensity, and
             // fades to both sides by the blur radius; thus blur radius is 
half of glow radius.
             // Consider glow transparency (initial transparency near the 
object edge)
-            const AlphaMask mask(ProcessAndBlurAlphaMask(aAlpha, 
fDiscreteGlowRadius * fScale / 2.0,
-                                                         fDiscreteGlowRadius * 
fScale / 2.0,
-                                                         255 - 
getGlowColor().GetAlpha()));
+            AlphaMask mask(ProcessAndBlurAlphaMask(aAlpha, fDiscreteGlowRadius 
* fScale / 2.0,
+                                                   fDiscreteGlowRadius * 
fScale / 2.0,
+                                                   255 - 
getGlowColor().GetAlpha()));
+
+            // tdf#157502 and tdf#157652 invert alpha mask
+            // Due to the switch from transparency to alpha in commit
+            // 81994cb2b8b32453a92bcb011830fcb884f22ff3, invert the alpha
+            // mask.
+            mask.Invert();
 
             // The end result is the bitmap filled with glow color and blurred 
8-bit alpha mask
             Bitmap bmp(aAlpha.GetSizePixel(), vcl::PixelFormat::N24_BPP);

Reply via email to