diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-01-26 08:41:59 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2017-02-01 11:43:30 +0000 |
commit | b220bc6d82841b5b53b856d94a1eb99bb3a9f2d7 (patch) | |
tree | d2a0fa2b3e0e3815ee13fe65809f7d56bf6ce213 | |
parent | b834fad4a5b7fb6bd642769ed8803d0a65e50b00 (diff) |
tdf#105620: Fix placement of image embedded in graphic
Change-Id: I419e44d72f594fab0774152720f55c1d7d5366e6
Reviewed-on: https://gerrit.libreoffice.org/33723
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r-- | canvas/source/cairo/cairo_canvashelper.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx index e75300ad1621..6e3100d0e6dc 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 ); |