drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 8 ++++++++ 1 file changed, 8 insertions(+)
New commits: commit 7b807a6b793198c00db9b2c2c3a5eb3ebfe16ad9 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Jun 21 12:28:30 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Jun 21 18:25:10 2024 +0200 tdf#161086 bitmap location wrong with SVG with an embedded PNG we need to transform the location of the wallpaper rect to match where we want the wallpaper to start tiling from. regression from commit 3cbe3a0259bea4dec70e72191ec3c03441926a07 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Mon Jun 14 15:05:59 2021 +0200 tdf#101083 speed up SVG rendering with pattern fill Change-Id: I624edd63135875fdc9526015f0f5642d5c694934 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169332 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 4882847bcc2c..394b18ca7162 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -1091,6 +1091,10 @@ void VclPixelProcessor2D::processPatternFillPrimitive2D( mpOutputDevice->IntersectClipRegion(vcl::Region(aMask)); Wallpaper aWallpaper(aTileImage); aWallpaper.SetColor(COL_TRANSPARENT); + Point aPaperPt(aMaskRect.getX() % aTileImage.GetSizePixel().Width(), + aMaskRect.getY() % aTileImage.GetSizePixel().Height()); + tools::Rectangle aPaperRect(aPaperPt, aTileImage.GetSizePixel()); + aWallpaper.SetRect(aPaperRect); mpOutputDevice->DrawWallpaper(aMaskRect, aWallpaper); mpOutputDevice->Pop(); return; @@ -1117,6 +1121,10 @@ void VclPixelProcessor2D::processPatternFillPrimitive2D( { Wallpaper aWallpaper(aTileImage); aWallpaper.SetColor(COL_TRANSPARENT); + Point aPaperPt(aMaskRect.getX() % aTileImage.GetSizePixel().Width(), + aMaskRect.getY() % aTileImage.GetSizePixel().Height()); + tools::Rectangle aPaperRect(aPaperPt, aTileImage.GetSizePixel()); + aWallpaper.SetRect(aPaperRect); mpOutputDevice->DrawWallpaper(aMaskRect, aWallpaper); }