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 3cbe3a0259
Author: Noel Grandin <noel.grandin@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.grandin@collabora.co.uk>
This commit is contained in:
parent
f91effb36b
commit
7b807a6b79
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue