diff options
author | Patrick Luby <plubius@neooffice.org> | 2023-10-09 11:38:00 -0400 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-10-09 20:56:33 +0200 |
commit | c3073c81223e9bf0f499d9fd3cfa8a7e8cb497a5 (patch) | |
tree | 9edfc4fa0396e339e26271844c8bc72506a7e3b1 /drawinglayer/source/primitive2d | |
parent | 0855520cced8662ba0a8cfdaccbe55a812b13c60 (diff) |
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>
Diffstat (limited to 'drawinglayer/source/primitive2d')
-rw-r--r-- | drawinglayer/source/primitive2d/glowprimitive2d.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
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); |