diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2013-12-04 16:57:34 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2013-12-06 12:29:41 +0100 |
commit | 516dfa47d35e934cacd0ab66ae032f57482a6ded (patch) | |
tree | 6b7682b879e0f25721085b91a63495f7711a4e5e /cppcanvas | |
parent | e8a049e0f099bf0716ab8b8be77eb70aa1d198a6 (diff) |
EMF+: Do not ignore source rectangle of the image to be rendered.
Change-Id: I4f861c7653c89d8f1ca73696e885f33f7bfc3b06
Reviewed-on: https://gerrit.libreoffice.org/6932
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cppcanvas')
-rw-r--r-- | cppcanvas/source/mtfrenderer/emfplus.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index a289610b6679..a8fca098f2b5 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1857,6 +1857,7 @@ namespace cppcanvas sal_Int32 aCount; ReadRectangle (rMF, sx, sy, sw, sh); + Rectangle aSource(Point(sx, sy), Size(sw, sh)); SAL_INFO("cppcanvas.emf", "EMF+ " << (type == EmfPlusRecordTypeDrawImagePoints ? "DrawImagePoints" : "DrawImage") << " source rectangle: " << sx << "," << sy << " " << sw << "x" << sh); @@ -1897,6 +1898,7 @@ namespace cppcanvas if (bValid) { BitmapEx aBmp( image.graphic.GetBitmapEx () ); + aBmp.Crop( aSource ); Size aSize( aBmp.GetSizePixel() ); SAL_INFO("cppcanvas.emf", "EMF+ bitmap size: " << aSize.Width() << "x" << aSize.Height()); |