[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - canvas/source

Tor Lillqvist tml at collabora.com
Thu Feb 9 09:53:21 UTC 2017


 canvas/source/cairo/cairo_canvashelper.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 60e55044891305756fc3fdbcbd8ddbd592c40df9
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Jan 26 08:41:59 2017 +0200

    tdf#105620: Fix placement of image embedded in graphic
    
    Change-Id: I3d399fe4aab9260817f171d4e69388a19eb85d21
    Reviewed-on: https://gerrit.libreoffice.org/33787
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index b2f673b..2290c1a 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -795,6 +795,12 @@ namespace cairocanvas
 
                             aScaledTextureMatrix.x0 = basegfx::fround( aScaledTextureMatrix.x0 );
                             aScaledTextureMatrix.y0 = basegfx::fround( aScaledTextureMatrix.y0 );
+
+                            double x1, y1, x2, y2;
+                            cairo_path_extents(pCairo, &x1, &y1, &x2, &y2);
+                            aScaledTextureMatrix.x0 -= (x1 * aScaledTextureMatrix.xx);
+                            aScaledTextureMatrix.y0 -= (y1 * aScaledTextureMatrix.yy);
+
                             cairo_pattern_set_matrix( pPattern, &aScaledTextureMatrix );
 
                             cairo_set_source( pCairo, pPattern );


More information about the Libreoffice-commits mailing list