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.grandin@collabora.co.uk>
diff --git a/drawinglayer/source/primitive2d/glowprimitive2d.cxx b/drawinglayer/source/primitive2d/glowprimitive2d.cxx
index 8504b1a..c49ea68 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);