drawinglayer/source/primitive2d/patternfillprimitive2d.cxx | 6 ++-- drawinglayer/source/processor2d/hittestprocessor2d.cxx | 16 ++++++------ drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 2 - include/drawinglayer/primitive2d/patternfillprimitive2d.hxx | 2 - include/drawinglayer/processor2d/hittestprocessor2d.hxx | 4 +-- 5 files changed, 15 insertions(+), 15 deletions(-)
New commits: commit 7caf45bc06e5b4459aeb173393e5898dff761d50 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Aug 14 16:56:35 2025 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Aug 15 07:21:49 2025 +0200 BitmapEx->Bitmap in HitTestProcessor2D now that Bitmap supports transparency Change-Id: Iae2f30e9acdbbf1ed7d7ca700f8c75810f8849f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189616 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx index d0e1081a65e4..bc363cf74117 100644 --- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx +++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx @@ -144,7 +144,7 @@ namespace drawinglayer::processor2d return bRetval; } - void HitTestProcessor2D::checkBitmapHit(basegfx::B2DRange aRange, const BitmapEx& rBitmapEx, const basegfx::B2DHomMatrix& rTransform) + void HitTestProcessor2D::checkBitmapHit(basegfx::B2DRange aRange, const Bitmap& rBitmap, const basegfx::B2DHomMatrix& rTransform) { if(!getHitTextOnly()) { @@ -153,10 +153,10 @@ namespace drawinglayer::processor2d // transparency into account if(!aRange.isEmpty()) { - const Size& rSizePixel(rBitmapEx.GetSizePixel()); + const Size aSizePixel(rBitmap.GetSizePixel()); // When tiled rendering, don't bother with the pixel size of the candidate. - if(rSizePixel.Width() && rSizePixel.Height() && !comphelper::LibreOfficeKit::isActive()) + if(aSizePixel.Width() && aSizePixel.Height() && !comphelper::LibreOfficeKit::isActive()) { basegfx::B2DHomMatrix aBackTransform( getViewInformation2D().getObjectToViewTransformation() * @@ -168,10 +168,10 @@ namespace drawinglayer::processor2d if(aUnitRange.isInside(aRelativePoint)) { - const sal_Int32 nX(basegfx::fround(aRelativePoint.getX() * rSizePixel.Width())); - const sal_Int32 nY(basegfx::fround(aRelativePoint.getY() * rSizePixel.Height())); + const sal_Int32 nX(basegfx::fround(aRelativePoint.getX() * aSizePixel.Width())); + const sal_Int32 nY(basegfx::fround(aRelativePoint.getY() * aSizePixel.Height())); - mbHit = (0 != rBitmapEx.GetAlpha(nX, nY)); + mbHit = (0 != rBitmap.GetPixelColor(nX, nY).GetAlpha()); } } else @@ -466,7 +466,7 @@ namespace drawinglayer::processor2d { checkBitmapHit( rCandidate.getB2DRange(getViewInformation2D()), - BitmapEx(rBitmapAlphaCandidate.getBitmap()), + rBitmapAlphaCandidate.getBitmap(), rBitmapAlphaCandidate.getTransform()); } break; @@ -477,7 +477,7 @@ namespace drawinglayer::processor2d const primitive2d::BitmapPrimitive2D& rBitmapCandidate(static_cast< const primitive2d::BitmapPrimitive2D& >(rCandidate)); checkBitmapHit( rCandidate.getB2DRange(getViewInformation2D()), - BitmapEx(rBitmapCandidate.getBitmap()), + rBitmapCandidate.getBitmap(), rBitmapCandidate.getTransform()); break; } diff --git a/include/drawinglayer/processor2d/hittestprocessor2d.hxx b/include/drawinglayer/processor2d/hittestprocessor2d.hxx index 0f1f6d232d85..5a72498f44e3 100644 --- a/include/drawinglayer/processor2d/hittestprocessor2d.hxx +++ b/include/drawinglayer/processor2d/hittestprocessor2d.hxx @@ -27,7 +27,7 @@ namespace basegfx { class B2DPolygon; } namespace basegfx { class B2DPolyPolygon; } namespace drawinglayer::primitive2d { class ScenePrimitive2D; } -class BitmapEx; +class Bitmap; namespace drawinglayer::processor2d { @@ -66,7 +66,7 @@ namespace drawinglayer::processor2d const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DVector& rDiscreteHitTolerancePerAxis) const; void check3DHit(const primitive2d::ScenePrimitive2D& rCandidate); - void checkBitmapHit(basegfx::B2DRange aRange, const BitmapEx& rBitmapEx, const basegfx::B2DHomMatrix& rTransform); + void checkBitmapHit(basegfx::B2DRange aRange, const Bitmap& rBitmap, const basegfx::B2DHomMatrix& rTransform); public: HitTestProcessor2D( commit 50ec3c43d6f088c22f860b25789c71c168e2775d Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Aug 14 14:28:13 2025 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Aug 15 07:21:39 2025 +0200 use Bitmap in createTileImage now that Bitmap supports transparency Change-Id: I751c3a1ae79eb448f7668a76353483cd55db365f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx index b3e98ecad072..cf0b6ff55d4d 100644 --- a/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/patternfillprimitive2d.cxx @@ -184,7 +184,7 @@ namespace drawinglayer::primitive2d } // create buffered content in given resolution - BitmapEx PatternFillPrimitive2D::createTileImage(sal_uInt32 nWidth, sal_uInt32 nHeight) const + Bitmap PatternFillPrimitive2D::createTileImage(sal_uInt32 nWidth, sal_uInt32 nHeight) const { const geometry::ViewInformation2D aViewInformation2D; Primitive2DContainer aContent(createContent(aViewInformation2D)); @@ -194,12 +194,12 @@ namespace drawinglayer::primitive2d std::move(aContent))); primitive2d::Primitive2DContainer xEmbedSeq { xEmbedRef }; - return BitmapEx(convertToBitmap( + return convertToBitmap( std::move(xEmbedSeq), aViewInformation2D, nWidth, nHeight, - nWidth * nHeight)); + nWidth * nHeight); } Primitive2DReference PatternFillPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 3264cdfc2a4a..8dce98808e0a 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -1073,7 +1073,7 @@ void VclPixelProcessor2D::processPatternFillPrimitive2D( rPrimitive.getTileSize(nTileWidth, nTileHeight, getViewInformation2D()); if (nTileWidth == 0 || nTileHeight == 0) return; - BitmapEx aTileImage = rPrimitive.createTileImage(nTileWidth, nTileHeight); + Bitmap aTileImage = rPrimitive.createTileImage(nTileWidth, nTileHeight); tools::Rectangle aMaskRect = vcl::unotools::rectangleFromB2DRectangle(aMaskRange); // Unless smooth edges are needed, simply use clipping. diff --git a/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx b/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx index 3b41fab036a3..11c880c7b9f2 100644 --- a/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/patternfillprimitive2d.hxx @@ -89,7 +89,7 @@ namespace drawinglayer::primitive2d /// helper which creates the content - checks if clipping is needed and eventually /// creates buffered content to speed up rendering - BitmapEx createTileImage(sal_uInt32 nWidth, sal_uInt32 nHeight) const; + Bitmap createTileImage(sal_uInt32 nWidth, sal_uInt32 nHeight) const; /// helper that is capable to calculate the needed discrete buffer size for /// eventually buffered content