include/vcl/vectorgraphicdata.hxx | 6 +++--- svx/source/svdraw/svdxcgv.cxx | 2 +- vcl/source/gdi/vectorgraphicdata.cxx | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-)
New commits: commit 84a16bda4daed72a8b32d9a13df85ea400351080 Author: Noel Grandin <[email protected]> AuthorDate: Fri Aug 1 16:30:21 2025 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Mon Aug 4 13:54:09 2025 +0200 BitmapEx->Bitmap in VectorGraphicData now that Bitmap can handle transparency Change-Id: I42b2e42229a917ea27d5893d4b8872306c45bf3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188774 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins diff --git a/include/vcl/vectorgraphicdata.hxx b/include/vcl/vectorgraphicdata.hxx index a7f484c7e7bf..da1550b47fbe 100644 --- a/include/vcl/vectorgraphicdata.hxx +++ b/include/vcl/vectorgraphicdata.hxx @@ -60,7 +60,7 @@ private: bool mbSequenceCreated; basegfx::B2DRange maRange; std::deque< css::uno::Reference< css::graphic::XPrimitive2D > > maSequence; - BitmapEx maReplacement; + Bitmap maReplacement; size_t mNestedBitmapSize; VectorGraphicDataType meType; @@ -104,8 +104,8 @@ public: /// data read and evtl. on demand creation const basegfx::B2DRange& getRange() const; const std::deque<css::uno::Reference<css::graphic::XPrimitive2D>>& getPrimitive2DSequence() const; - BitmapEx getBitmap(const Size& pixelSize) const; - const BitmapEx& getReplacement() const; + Bitmap getBitmap(const Size& pixelSize) const; + const Bitmap& getReplacement() const; BitmapChecksum GetChecksum() const; sal_Int32 getPageIndex() const diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index b26e3d799286..84cfc5833f60 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -440,7 +440,7 @@ Bitmap SdrExchangeView::GetMarkedObjBitmap(bool bNoVDevIfOneBmpMarked, const sal else { if (pGrafObj->isEmbeddedVectorGraphicData()) - aBmp = Bitmap(pGrafObj->GetGraphic().getVectorGraphicData()->getReplacement()); + aBmp = pGrafObj->GetGraphic().getVectorGraphicData()->getReplacement(); } } } diff --git a/vcl/source/gdi/vectorgraphicdata.cxx b/vcl/source/gdi/vectorgraphicdata.cxx index 9388049e8e98..784278f4effb 100644 --- a/vcl/source/gdi/vectorgraphicdata.cxx +++ b/vcl/source/gdi/vectorgraphicdata.cxx @@ -179,11 +179,11 @@ void VectorGraphicData::ensureReplacement() if (!maSequence.empty()) { - maReplacement = convertPrimitive2DSequenceToBitmapEx(maSequence, getRange()); + maReplacement = Bitmap(convertPrimitive2DSequenceToBitmapEx(maSequence, getRange())); } } -BitmapEx VectorGraphicData::getBitmap(const Size& pixelSize) const +Bitmap VectorGraphicData::getBitmap(const Size& pixelSize) const { if (!maReplacement.IsEmpty() && maReplacement.GetSizePixel() == pixelSize) return maReplacement; @@ -200,7 +200,7 @@ BitmapEx VectorGraphicData::getBitmap(const Size& pixelSize) const vcl::RenderPDFBitmaps(maDataContainer.getData(), maDataContainer.getSize(), aBitmaps, nUsePageIndex, 1, &sizeMM100); if (!aBitmaps.empty()) - return BitmapEx(aBitmaps[0]); + return aBitmaps[0]; } if (getPrimitive2DSequence().empty()) @@ -209,7 +209,7 @@ BitmapEx VectorGraphicData::getBitmap(const Size& pixelSize) const Size dpi( std::round(pixelSize.Width() / o3tl::convert(maRange.getWidth(), o3tl::Length::mm100, o3tl::Length::in)), std::round(pixelSize.Height() / o3tl::convert(maRange.getHeight(), o3tl::Length::mm100, o3tl::Length::in))); - return convertPrimitive2DSequenceToBitmapEx(maSequence, maRange, 4096 * 4096, o3tl::Length::mm100, dpi); + return Bitmap(convertPrimitive2DSequenceToBitmapEx(maSequence, maRange, 4096 * 4096, o3tl::Length::mm100, dpi)); } void VectorGraphicData::ensureSequenceAndRange() @@ -346,7 +346,7 @@ const std::deque< css::uno::Reference< css::graphic::XPrimitive2D > >& VectorGra return maSequence; } -const BitmapEx& VectorGraphicData::getReplacement() const +const Bitmap& VectorGraphicData::getReplacement() const { const_cast< VectorGraphicData* >(this)->ensureReplacement();
