drawinglayer/source/primitive2d/softedgeprimitive2d.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 798de29936b9a0c618bd31629936a4c836429e90
Author:     Patrick Luby <plub...@neooffice.org>
AuthorDate: Tue Sep 12 10:51:22 2023 -0400
Commit:     Patrick Luby <plub...@neooffice.org>
CommitDate: Tue Sep 12 20:51:48 2023 +0200

    tdf#157086 invert the blur mask instead of the alpha mask
    
    An invert is needed to fix tdf#156808 but inverting the alpha mask
    causes tdf#157086 so invert the blur mask instead.
    
    Change-Id: Id695d04f008932caadb0fc2b477b0a4b152fa66c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156854
    Tested-by: Jenkins
    Reviewed-by: Patrick Luby <plub...@neooffice.org>

diff --git a/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx 
b/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
index 1da2f688d739..89e1fd545fcb 100644
--- a/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx
@@ -199,10 +199,13 @@ void SoftEdgePrimitive2D::create2DDecomposition(
         AlphaMask aMask(aBitmapEx.GetAlphaMask());
         if (aMask.IsEmpty()) // There is no mask, fully opaque
             break;
-        const AlphaMask 
blurMask(drawinglayer::primitive2d::ProcessAndBlurAlphaMask(
+        AlphaMask blurMask(drawinglayer::primitive2d::ProcessAndBlurAlphaMask(
             aMask, -fDiscreteSoftRadius * fScale, fDiscreteSoftRadius * 
fScale, 0));
+        // tdf#157086 invert the blur mask instead of the alpha mask
+        // An invert is needed to fix tdf#156808 but inverting the alpha mask
+        // causes tdf#157086 so invert the blur mask instead.
+        blurMask.Invert();
         aMask.BlendWith(blurMask);
-        aMask.Invert();
 
         // The end result is the original bitmap with blurred 8-bit alpha mask
         BitmapEx result(aBitmapEx.GetBitmap(), aMask);

Reply via email to