diff options
author | Patrick Luby <plubius@neooffice.org> | 2023-09-12 10:51:22 -0400 |
---|---|---|
committer | Patrick Luby <plubius@neooffice.org> | 2023-09-12 20:51:48 +0200 |
commit | 798de29936b9a0c618bd31629936a4c836429e90 (patch) | |
tree | 92e1ed88e503122645f84c9dc7d7d858eca56057 /drawinglayer | |
parent | 0da88ee88255083ec9557ff25005a745dcdbef14 (diff) |
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 <plubius@neooffice.org>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/primitive2d/softedgeprimitive2d.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
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); |