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 | |
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>
55 files changed, 97 insertions, 97 deletions
diff --git a/canvas/source/directx/dx_vcltools.cxx b/canvas/source/directx/dx_vcltools.cxx index 9d5d3e85834b..33c3bd275e62 100644 --- a/canvas/source/directx/dx_vcltools.cxx +++ b/canvas/source/directx/dx_vcltools.cxx @@ -165,7 +165,7 @@ namespace dxcanvas::tools "::dxcanvas::tools::bitmapFromVCLBitmapEx(): " "Unable to acquire read access to bitmap" ); - Bitmap aAlpha( rBmpEx.GetAlpha().GetBitmap() ); + Bitmap aAlpha( rBmpEx.GetAlphaMask().GetBitmap() ); Bitmap::ScopedReadAccess pAlphaReadAccess( aAlpha ); diff --git a/cppcanvas/qa/unit/test.cxx b/cppcanvas/qa/unit/test.cxx index 303eecd86a16..e399e96eb0a8 100644 --- a/cppcanvas/qa/unit/test.cxx +++ b/cppcanvas/qa/unit/test.cxx @@ -56,7 +56,7 @@ void CanvasTest::testComposite() xBitmapCanvas->clear(); CPPUNIT_ASSERT( aBitmapEx.Create( xBitmapCanvas, aSize ) ); CPPUNIT_ASSERT( aBitmapEx.IsAlpha() ); - CPPUNIT_ASSERT( !aBitmapEx.GetAlpha().IsEmpty() ); + CPPUNIT_ASSERT( !aBitmapEx.GetAlphaMask().IsEmpty() ); } { diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 35070994d943..bdc4b1869ded 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -3737,7 +3737,7 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis, pDevice->EnableMapMode(false); BitmapEx aBmpEx = pDevice->GetBitmapEx({ 0, 0 }, { nCanvasWidth, nCanvasHeight }); Bitmap aBmp = aBmpEx.GetBitmap(); - Bitmap aAlpha = aBmpEx.GetAlpha(); + Bitmap aAlpha = aBmpEx.GetAlphaMask(); Bitmap::ScopedReadAccess sraBmp(aBmp); Bitmap::ScopedReadAccess sraAlpha(aAlpha); 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); } diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx index 950a0848a84a..ccdd28e0df95 100644 --- a/forms/source/component/imgprod.cxx +++ b/forms/source/component/imgprod.cxx @@ -364,7 +364,7 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic ) if( !pBmpAcc ) return; - Bitmap aMask( aBmpEx.GetAlpha() ); + Bitmap aMask( aBmpEx.GetAlphaMask() ); BitmapReadAccess* pMskAcc = !aMask.IsEmpty() ? aMask.AcquireReadAccess() : nullptr; const tools::Long nWidth = pBmpAcc->Width(); const tools::Long nHeight = pBmpAcc->Height(); diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx index 6d86d0633f64..7ec4dbf7d3c0 100644 --- a/include/vcl/bitmapex.hxx +++ b/include/vcl/bitmapex.hxx @@ -67,7 +67,7 @@ public: const Bitmap& GetBitmap() const; bool IsAlpha() const; - AlphaMask GetAlpha() const; + AlphaMask GetAlphaMask() const; const Size& GetSizePixel() const { return maBitmapSize; } void SetSizePixel(const Size& rNewSize); diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx index 2627a1861850..ef709dd588ef 100644 --- a/oox/source/drawingml/fillproperties.cxx +++ b/oox/source/drawingml/fillproperties.cxx @@ -201,7 +201,7 @@ Reference<XGraphic> lclApplyBlackWhiteEffect(const BlipFillProperties& aBlipProp ::Graphic aReturnGraphic; BitmapEx aBitmapEx(aGraphic.GetBitmapEx()); - AlphaMask aMask(aBitmapEx.GetAlpha()); + AlphaMask aMask(aBitmapEx.GetAlphaMask()); BitmapEx aTmpBmpEx(aBitmapEx.GetBitmap()); BitmapFilter::Filter(aTmpBmpEx, BitmapMonochromeFilter{ nThreshold }); diff --git a/sd/qa/unit/PNGExportTests.cxx b/sd/qa/unit/PNGExportTests.cxx index 2c77bd9bbfed..dcbe54054bd6 100644 --- a/sd/qa/unit/PNGExportTests.cxx +++ b/sd/qa/unit/PNGExportTests.cxx @@ -195,7 +195,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf136632) SvFileStream aFileStream(maTempFile.GetURL(), StreamMode::READ); vcl::PngImageReader aPNGReader(aFileStream); BitmapEx aBMPEx = aPNGReader.read(); - AlphaMask aAlpha = aBMPEx.GetAlpha(); + AlphaMask aAlpha = aBMPEx.GetAlphaMask(); AlphaMask::ScopedReadAccess pReadAccess(aAlpha); // Without the fix in place, this test would have failed here @@ -284,7 +284,7 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf147119) Size aSize = aBMPEx.GetSizePixel(); CPPUNIT_ASSERT_EQUAL(Size(100, 100), aSize); - AlphaMask aAlpha = aBMPEx.GetAlpha(); + AlphaMask aAlpha = aBMPEx.GetAlphaMask(); { AlphaMask::ScopedReadAccess pReadAccess(aAlpha); for (tools::Long nX = 1; nX < aSize.Width() - 1; ++nX) diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx index 27de050da778..2e60b5b54279 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -283,7 +283,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames, { pVDev->DrawBitmapEx(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmapEx); - Bitmap aMask = rAnimationFrame.maBitmapEx.GetAlpha(); + Bitmap aMask = rAnimationFrame.maBitmapEx.GetAlphaMask(); if( aMask.IsEmpty() ) { @@ -305,7 +305,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames, case Disposal::Back: { // #i70772# react on no mask - const Bitmap aMask(rAnimationFrame.maBitmapEx.GetAlpha()); + const Bitmap aMask(rAnimationFrame.maBitmapEx.GetAlphaMask()); const Bitmap & rContent(rAnimationFrame.maBitmapEx.GetBitmap()); pVDevMask->Erase(); @@ -330,7 +330,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames, pVDev->DrawBitmapEx(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmapEx); pVDevMask->DrawBitmap(rAnimationFrame.maPositionPixel, - rAnimationFrame.maBitmapEx.GetAlpha()); + rAnimationFrame.maBitmapEx.GetAlphaMask()); break; } } diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index 847ddaf4efbd..8f296cc9f7c1 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -615,7 +615,7 @@ BitmapEx SvxBmpMask::ImpMaskTransparent( const BitmapEx& rBitmapEx, const Color& Bitmap aMask( rBitmapEx.GetBitmap().CreateMask( rColor, nTol ) ); if( rBitmapEx.IsAlpha() ) - aMask.CombineOr( rBitmapEx.GetAlpha() ); + aMask.CombineOr( rBitmapEx.GetAlphaMask() ); aBmpEx = BitmapEx( rBitmapEx.GetBitmap(), aMask ); LeaveWait(); @@ -995,7 +995,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic ) { ImpMask( aBitmapEx ); if ( aGraphic.IsTransparent() ) - aGraphic = Graphic( BitmapEx( aBitmapEx.GetBitmap(), aBitmapEx.GetAlpha() ) ); + aGraphic = Graphic( BitmapEx( aBitmapEx.GetBitmap(), aBitmapEx.GetAlphaMask() ) ); else aGraphic = aBitmapEx; } diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 3ae8cba852e0..a7089208f808 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -115,7 +115,7 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic, } } else if( rGraphic.IsTransparent() ) - aBmp = rGraphic.GetBitmapEx().GetAlpha(); + aBmp = rGraphic.GetBitmapEx().GetAlphaMask(); else { aBmp = rGraphic.GetBitmapEx().GetBitmap(); @@ -634,7 +634,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void ) Bitmap aMask = aGraphic.GetBitmapEx().GetBitmap().CreateMask( rColor, nTol ); if( aGraphic.IsTransparent() ) - aMask.CombineOr( aGraphic.GetBitmapEx().GetAlpha() ); + aMask.CombineOr( aGraphic.GetBitmapEx().GetAlphaMask() ); if( !aMask.IsEmpty() ) { diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 3d1b66baac3b..48289e2a0165 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -985,7 +985,7 @@ CGImageRef CreateCGImage( const Image& rImage ) xImage = pSalBmp->CreateCroppedImage( 0, 0, pSalBmp->mnWidth, pSalBmp->mnHeight ); else { - AlphaMask aAlphaMask( aBmpEx.GetAlpha() ); + AlphaMask aAlphaMask( aBmpEx.GetAlphaMask() ); Bitmap aMask( aAlphaMask.GetBitmap() ); QuartzSalBitmap* pMaskBmp = static_cast<QuartzSalBitmap*>(aMask.ImplGetSalBitmap().get()); if( pMaskBmp ) diff --git a/vcl/qa/cppunit/BitmapProcessorTest.cxx b/vcl/qa/cppunit/BitmapProcessorTest.cxx index b855aa146ed8..0852a33914b0 100644 --- a/vcl/qa/cppunit/BitmapProcessorTest.cxx +++ b/vcl/qa/cppunit/BitmapProcessorTest.cxx @@ -70,7 +70,7 @@ void BitmapProcessorTest::testDisabledImage() Color aColor(pReadAccess->GetPixel(0, 0)); CPPUNIT_ASSERT_EQUAL(Color(0x00C5C5C5), aColor); } - AlphaMask aDisabledAlphaMask(aDisabledBitmapEx.GetAlpha()); + AlphaMask aDisabledAlphaMask(aDisabledBitmapEx.GetAlphaMask()); { AlphaMask::ScopedReadAccess pReadAccess(aDisabledAlphaMask); Color aColor(pReadAccess->GetPixel(0, 0)); diff --git a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx index 26c1136cbe4d..06758e4ae694 100644 --- a/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx +++ b/vcl/qa/cppunit/bitmaprender/BitmapRenderTest.cxx @@ -152,7 +152,7 @@ void BitmapRenderTest::testDrawAlphaBitmapEx() { CPPUNIT_ASSERT_EQUAL(vcl::PixelFormat::N24_BPP, aBitmapEx.GetBitmap().getPixelFormat()); CPPUNIT_ASSERT_EQUAL(true, aBitmapEx.IsAlpha()); - CPPUNIT_ASSERT_EQUAL(vcl::PixelFormat::N8_BPP, aBitmapEx.GetAlpha().getPixelFormat()); + CPPUNIT_ASSERT_EQUAL(vcl::PixelFormat::N8_BPP, aBitmapEx.GetAlphaMask().getPixelFormat()); } // Check the bitmap has pixels we expect diff --git a/vcl/qa/cppunit/canvasbitmaptest.cxx b/vcl/qa/cppunit/canvasbitmaptest.cxx index 91a5cfed4bb8..d16401b46464 100644 --- a/vcl/qa/cppunit/canvasbitmaptest.cxx +++ b/vcl/qa/cppunit/canvasbitmaptest.cxx @@ -759,7 +759,7 @@ void CanvasBitmapTest::runTest() { Bitmap aBitmap = aBmp.GetBitmap(); BitmapReadAccess* pBmpAcc = aBitmap.AcquireReadAccess(); - BitmapReadAccess* pAlphaAcc = aBmp.GetAlpha().AcquireReadAccess(); + BitmapReadAccess* pAlphaAcc = aBmp.GetAlphaMask().AcquireReadAccess(); CPPUNIT_ASSERT_MESSAGE( "Bitmap has invalid BitmapReadAccess", pBmpAcc); @@ -779,7 +779,7 @@ void CanvasBitmapTest::runTest() CPPUNIT_ASSERT_EQUAL_MESSAGE("(9,2) correct alpha content", BitmapColor(253), pAlphaAcc->GetPixel(2,9)); - aBmp.GetAlpha().ReleaseAccess(pAlphaAcc); + aBmp.GetAlphaMask().ReleaseAccess(pAlphaAcc); Bitmap::ReleaseAccess(pBmpAcc); } } diff --git a/vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx b/vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx index 4bc04bb419bd..66153f463f78 100644 --- a/vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx +++ b/vcl/qa/cppunit/graphicfilter/filters-webp-test.cxx @@ -139,7 +139,7 @@ void WebpFilterTest::testRoundtrip(bool lossy) CPPUNIT_ASSERT_EQUAL(COL_LIGHTRED, Color(pAccess->GetPixel(19, 0))); CPPUNIT_ASSERT_EQUAL(COL_BLUE, Color(pAccess->GetPixel(19, 19))); } - AlphaMask tmpAlpha = aResultBitmap.GetAlpha(); + AlphaMask tmpAlpha = aResultBitmap.GetAlphaMask(); AlphaMask::ScopedReadAccess pAccessAlpha(tmpAlpha); CPPUNIT_ASSERT_EQUAL(sal_uInt8(0), pAccessAlpha->GetPixelIndex(0, 0)); CPPUNIT_ASSERT_EQUAL(sal_uInt8(0), pAccessAlpha->GetPixelIndex(0, 19)); @@ -191,7 +191,7 @@ void WebpFilterTest::testRead(bool lossy, bool alpha) CPPUNIT_ASSERT_EQUAL(COL_LIGHTBLUE, Color(pAccess->GetPixel(9, 9))); if (alpha) { - AlphaMask tmpAlpha = aResultBitmap.GetAlpha(); + AlphaMask tmpAlpha = aResultBitmap.GetAlphaMask(); AlphaMask::ScopedReadAccess pAccessAlpha(tmpAlpha); CPPUNIT_ASSERT_EQUAL(sal_uInt8(0), pAccessAlpha->GetPixelIndex(0, 0)); CPPUNIT_ASSERT_EQUAL(sal_uInt8(255), pAccessAlpha->GetPixelIndex(0, 9)); diff --git a/vcl/qa/cppunit/png/PngFilterTest.cxx b/vcl/qa/cppunit/png/PngFilterTest.cxx index 791967da8e86..81bafac1d184 100644 --- a/vcl/qa/cppunit/png/PngFilterTest.cxx +++ b/vcl/qa/cppunit/png/PngFilterTest.cxx @@ -313,7 +313,7 @@ void PngFilterTest::testPng() CPPUNIT_ASSERT_EQUAL(BitmapColor(ColorTransparency, 0xFF, 0xFF, 0x00, 0x00), pAccess->GetPixel(2, 2)); - AlphaMask aAlpha = aBitmapEx.GetAlpha(); + AlphaMask aAlpha = aBitmapEx.GetAlphaMask(); { AlphaMask::ScopedReadAccess pAlphaAccess(aAlpha); CPPUNIT_ASSERT_EQUAL(sal_uInt16(8), pAlphaAccess->GetBitCount()); diff --git a/vcl/skia/osx/bitmap.cxx b/vcl/skia/osx/bitmap.cxx index 16d32191a627..d622f6419e95 100644 --- a/vcl/skia/osx/bitmap.cxx +++ b/vcl/skia/osx/bitmap.cxx @@ -61,7 +61,7 @@ CGImageRef createCGImage(const Image& rImage) } else { - AlphaMask alpha(bitmapEx.GetAlpha()); + AlphaMask alpha(bitmapEx.GetAlphaMask()); Bitmap alphaBitmap(alpha.GetBitmap()); assert(dynamic_cast<SkiaSalBitmap*>(alphaBitmap.ImplGetSalBitmap().get()) != nullptr); SkiaSalBitmap* skiaAlpha diff --git a/vcl/source/bitmap/BitmapAlphaClampFilter.cxx b/vcl/source/bitmap/BitmapAlphaClampFilter.cxx index 69691d51c2d7..eb3245e2347c 100644 --- a/vcl/source/bitmap/BitmapAlphaClampFilter.cxx +++ b/vcl/source/bitmap/BitmapAlphaClampFilter.cxx @@ -18,7 +18,7 @@ BitmapEx BitmapAlphaClampFilter::execute(BitmapEx const& rBitmapEx) const if (!rBitmapEx.IsAlpha()) return rBitmapEx; - AlphaMask aBitmapAlpha(rBitmapEx.GetAlpha()); + AlphaMask aBitmapAlpha(rBitmapEx.GetAlphaMask()); { AlphaScopedWriteAccess pWriteAlpha(aBitmapAlpha); const Size aSize(rBitmapEx.GetSizePixel()); diff --git a/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx b/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx index 8516f5861a5d..dcaacdad8bcb 100644 --- a/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx +++ b/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx @@ -333,7 +333,7 @@ BitmapBasicMorphologyFilter::~BitmapBasicMorphologyFilter() = default; BitmapEx BitmapBasicMorphologyFilter::execute(BitmapEx const& rBitmapEx) const { Bitmap result = filter(rBitmapEx.GetBitmap()); - return BitmapEx(result, rBitmapEx.GetAlpha()); + return BitmapEx(result, rBitmapEx.GetAlphaMask()); } Bitmap BitmapBasicMorphologyFilter::filter(Bitmap const& rBitmap) const diff --git a/vcl/source/bitmap/BitmapDisabledImageFilter.cxx b/vcl/source/bitmap/BitmapDisabledImageFilter.cxx index 3bcf4cf9d85c..05251b63e0b6 100644 --- a/vcl/source/bitmap/BitmapDisabledImageFilter.cxx +++ b/vcl/source/bitmap/BitmapDisabledImageFilter.cxx @@ -49,7 +49,7 @@ BitmapEx BitmapDisabledImageFilter::execute(BitmapEx const& rBitmapEx) const if (rBitmapEx.IsAlpha()) { - aReturnBitmap = BitmapEx(aGrey, rBitmapEx.GetAlpha()); + aReturnBitmap = BitmapEx(aGrey, rBitmapEx.GetAlphaMask()); } else aReturnBitmap = BitmapEx(aGrey); diff --git a/vcl/source/bitmap/BitmapEx.cxx b/vcl/source/bitmap/BitmapEx.cxx index 2aeccf83c879..3a07dd61da07 100644 --- a/vcl/source/bitmap/BitmapEx.cxx +++ b/vcl/source/bitmap/BitmapEx.cxx @@ -212,7 +212,7 @@ Bitmap BitmapEx::GetBitmap( Color aTransparentReplaceColor ) const return aRetBmp; } -AlphaMask BitmapEx::GetAlpha() const +AlphaMask BitmapEx::GetAlphaMask() const { return AlphaMask(maAlphaMask); } @@ -603,7 +603,7 @@ Color BitmapEx::GetPixelColor(sal_Int32 nX, sal_Int32 nY) const if (IsAlpha()) { - AlphaMask aAlpha = GetAlpha(); + AlphaMask aAlpha = GetAlphaMask(); AlphaMask::ScopedReadAccess pAlphaReadAccess(aAlpha); aColor.SetAlpha(255 - pAlphaReadAccess->GetPixel(nY, nX).GetIndex()); } @@ -765,7 +765,7 @@ BitmapEx BitmapEx::TransformBitmapEx( // create mask if(IsAlpha()) { - const Bitmap aAlpha(impTransformBitmap(GetAlpha().GetBitmap(), aDestinationSize, rTransformation, bSmooth)); + const Bitmap aAlpha(impTransformBitmap(GetAlphaMask().GetBitmap(), aDestinationSize, rTransformation, bSmooth)); return BitmapEx(aDestination, AlphaMask(aAlpha)); } @@ -988,7 +988,7 @@ BitmapEx BitmapEx::ModifyBitmapEx(const basegfx::BColorModifierStack& rBColorMod { if(IsAlpha()) { - return BitmapEx(aChangedBitmap, GetAlpha()); + return BitmapEx(aChangedBitmap, GetAlphaMask()); } else { @@ -1169,7 +1169,7 @@ void BitmapEx::ReplaceTransparency(const Color& rColor) { if( IsAlpha() ) { - maBitmap.Replace( GetAlpha(), rColor ); + maBitmap.Replace( GetAlphaMask(), rColor ); maAlphaMask = Bitmap(); maBitmapSize = maBitmap.GetSizePixel(); } @@ -1359,7 +1359,7 @@ tools::Polygon BitmapEx::GetContour( bool bContourEdgeDetect, void BitmapEx::ChangeColorAlpha( sal_uInt8 cIndexFrom, sal_Int8 nAlphaTo ) { - AlphaMask aAlphaMask(GetAlpha()); + AlphaMask aAlphaMask(GetAlphaMask()); BitmapScopedWriteAccess pAlphaWriteAccess(aAlphaMask); Bitmap::ScopedReadAccess pReadAccess(maBitmap); assert( pReadAccess.get() && pAlphaWriteAccess.get() ); @@ -1390,7 +1390,7 @@ void BitmapEx::AdjustTransparency(sal_uInt8 cTrans) } else { - aAlpha = GetAlpha(); + aAlpha = GetAlphaMask(); BitmapScopedWriteAccess pA(aAlpha); assert(pA); diff --git a/vcl/source/bitmap/BitmapFastScaleFilter.cxx b/vcl/source/bitmap/BitmapFastScaleFilter.cxx index 362de6de706d..5a9250400d99 100644 --- a/vcl/source/bitmap/BitmapFastScaleFilter.cxx +++ b/vcl/source/bitmap/BitmapFastScaleFilter.cxx @@ -112,7 +112,7 @@ BitmapEx BitmapFastScaleFilter::execute(BitmapEx const& rBitmapEx) const } } - AlphaMask aMask(rBitmapEx.GetAlpha()); + AlphaMask aMask(rBitmapEx.GetAlphaMask()); if (bRet && !aMask.IsEmpty()) bRet = aMask.Scale(maSize, BmpScaleFlag::Fast); diff --git a/vcl/source/bitmap/BitmapFilterStackBlur.cxx b/vcl/source/bitmap/BitmapFilterStackBlur.cxx index eeb5810f5d1f..dc8b33e64243 100644 --- a/vcl/source/bitmap/BitmapFilterStackBlur.cxx +++ b/vcl/source/bitmap/BitmapFilterStackBlur.cxx @@ -621,7 +621,7 @@ BitmapEx BitmapFilterStackBlur::execute(BitmapEx const& rBitmapEx) const { Bitmap aBitmap = rBitmapEx.GetBitmap(); Bitmap result = filter(aBitmap); - return BitmapEx(result, rBitmapEx.GetAlpha()); + return BitmapEx(result, rBitmapEx.GetAlphaMask()); } Bitmap BitmapFilterStackBlur::filter(Bitmap const& rBitmap) const diff --git a/vcl/source/bitmap/BitmapLightenFilter.cxx b/vcl/source/bitmap/BitmapLightenFilter.cxx index 47fa49a70e08..5054e3cae662 100644 --- a/vcl/source/bitmap/BitmapLightenFilter.cxx +++ b/vcl/source/bitmap/BitmapLightenFilter.cxx @@ -61,7 +61,7 @@ BitmapEx BitmapLightenFilter::execute(BitmapEx const& rBitmapEx) const pWrite.reset(); pRead.reset(); - return BitmapEx(aDarkBitmap, rBitmapEx.GetAlpha()); + return BitmapEx(aDarkBitmap, rBitmapEx.GetAlphaMask()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx index 969490bfecce..4628e012abb0 100644 --- a/vcl/source/bitmap/BitmapTools.cxx +++ b/vcl/source/bitmap/BitmapTools.cxx @@ -358,7 +358,7 @@ BitmapEx CanvasTransformBitmap( const BitmapEx& rBitmap, // vs. multi-level transparency) if( rBitmap.IsAlpha() ) { - aSrcAlpha = rBitmap.GetAlpha().GetBitmap(); + aSrcAlpha = rBitmap.GetAlphaMask().GetBitmap(); } Bitmap::ScopedReadAccess pReadAccess( aSrcBitmap ); @@ -496,7 +496,7 @@ void DrawAlphaBitmapAndAlphaGradient(BitmapEx & rBitmapEx, bool bFixedTransparen if(rBitmapEx.IsAlpha()) { - aOldMask = rBitmapEx.GetAlpha(); + aOldMask = rBitmapEx.GetAlphaMask(); } { @@ -580,7 +580,7 @@ void DrawAndClipBitmap(const Point& rPos, const Size& rSize, const BitmapEx& rBi // the new masking in pVDev. // need to blend in AlphaMask quality (8Bit) AlphaMask fromVDev(aVDevMask); - AlphaMask fromBmpEx(aBmpEx.GetAlpha()); + AlphaMask fromBmpEx(aBmpEx.GetAlphaMask()); AlphaMask::ScopedReadAccess pR(fromVDev); AlphaScopedWriteAccess pW(fromBmpEx); @@ -626,7 +626,7 @@ css::uno::Sequence< sal_Int8 > GetMaskDIB(BitmapEx const & aBmpEx) if ( aBmpEx.IsAlpha() ) { SvMemoryStream aMem; - WriteDIB(aBmpEx.GetAlpha().GetBitmap(), aMem, false, true); + WriteDIB(aBmpEx.GetAlphaMask().GetBitmap(), aMem, false, true); return css::uno::Sequence< sal_Int8 >( static_cast<sal_Int8 const *>(aMem.GetData()), aMem.Tell() ); } @@ -679,7 +679,7 @@ static bool readAlpha( BitmapReadAccess const * pAlphaReadAcc, tools::Long nY, c **/ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, unsigned char*& data, bool& bHasAlpha, tools::Long& rnWidth, tools::Long& rnHeight ) { - AlphaMask aAlpha = aBmpEx.GetAlpha(); + AlphaMask aAlpha = aBmpEx.GetAlphaMask(); ::BitmapReadAccess* pBitmapReadAcc = aBitmap.AcquireReadAccess(); ::BitmapReadAccess* pAlphaReadAcc = nullptr; @@ -975,7 +975,7 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, Bitmap & aBitmap, un uno::Sequence< sal_Int8 > CanvasExtractBitmapData(BitmapEx const & rBitmapEx, const geometry::IntegerRectangle2D& rect) { Bitmap aBitmap( rBitmapEx.GetBitmap() ); - Bitmap aAlpha( rBitmapEx.GetAlpha().GetBitmap() ); + Bitmap aAlpha( rBitmapEx.GetAlphaMask().GetBitmap() ); Bitmap::ScopedReadAccess pReadAccess( aBitmap ); Bitmap::ScopedReadAccess pAlphaReadAccess( aAlpha.IsEmpty() ? @@ -1225,7 +1225,7 @@ bool convertBitmap32To24Plus8(BitmapEx const & rInput, BitmapEx & rResult) } } if (rInput.IsAlpha()) - rResult = BitmapEx(aResultBitmap, rInput.GetAlpha()); + rResult = BitmapEx(aResultBitmap, rInput.GetAlphaMask()); else rResult = BitmapEx(aResultBitmap, aResultAlpha); return true; diff --git a/vcl/source/filter/egif/egif.cxx b/vcl/source/filter/egif/egif.cxx index 8533dc5835a0..3aae0478cbe8 100644 --- a/vcl/source/filter/egif/egif.cxx +++ b/vcl/source/filter/egif/egif.cxx @@ -242,7 +242,7 @@ bool GIFWriter::CreateAccess( const BitmapEx& rBmpEx ) { if( bStatus ) { - Bitmap aMask( rBmpEx.GetAlpha() ); + Bitmap aMask( rBmpEx.GetAlphaMask() ); aAccBmp = rBmpEx.GetBitmap(); bTransparent = false; diff --git a/vcl/source/filter/eps/eps.cxx b/vcl/source/filter/eps/eps.cxx index 9da4f666b238..a6ee4c288e00 100644 --- a/vcl/source/filter/eps/eps.cxx +++ b/vcl/source/filter/eps/eps.cxx @@ -819,7 +819,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) Bitmap aBitmap( aBitmapEx.GetBitmap() ); if ( mbGrayScale ) aBitmap.Convert( BmpConversion::N8BitGreys ); - Bitmap aMask( aBitmapEx.GetAlpha() ); + Bitmap aMask( aBitmapEx.GetAlphaMask() ); Point aPoint( static_cast<const MetaBmpExAction*>(pMA)->GetPoint() ); Size aSize( rVDev.PixelToLogic( aBitmap.GetSizePixel() ) ); ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() ); @@ -832,7 +832,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) Bitmap aBitmap( aBitmapEx.GetBitmap() ); if ( mbGrayScale ) aBitmap.Convert( BmpConversion::N8BitGreys ); - Bitmap aMask( aBitmapEx.GetAlpha() ); + Bitmap aMask( aBitmapEx.GetAlphaMask() ); Point aPoint = static_cast<const MetaBmpExScaleAction*>(pMA)->GetPoint(); Size aSize( static_cast<const MetaBmpExScaleAction*>(pMA)->GetSize() ); ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() ); @@ -847,7 +847,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) Bitmap aBitmap( aBitmapEx.GetBitmap() ); if ( mbGrayScale ) aBitmap.Convert( BmpConversion::N8BitGreys ); - Bitmap aMask( aBitmapEx.GetAlpha() ); + Bitmap aMask( aBitmapEx.GetAlphaMask() ); Point aPoint = static_cast<const MetaBmpExScalePartAction*>(pMA)->GetDestPoint(); Size aSize = static_cast<const MetaBmpExScalePartAction*>(pMA)->GetDestSize(); ImplBmp( &aBitmap, &aMask, aPoint, aSize.Width(), aSize.Height() ); @@ -907,7 +907,7 @@ void PSWriter::ImplWriteActions( const GDIMetaFile& rMtf, VirtualDevice& rVDev ) // gradient action } - Bitmap aMask( aBitmapEx.GetAlpha() ); + Bitmap aMask( aBitmapEx.GetAlphaMask() ); ImplBmp( &aBitmap, &aMask, Point( aRect.Left(), aRect.Top() ), aRect.GetWidth(), aRect.GetHeight() ); } else diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 83ce6d4bed15..ef9f45485565 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -634,7 +634,7 @@ void GraphicFilter::ImportGraphics(std::vector< std::shared_ptr<Graphic> >& rGra // may be also a mask, not alpha). So BitmapEx::GetAlpha() returns // a temporary, and direct access to the Bitmap wouldn't work // with AlphaScopedBitmapAccess. *sigh* - rContext.mAlphaMask = rBitmapEx.GetAlpha(); + rContext.mAlphaMask = rBitmapEx.GetAlphaMask(); rContext.m_pAlphaAccess = std::make_unique<AlphaScopedWriteAccess>(rContext.mAlphaMask); } rContext.m_pStream->Seek(rContext.m_nStreamBegin); diff --git a/vcl/source/filter/png/PngImageWriter.cxx b/vcl/source/filter/png/PngImageWriter.cxx index fd5ba3c84e8e..0438ea7645a2 100644 --- a/vcl/source/filter/png/PngImageWriter.cxx +++ b/vcl/source/filter/png/PngImageWriter.cxx @@ -95,7 +95,7 @@ static bool pngWrite(SvStream& rStream, const BitmapEx& rBitmapEx, int nCompress png_set_write_fn(pPng, &rStream, lclWriteStream, nullptr); aBitmap = aBitmapEx.GetBitmap(); - aAlphaMask = aBitmapEx.GetAlpha(); + aAlphaMask = aBitmapEx.GetAlphaMask(); { bool bCombineChannels = false; diff --git a/vcl/source/filter/webp/writer.cxx b/vcl/source/filter/webp/writer.cxx index f29dad007ed6..ac993a041b06 100644 --- a/vcl/source/filter/webp/writer.cxx +++ b/vcl/source/filter/webp/writer.cxx @@ -95,7 +95,7 @@ static bool writeWebp(SvStream& rStream, const BitmapEx& bitmapEx, bool lossless Bitmap bitmap(bitmapEx.GetBitmap()); AlphaMask bitmapAlpha; if (bitmapEx.IsAlpha()) - bitmapAlpha = bitmapEx.GetAlpha(); + bitmapAlpha = bitmapEx.GetAlphaMask(); Bitmap::ScopedReadAccess access(bitmap); AlphaMask::ScopedReadAccess accessAlpha(bitmapAlpha); bool dataDone = false; diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index a82c45de8d8e..cb717559fe84 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -1294,7 +1294,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) { const MetaBmpExAction* pA = static_cast<const MetaBmpExAction *>(pAction); Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); - Bitmap aMsk( pA->GetBitmapEx().GetAlpha() ); + Bitmap aMsk( pA->GetBitmapEx().GetAlphaMask() ); if( !aMsk.IsEmpty() ) { @@ -1312,7 +1312,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) { const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pAction); Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); - Bitmap aMsk( pA->GetBitmapEx().GetAlpha() ); + Bitmap aMsk( pA->GetBitmapEx().GetAlphaMask() ); if( !aMsk.IsEmpty() ) { @@ -1332,7 +1332,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) BitmapEx aBmpEx( pA->GetBitmapEx() ); aBmpEx.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); Bitmap aBmp( aBmpEx.GetBitmap() ); - Bitmap aMsk( aBmpEx.GetAlpha() ); + Bitmap aMsk( aBmpEx.GetAlphaMask() ); if( !aMsk.IsEmpty() ) { diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index 2c52aa7f5946..124ea571dc3d 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -1245,7 +1245,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) { const MetaBmpExAction* pA = static_cast<const MetaBmpExAction *>(pMA); Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); - Bitmap aMsk( pA->GetBitmapEx().GetAlpha() ); + Bitmap aMsk( pA->GetBitmapEx().GetAlphaMask() ); if( !aMsk.IsEmpty() ) { @@ -1263,7 +1263,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) { const MetaBmpExScaleAction* pA = static_cast<const MetaBmpExScaleAction*>(pMA); Bitmap aBmp( pA->GetBitmapEx().GetBitmap() ); - Bitmap aMsk( pA->GetBitmapEx().GetAlpha() ); + Bitmap aMsk( pA->GetBitmapEx().GetAlphaMask() ); if( !aMsk.IsEmpty() ) { @@ -1283,7 +1283,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) BitmapEx aBmpEx( pA->GetBitmapEx() ); aBmpEx.Crop( tools::Rectangle( pA->GetSrcPoint(), pA->GetSrcSize() ) ); Bitmap aBmp( aBmpEx.GetBitmap() ); - Bitmap aMsk( aBmpEx.GetAlpha() ); + Bitmap aMsk( aBmpEx.GetAlphaMask() ); if( !aMsk.IsEmpty() ) { diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx index 046dbbd05873..442111571dd8 100644 --- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx +++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx @@ -497,7 +497,7 @@ void munchDrawCommands(std::vector<std::shared_ptr<WidgetDrawAction>> const& rDr if (aBitmap.IsAlpha()) { const std::shared_ptr<SalBitmap> pSalBitmapAlpha - = aBitmap.GetAlpha().ImplGetSalBitmap(); + = aBitmap.GetAlphaMask().ImplGetSalBitmap(); FileDefinitionWidgetDraw::drawBitmap(rGraphics, aTR, *pSalBitmap, *pSalBitmapAlpha); } diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx index 982cb0d7fbdc..ce7977599bc2 100644 --- a/vcl/source/gdi/gdimetafiletools.cxx +++ b/vcl/source/gdi/gdimetafiletools.cxx @@ -174,7 +174,7 @@ namespace if(rBitmapEx.IsAlpha()) { // use given alpha channel - aVDev->DrawBitmap(Point(0, 0), rBitmapEx.GetAlpha().GetBitmap()); + aVDev->DrawBitmap(Point(0, 0), rBitmapEx.GetAlphaMask().GetBitmap()); } else { diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 34b42e1e7f92..05e4c0fb3a6b 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -1766,7 +1766,7 @@ BitmapEx GDIMetaFile::ImplBmpMonoFnc( const BitmapEx& rBmpEx, const void* pBmpPa aBmp.Erase( static_cast<const ImplBmpMonoParam*>(pBmpParam)->aColor ); if( rBmpEx.IsAlpha() ) - return BitmapEx( aBmp, rBmpEx.GetAlpha() ); + return BitmapEx( aBmp, rBmpEx.GetAlphaMask() ); else return BitmapEx( aBmp ); } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 99c1b1e27e84..c0d85aa99878 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -9209,13 +9209,13 @@ bool PDFWriterImpl::writeBitmapObject( const BitmapEmit& rObject, bool bMask ) { if( m_aContext.Version < PDFWriter::PDFVersion::PDF_1_4 || ! rObject.m_aBitmap.IsAlpha() ) { - aBitmap = getExportBitmap(rObject.m_aBitmap.GetAlpha()); + aBitmap = getExportBitmap(rObject.m_aBitmap.GetAlphaMask()); aBitmap.Convert( BmpConversion::N1BitThreshold ); SAL_WARN_IF(aBitmap.getPixelFormat() != vcl::PixelFormat::N1_BPP, "vcl.pdfwriter", "mask conversion failed" ); } else if (aBitmap.getPixelFormat() != vcl::PixelFormat::N8_BPP) { - aBitmap = getExportBitmap(rObject.m_aBitmap.GetAlpha().GetBitmap()); + aBitmap = getExportBitmap(rObject.m_aBitmap.GetAlphaMask().GetBitmap()); aBitmap.Convert( BmpConversion::N8BitGreys ); SAL_WARN_IF(aBitmap.getPixelFormat() != vcl::PixelFormat::N8_BPP, "vcl.pdfwriter", "alpha mask conversion failed" ); } @@ -9624,7 +9624,7 @@ const BitmapEmit& PDFWriterImpl::createBitmapEmit(const BitmapEx& i_rBitmap, con aID.m_nChecksum = aBitmap.GetBitmap().GetChecksum(); aID.m_nMaskChecksum = 0; if( aBitmap.IsAlpha() ) - aID.m_nMaskChecksum = aBitmap.GetAlpha().GetChecksum(); + aID.m_nMaskChecksum = aBitmap.GetAlphaMask().GetChecksum(); std::list<BitmapEmit>::const_iterator it = std::find_if(rBitmaps.begin(), rBitmaps.end(), [&](const BitmapEmit& arg) { return aID == arg.m_aID; }); if (it == rBitmaps.end()) diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index cac3813cdedc..ef82bdeee41f 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -202,7 +202,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz nZippedFileSize = aTemp.TellEnd(); } if ( aBitmapEx.IsAlpha() ) - aAlphaMask = aBitmapEx.GetAlpha(); + aAlphaMask = aBitmapEx.GetAlphaMask(); Graphic aGraphic(BitmapEx(aBitmapEx.GetBitmap())); Sequence< PropertyValue > aFilterData{ diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 6225db3a6b35..6d014525aae0 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -215,7 +215,7 @@ void Printer::DrawDeviceBitmapEx( const Point& rDestPt, const Size& rDestSize, // bitmap, but perform a full alpha blend against a white // background here. Bitmap aBmp( rBmpEx.GetBitmap() ); - aBmp.Blend( rBmpEx.GetAlpha(), COL_WHITE ); + aBmp.Blend( rBmpEx.GetAlphaMask(), COL_WHITE ); DrawBitmap( rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel, aBmp ); } else diff --git a/vcl/source/graphic/GraphicObject2.cxx b/vcl/source/graphic/GraphicObject2.cxx index f61cabf9c5ed..e5914f2be62b 100644 --- a/vcl/source/graphic/GraphicObject2.cxx +++ b/vcl/source/graphic/GraphicObject2.cxx @@ -308,7 +308,7 @@ bool GraphicObject::ImplDrawTiled(OutputDevice& rOut, const tools::Rectangle& rA GraphicObject aAlphaGraphic; if( GetGraphic().IsAlpha() ) - aAlphaGraphic.SetGraphic(BitmapEx(GetGraphic().GetBitmapEx().GetAlpha().GetBitmap())); + aAlphaGraphic.SetGraphic(BitmapEx(GetGraphic().GetBitmapEx().GetAlphaMask().GetBitmap())); else aAlphaGraphic.SetGraphic(BitmapEx(Bitmap())); @@ -457,7 +457,7 @@ void GraphicObject::ImplTransformBitmap( BitmapEx& rBmpEx, if( rBmpEx.IsAlpha() ) { - aBmpEx2 = BitmapEx( rBmpEx.GetBitmap(), rBmpEx.GetAlpha() ); + aBmpEx2 = BitmapEx( rBmpEx.GetBitmap(), rBmpEx.GetAlphaMask() ); } else { diff --git a/vcl/source/graphic/UnoGraphic.cxx b/vcl/source/graphic/UnoGraphic.cxx index 60d6d9cce86e..a1150e26ca69 100644 --- a/vcl/source/graphic/UnoGraphic.cxx +++ b/vcl/source/graphic/UnoGraphic.cxx @@ -173,7 +173,7 @@ uno::Sequence<sal_Int8> SAL_CALL Graphic::getMaskDIB() { SvMemoryStream aMemoryStream; - WriteDIB(maGraphic.GetBitmapEx().GetAlpha(), aMemoryStream, false, true); + WriteDIB(maGraphic.GetBitmapEx().GetAlphaMask(), aMemoryStream, false, true); return css::uno::Sequence<sal_Int8>( static_cast<sal_Int8 const *>(aMemoryStream.GetData()), aMemoryStream.Tell() ); } else @@ -243,7 +243,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL Graphic::applyDuotone( ::Graphic aReturnGraphic; BitmapEx aBitmapEx( aGraphic.GetBitmapEx() ); - AlphaMask aMask( aBitmapEx.GetAlpha() ); + AlphaMask aMask( aBitmapEx.GetAlphaMask() ); BitmapEx aTmpBmpEx(aBitmapEx.GetBitmap()); BitmapFilter::Filter(aTmpBmpEx, diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx index 2e7a83bbb132..4f8d4160acc1 100644 --- a/vcl/source/helper/canvasbitmap.cxx +++ b/vcl/source/helper/canvasbitmap.cxx @@ -127,7 +127,7 @@ VclCanvasBitmap::VclCanvasBitmap( const BitmapEx& rBitmap ) : { if( m_aBmpEx.IsAlpha() ) { - m_aAlpha = m_aBmpEx.GetAlpha().GetBitmap(); + m_aAlpha = m_aBmpEx.GetAlphaMask().GetBitmap(); m_pAlphaAcc = Bitmap::ScopedInfoAccess(m_aAlpha); } diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx index 06937ab7f1e5..f8c0d56f8893 100644 --- a/vcl/source/image/Image.cxx +++ b/vcl/source/image/Image.cxx @@ -146,7 +146,7 @@ void Image::Draw(OutputDevice* pOutDev, const Point& rPos, DrawImageFlags nStyle { if (aTempBitmapEx.IsAlpha()) { - Bitmap aAlphaBmp(aTempBitmapEx.GetAlpha().GetBitmap()); + Bitmap aAlphaBmp(aTempBitmapEx.GetAlphaMask().GetBitmap()); aAlphaBmp.Adjust(50); aTempBitmapEx = BitmapEx(aTempBitmapEx.GetBitmap(), AlphaMask(aAlphaBmp)); } diff --git a/vcl/source/outdev/background.cxx b/vcl/source/outdev/background.cxx index a22c9e46effd..1f5dcd860174 100644 --- a/vcl/source/outdev/background.cxx +++ b/vcl/source/outdev/background.cxx @@ -57,7 +57,7 @@ void OutputDevice::SetBackground( const Wallpaper& rBackground ) { BitmapEx bitmap = rBackground.GetBitmap(); if( bitmap.IsAlpha()) - mpAlphaVDev->SetBackground( Wallpaper( BitmapEx( Bitmap( bitmap.GetAlpha())))); + mpAlphaVDev->SetBackground( Wallpaper( BitmapEx( Bitmap( bitmap.GetAlphaMask())))); else mpAlphaVDev->SetBackground( Wallpaper( COL_BLACK )); } diff --git a/vcl/source/outdev/bitmapex.cxx b/vcl/source/outdev/bitmapex.cxx index fc966b53c3d2..57851f943f51 100644 --- a/vcl/source/outdev/bitmapex.cxx +++ b/vcl/source/outdev/bitmapex.cxx @@ -172,7 +172,7 @@ void OutputDevice::DrawDeviceBitmapEx( const Point& rDestPt, const Size& rDestSi if (rBitmapEx.IsAlpha()) { - DrawDeviceAlphaBitmap(rBitmapEx.GetBitmap(), rBitmapEx.GetAlpha(), rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel); + DrawDeviceAlphaBitmap(rBitmapEx.GetBitmap(), rBitmapEx.GetAlphaMask(), rDestPt, rDestSize, rSrcPtPixel, rSrcSizePixel); } else if (!rBitmapEx.IsEmpty()) { @@ -274,8 +274,8 @@ void OutputDevice::DrawDeviceBitmapEx( const Point& rDestPt, const Size& rDestSi if (mpAlphaVDev) mpAlphaVDev->DrawBitmapEx(rDestPt, rDestSize, - BitmapEx(rBitmapEx.GetAlpha(), - rBitmapEx.GetAlpha())); + BitmapEx(rBitmapEx.GetAlphaMask(), + rBitmapEx.GetAlphaMask())); } else { @@ -309,7 +309,7 @@ bool OutputDevice::DrawTransformBitmapExDirect( if(rBitmapEx.IsAlpha()) { - aAlphaBitmap = rBitmapEx.GetAlpha(); + aAlphaBitmap = rBitmapEx.GetAlphaMask(); } else if (mpAlphaVDev) { @@ -519,7 +519,7 @@ void OutputDevice::DrawTransformedBitmapEx( sal_uInt8 nColor( static_cast<sal_uInt8>( ::basegfx::fround( 255.0*(1.0 - fAlpha) + .5) ) ); AlphaMask aAlpha( bitmapEx.GetSizePixel(), &nColor ); if( bitmapEx.IsAlpha()) - aAlpha.BlendWith( bitmapEx.GetAlpha()); + aAlpha.BlendWith( bitmapEx.GetAlphaMask()); bitmapEx = BitmapEx( bitmapEx.GetBitmap(), aAlpha ); } if(rtl::math::approxEqual( fAlpha, 1.0 )) diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index c6d97ef2c56b..8a19f9dcbb8e 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -1066,7 +1066,7 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, to // the alpha surface and use it to blend the original solid line color Bitmap aSolidColor(aBitmapEx.GetBitmap()); aSolidColor.Erase(GetLineColor()); - aBitmapEx = BitmapEx(aSolidColor, aBitmapEx.GetAlpha()); + aBitmapEx = BitmapEx(aSolidColor, aBitmapEx.GetAlphaMask()); rLineCache.insert( aBitmapEx, GetLineColor(), nLineWidth, nWaveHeight, nWordLength, aWavylinebmp ); } diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index 58e12457f9e9..d2be9bef6fc9 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -683,7 +683,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, xVDev->EnableMapMode( false ); AlphaMask aAlpha(xVDev->GetBitmap(Point(), xVDev->GetOutputSizePixel())); - aAlpha.BlendWith(aPaint.GetAlpha()); + aAlpha.BlendWith(aPaint.GetAlphaMask()); xVDev.disposeAndClear(); @@ -851,7 +851,7 @@ void ImplConvertTransparentAction( GDIMetaFile& o_rMtf, { // blend with alpha channel aBmp.Convert(BmpConversion::N24Bit); - aBmp.Blend(aBmpEx.GetAlpha(), aBgColor); + aBmp.Blend(aBmpEx.GetAlphaMask(), aBgColor); } // add corresponding action diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx index 3360acd47f67..2ae7cb2e5a26 100644 --- a/vcl/source/outdev/wallpaper.cxx +++ b/vcl/source/outdev/wallpaper.cxx @@ -222,7 +222,7 @@ void OutputDevice::DrawBitmapWallpaper( tools::Long nX, tools::Long nY, aBmpEx = rWallpaper.GetBitmap(); aBmpEx.Scale( aSize ); - aBmpEx = BitmapEx( aBmpEx.GetBitmap().CreateDisplayBitmap( this ), aBmpEx.GetAlpha() ); + aBmpEx = BitmapEx( aBmpEx.GetBitmap().CreateDisplayBitmap( this ), aBmpEx.GetAlphaMask() ); } break; diff --git a/vcl/source/rendercontext/drawmode.cxx b/vcl/source/rendercontext/drawmode.cxx index 9819be3fa866..f33320d16216 100644 --- a/vcl/source/rendercontext/drawmode.cxx +++ b/vcl/source/rendercontext/drawmode.cxx @@ -260,13 +260,13 @@ BitmapEx GetBitmapEx(BitmapEx const& rBitmapEx, DrawModeFlags nDrawMode) // Create one-bit mask out of alpha channel, by thresholding it at alpha=0.5. As // DRAWMODE_BLACK/WHITEBITMAP requires monochrome output, having alpha-induced // grey levels is not acceptable - BitmapEx aMaskEx(aBmpEx.GetAlpha().GetBitmap()); + BitmapEx aMaskEx(aBmpEx.GetAlphaMask().GetBitmap()); BitmapFilter::Filter(aMaskEx, BitmapMonochromeFilter(129)); aBmpEx = BitmapEx(aColorBmp, aMaskEx.GetBitmap()); } else { - aBmpEx = BitmapEx(aColorBmp, aBmpEx.GetAlpha()); + aBmpEx = BitmapEx(aColorBmp, aBmpEx.GetAlphaMask()); } } diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index d0e41a2617fb..bdf22ca0dc33 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -267,7 +267,7 @@ static void CreateNetWmAppIcon( sal_uInt16 nIcon, NetWmIconData& netwm_icon ) continue; vcl::bitmap::convertBitmap32To24Plus8(aIcon, aIcon); Bitmap icon = aIcon.GetBitmap(); - AlphaMask mask = aIcon.GetAlpha(); + AlphaMask mask = aIcon.GetAlphaMask(); BitmapReadAccess* iconData = icon.AcquireReadAccess(); BitmapReadAccess* maskData = mask.AcquireReadAccess(); netwm_icon[ pos++ ] = size; // width @@ -344,7 +344,7 @@ static bool lcl_SelectAppIconPixmap( SalDisplay const *pDisplay, SalX11Screen nX GC aMonoGC = XCreateGC( pDisplay->GetDisplay(), icon_mask, GCFunction|GCForeground|GCBackground, &aValues ); - Bitmap aMask = aIcon.GetAlpha(); + Bitmap aMask = aIcon.GetAlphaMask(); aMask.Invert(); X11SalBitmap *pMask = static_cast < X11SalBitmap * > diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index f0e41768f8f3..c40190ff4ed3 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1387,7 +1387,7 @@ public: aAbove.Move(aSrc.GetSizePixel().Width(),0); rDev.DrawBitmap(aAbove, aSrc.GetBitmap()); aAbove.Move(aSrc.GetSizePixel().Width(),0); - rDev.DrawBitmap(aAbove, aSrc.GetAlpha()); + rDev.DrawBitmap(aAbove, aSrc.GetAlphaMask()); // intermediates middle BitmapEx aResult = AlphaRecovery(rDev, aLocation, aSrc); @@ -1407,7 +1407,7 @@ public: aBelow.Move(aGrey.GetSizePixel().Width(),0); BitmapEx aGreyMask(aSrc.GetBitmap(), - aSrc.GetAlpha()); + aSrc.GetAlphaMask()); rDev.DrawBitmapEx(aBelow, aGreyMask); aLocation.Move(aSrc.GetSizePixel().Width()*6,0); |