cppcanvas/source/mtfrenderer/emfplus.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 1531f609673a1fdce18648f1ee0ab04e0432914c
Author: Matúš Kukan <[email protected]>
Date:   Wed Dec 4 16:57:34 2013 +0100

    EMF+: Do not ignore source rectangle of the image to be rendered.
    
    Conflicts:
        cppcanvas/source/mtfrenderer/emfplus.cxx
    
    Change-Id: I4f861c7653c89d8f1ca73696e885f33f7bfc3b06

diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx 
b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 7b8862c..aeb52af 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1816,6 +1816,7 @@ namespace cppcanvas
                             sal_Int32 aCount;
 
                             ReadRectangle (rMF, sx, sy, sw, sh);
+                            Rectangle aSource(Point(sx, sy), Size(sw, sh));
 
                             EMFP_DEBUG (printf ("EMF+ %s source rectangle: 
%f,%f %fx%f\n", type == EmfPlusRecordTypeDrawImagePoints ? "DrawImagePoints" : 
"DrawImage", sx, sy, sw, sh));
 
@@ -1856,6 +1857,7 @@ namespace cppcanvas
 
                             if (bValid) {
                                 BitmapEx aBmp( image.graphic.GetBitmapEx () );
+                                aBmp.Crop( aSource );
 
                                 Size aSize( aBmp.GetSizePixel() );
                                 EMFP_DEBUG (printf ("EMF+ bitmap size: 
%ldx%ld\n", aSize.Width(), aSize.Height()));
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to