diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2013-12-04 16:57:34 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2013-12-04 17:46:41 +0100 |
commit | f115ec6ce1ff4bf6e68ceb441f716a4c70ecfdf6 (patch) | |
tree | c5e3299902498c8a08a01bf3241de9835e69e6ff /cppcanvas | |
parent | 190c2fa39e18fd129e0efe7371f9ed35ad696a91 (diff) |
EMF+: Do not ignore source rectangle of the image to be rendered.
Change-Id: I4f861c7653c89d8f1ca73696e885f33f7bfc3b06
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 417264901ba6..ccb8bd666d27 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1826,6 +1826,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); @@ -1866,6 +1867,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()); |