diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-12-01 13:27:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-12-06 09:51:17 +0100 |
commit | aa7d1c8f1411fe35465f265259cf1082adf05aea (patch) | |
tree | 4addfc59d01b1fd5470d660f5c48abbd28990fde /drawinglayer | |
parent | 0f82e9d42822e627edd1fb3b3c87e1f8a22136a4 (diff) |
make AlphaMask separate from Bitmap
Having it subclass Bitmap encourages confusion in passing it around, and
I need the extra type-safety for my work on merged-alpha
Change-Id: I35819f9b8ee609cbdaf865563c78531e397b529b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160235
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/primitive2d/GlowSoftEgdeShadowTools.cxx | 2 | ||||
-rw-r--r-- | drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drawinglayer/source/primitive2d/GlowSoftEgdeShadowTools.cxx b/drawinglayer/source/primitive2d/GlowSoftEgdeShadowTools.cxx index ee4b6d4cb14f..e1dcac421344 100644 --- a/drawinglayer/source/primitive2d/GlowSoftEgdeShadowTools.cxx +++ b/drawinglayer/source/primitive2d/GlowSoftEgdeShadowTools.cxx @@ -40,7 +40,7 @@ AlphaMask ProcessAndBlurAlphaMask(const AlphaMask& rMask, double fErodeDilateRad // Only completely white pixels on the initial mask must be considered for transparency. Any // other color must be treated as black. This creates 1-bit B&W bitmap. - BitmapEx mask(bConvertTo1Bit ? tmpMask.CreateMask(COL_WHITE) : tmpMask); + BitmapEx mask(bConvertTo1Bit ? tmpMask.GetBitmap().CreateMask(COL_WHITE) : tmpMask.GetBitmap()); // Scaling down increases performance without noticeable quality loss. Additionally, // current blur implementation can only handle blur radius between 2 and 254. diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx index e5658f6cf0d3..6a0dd7e070ee 100644 --- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx @@ -283,7 +283,7 @@ namespace drawinglayer::primitive2d } else { - BitmapEx aExpandVisibilityMask(aAlphaMask, aAlphaMask); + BitmapEx aExpandVisibilityMask(aAlphaMask.GetBitmap(), aAlphaMask); maVirtualDeviceMask->DrawBitmapEx(rAnimationFrame.maPositionPixel, aExpandVisibilityMask); } @@ -306,7 +306,7 @@ namespace drawinglayer::primitive2d } else { - BitmapEx aExpandVisibilityMask(rMask, rMask); + BitmapEx aExpandVisibilityMask(rMask.GetBitmap(), rMask); maVirtualDeviceMask->DrawBitmapEx(rAnimationFrame.maPositionPixel, aExpandVisibilityMask); } @@ -315,7 +315,7 @@ namespace drawinglayer::primitive2d case Disposal::Previous: { maVirtualDevice->DrawBitmapEx(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmapEx); - BitmapEx aExpandVisibilityMask(rAnimationFrame.maBitmapEx.GetAlphaMask(), rAnimationFrame.maBitmapEx.GetAlphaMask()); + BitmapEx aExpandVisibilityMask(rAnimationFrame.maBitmapEx.GetAlphaMask().GetBitmap(), rAnimationFrame.maBitmapEx.GetAlphaMask()); maVirtualDeviceMask->DrawBitmapEx(rAnimationFrame.maPositionPixel, aExpandVisibilityMask); break; } |