diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-09 15:58:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-01-11 08:57:13 +0000 |
commit | cfb2a587bc59d2a0ff520dd09393f898506055d6 (patch) | |
tree | 851ad7f79b1e453d74d3eba38047b1b70a6f7917 /drawinglayer | |
parent | b8c66c7f9b25ff88994aef92f56f61f176dc8a6f (diff) |
rename BitmapEx::GetAlpha to GetAlphaMask
to ease the reading of code related to an upcoming patch to convert
transparency to alpha, since there is already a GetAlpha in Color.
Change-Id: I1af0f8f6dd94acfe4673c8556c7aff6c20da3f7a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145209
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
5 files changed, 9 insertions, 9 deletions
diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx index 344e7328a84f..8e0c8a980f33 100644 --- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx @@ -257,7 +257,7 @@ namespace drawinglayer::primitive2d case Disposal::Not: { maVirtualDevice->DrawBitmapEx(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmapEx); - Bitmap aAlphaMask = rAnimationFrame.maBitmapEx.GetAlpha(); + Bitmap aAlphaMask = rAnimationFrame.maBitmapEx.GetAlphaMask(); if (aAlphaMask.IsEmpty()) { @@ -277,7 +277,7 @@ namespace drawinglayer::primitive2d case Disposal::Back: { // #i70772# react on no mask, for primitives, too. - const Bitmap & rMask(rAnimationFrame.maBitmapEx.GetAlpha()); + const Bitmap & rMask(rAnimationFrame.maBitmapEx.GetAlphaMask()); const Bitmap & rContent(rAnimationFrame.maBitmapEx.GetBitmap()); maVirtualDeviceMask->Erase(); @@ -301,7 +301,7 @@ namespace drawinglayer::primitive2d case Disposal::Previous: { maVirtualDevice->DrawBitmapEx(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmapEx); - BitmapEx aExpandVisibilityMask(rAnimationFrame.maBitmapEx.GetAlpha(), rAnimationFrame.maBitmapEx.GetAlpha()); + BitmapEx aExpandVisibilityMask(rAnimationFrame.maBitmapEx.GetAlphaMask(), rAnimationFrame.maBitmapEx.GetAlphaMask()); maVirtualDeviceMask->DrawBitmapEx(rAnimationFrame.maPositionPixel, aExpandVisibilityMask); break; } diff --git a/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx b/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx index ef34f0eb40e1..ecf4e48338d6 100644 --- a/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/softedgeprimitive2d.cxx @@ -196,7 +196,7 @@ void SoftEdgePrimitive2D::create2DDecomposition( } // Get the Alpha and use as base to blur and apply the effect - AlphaMask aMask(aBitmapEx.GetAlpha()); + AlphaMask aMask(aBitmapEx.GetAlphaMask()); const AlphaMask blurMask(drawinglayer::primitive2d::ProcessAndBlurAlphaMask( aMask, -fDiscreteSoftRadius * fScale, fDiscreteSoftRadius * fScale, 0)); aMask.BlendWith(blurMask); diff --git a/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx b/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx index df9147d6eb56..53261229a0d7 100644 --- a/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/cairopixelprocessor2d.cxx @@ -173,7 +173,7 @@ std::vector<sal_uInt8> createBitmapData(const BitmapEx& rBitmapEx) if (bAlpha) { - Bitmap aSrcAlpha(rBitmapEx.GetAlpha().GetBitmap()); + Bitmap aSrcAlpha(rBitmapEx.GetAlphaMask().GetBitmap()); Bitmap::ScopedReadAccess pReadAccess(const_cast<Bitmap&>(rBitmapEx.GetBitmap())); Bitmap::ScopedReadAccess pAlphaReadAccess(aSrcAlpha.AcquireReadAccess(), aSrcAlpha); const tools::Long nHeight(pReadAccess->Height()); diff --git a/drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx b/drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx index 3bced719902c..35cc011385aa 100644 --- a/drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/d2dpixelprocessor2d.cxx @@ -400,7 +400,7 @@ sal::systools::COMReference<ID2D1Bitmap> createB2DBitmap(const BitmapEx& rBitmap if (bAlpha) { - Bitmap aSrcAlpha(rBitmapEx.GetAlpha().GetBitmap()); + Bitmap aSrcAlpha(rBitmapEx.GetAlphaMask().GetBitmap()); Bitmap::ScopedReadAccess pReadAccess(const_cast<Bitmap&>(rBitmapEx.GetBitmap())); Bitmap::ScopedReadAccess pAlphaReadAccess(aSrcAlpha.AcquireReadAccess(), aSrcAlpha); const tools::Long nHeight(pReadAccess->Height()); @@ -481,7 +481,7 @@ getOrCreateB2DBitmap(sal::systools::COMReference<ID2D1RenderTarget>& rRT, const // check data validity for associated Alpha if (pSystemDependentData_ID2D1Bitmap && pSystemDependentData_ID2D1Bitmap->getAssociatedAlpha() - != rBitmapEx.GetAlpha().GetBitmap().ImplGetSalBitmap()) + != rBitmapEx.GetAlphaMask().GetBitmap().ImplGetSalBitmap()) { // AssociatedAlpha did change, data invalid pSystemDependentData_ID2D1Bitmap.reset(); @@ -497,7 +497,7 @@ getOrCreateB2DBitmap(sal::systools::COMReference<ID2D1RenderTarget>& rRT, const { // creation worked, create SystemDependentData_ID2D1Bitmap pSystemDependentData_ID2D1Bitmap = std::make_shared<SystemDependentData_ID2D1Bitmap>( - pID2D1Bitmap, rBitmapEx.GetAlpha().GetBitmap().ImplGetSalBitmap()); + pID2D1Bitmap, rBitmapEx.GetAlphaMask().GetBitmap().ImplGetSalBitmap()); // only add if feasible if (nullptr != pHolder diff --git a/drawinglayer/source/texture/texture3d.cxx b/drawinglayer/source/texture/texture3d.cxx index 0a83937991d2..b6243243c882 100644 --- a/drawinglayer/source/texture/texture3d.cxx +++ b/drawinglayer/source/texture/texture3d.cxx @@ -74,7 +74,7 @@ namespace drawinglayer::texture if(mbIsAlpha) { - maTransparence = rBitmapEx.GetAlpha().GetBitmap(); + maTransparence = rBitmapEx.GetAlphaMask().GetBitmap(); mpReadTransparence = Bitmap::ScopedReadAccess(maTransparence); } |