vcl/source/filter/ipict/ipict.cxx | 18 +++++++++--------- vcl/source/image/Image.cxx | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-)
New commits: commit 821262c78bc554fa5ef42ddc665e3c046e01fefa Author: Noel Grandin <[email protected]> AuthorDate: Sun Aug 31 07:45:51 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Sun Aug 31 13:23:07 2025 +0200 BitmapEx->Bitmap in pict now that Bitmap supports transparency Change-Id: I77c5a1974e00cbccf7a60939c1de4d1e6bbacdec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190428 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/vcl/source/filter/ipict/ipict.cxx b/vcl/source/filter/ipict/ipict.cxx index cf39ebbb2a08..46a86518052c 100644 --- a/vcl/source/filter/ipict/ipict.cxx +++ b/vcl/source/filter/ipict/ipict.cxx @@ -230,7 +230,7 @@ private: sal_uInt64 ReadAndDrawText(); - sal_uInt64 ReadPixMapEtc(BitmapEx & rBitmap, bool bBaseAddr, bool bColorTable, + sal_uInt64 ReadPixMapEtc(Bitmap & rBitmap, bool bBaseAddr, bool bColorTable, tools::Rectangle * pSrcRect, tools::Rectangle * pDestRect, bool bMode, bool bMaskRgn); @@ -497,7 +497,7 @@ sal_uInt64 PictReader::ReadPixPattern(PictReader::Pattern &pattern) pPict->ReadUInt16(nPatType); if (nPatType==1) { pattern.read(*pPict); - BitmapEx aBMP; + Bitmap aBMP; nDataSize=ReadPixMapEtc(aBMP,false,true,nullptr,nullptr,false,false); // CHANGEME: use average pixmap colors to update the pattern, ... if (nDataSize!=0xffffffff) nDataSize+=10; @@ -710,7 +710,7 @@ sal_uInt64 PictReader::ReadAndDrawText() return nDataLen; } -sal_uInt64 PictReader::ReadPixMapEtc( BitmapEx &rBitmap, bool bBaseAddr, bool bColorTable, tools::Rectangle* pSrcRect, +sal_uInt64 PictReader::ReadPixMapEtc( Bitmap &rBitmap, bool bBaseAddr, bool bColorTable, tools::Rectangle* pSrcRect, tools::Rectangle* pDestRect, bool bMode, bool bMaskRgn ) { std::unique_ptr<vcl::bitmap::RawBitmap> pBitmap; @@ -1820,7 +1820,7 @@ sal_uInt64 PictReader::ReadData(sal_uInt16 nOpcode) break; case 0x0090: { // BitsRect - BitmapEx aBmp; + Bitmap aBmp; tools::Rectangle aSrcRect, aDestRect; nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, false); DrawingMethod( PictDrawingMethod::PAINT ); @@ -1828,7 +1828,7 @@ sal_uInt64 PictReader::ReadData(sal_uInt16 nOpcode) break; } case 0x0091: { // BitsRgn - BitmapEx aBmp; + Bitmap aBmp; tools::Rectangle aSrcRect, aDestRect; nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, true); DrawingMethod( PictDrawingMethod::PAINT ); @@ -1847,7 +1847,7 @@ sal_uInt64 PictReader::ReadData(sal_uInt16 nOpcode) break; } case 0x0098: { // PackBitsRect - BitmapEx aBmp; + Bitmap aBmp; tools::Rectangle aSrcRect, aDestRect; nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, false); DrawingMethod( PictDrawingMethod::PAINT ); @@ -1855,7 +1855,7 @@ sal_uInt64 PictReader::ReadData(sal_uInt16 nOpcode) break; } case 0x0099: { // PackBitsRgn - BitmapEx aBmp; + Bitmap aBmp; tools::Rectangle aSrcRect, aDestRect; nDataSize=ReadPixMapEtc(aBmp, false, true, &aSrcRect, &aDestRect, true, true); DrawingMethod( PictDrawingMethod::PAINT ); @@ -1863,7 +1863,7 @@ sal_uInt64 PictReader::ReadData(sal_uInt16 nOpcode) break; } case 0x009a: { // DirectBitsRect - BitmapEx aBmp; + Bitmap aBmp; tools::Rectangle aSrcRect, aDestRect; nDataSize=ReadPixMapEtc(aBmp, true, false, &aSrcRect, &aDestRect, true, false); DrawingMethod( PictDrawingMethod::PAINT ); @@ -1871,7 +1871,7 @@ sal_uInt64 PictReader::ReadData(sal_uInt16 nOpcode) break; } case 0x009b: { // DirectBitsRgn - BitmapEx aBmp; + Bitmap aBmp; tools::Rectangle aSrcRect, aDestRect; nDataSize=ReadPixMapEtc(aBmp, true, false, &aSrcRect, &aDestRect, true, true); DrawingMethod( PictDrawingMethod::PAINT ); commit 94bcb03e4ec3c6e9258da9b52b526bba24993274 Author: Noel Grandin <[email protected]> AuthorDate: Sun Aug 31 07:42:22 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Sun Aug 31 13:22:59 2025 +0200 BitmapEx->Bitmap in Image::Draw now that Bitmap supports transparency Change-Id: I97f802b64b2e4c305ab12c2ff8b39433ddadfd4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190427 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx index 5fc2d9cf154c..03e298a39c00 100644 --- a/vcl/source/image/Image.cxx +++ b/vcl/source/image/Image.cxx @@ -150,19 +150,19 @@ void Image::Draw(OutputDevice* pOutDev, const Point& rPos, DrawImageFlags nStyle if (nStyle & DrawImageFlags::SemiTransparent) { - BitmapEx aTempBitmapEx(aRenderBmp); - if (aTempBitmapEx.IsAlpha()) + Bitmap aTempBitmap(aRenderBmp); + if (aTempBitmap.HasAlpha()) { - Bitmap aAlphaBmp(aTempBitmapEx.GetAlphaMask().GetBitmap()); + Bitmap aAlphaBmp(aTempBitmap.CreateAlphaMask().GetBitmap()); aAlphaBmp.Adjust(50); - aTempBitmapEx = BitmapEx(aTempBitmapEx.GetBitmap(), AlphaMask(aAlphaBmp)); + aTempBitmap = Bitmap(aTempBitmap.CreateColorBitmap(), AlphaMask(aAlphaBmp)); } else { sal_uInt8 cErase = 128; - aTempBitmapEx = BitmapEx(aTempBitmapEx.GetBitmap(), AlphaMask(aTempBitmapEx.GetSizePixel(), &cErase)); + aTempBitmap = Bitmap(aTempBitmap, AlphaMask(aTempBitmap.GetSizePixel(), &cErase)); } - aRenderBmp = Bitmap(aTempBitmapEx); + aRenderBmp = aTempBitmap; } }
