Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2750

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/50/2750/1

implemented EmfPlusRecordTypeFillEllipse record

(cherry picked from commit cf6b2f0ecef2c23c24114ca1a1609a4a81ade8a1)

Conflicts:
        cppcanvas/source/mtfrenderer/emfplus.cxx

Change-Id: Id9362d05ddae2066f2fa289640f447393d7cda84
Reviewed-on: https://gerrit.libreoffice.org/2749
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
(cherry picked from commit f820b5b5b97fff0393a2c346f579384e63f7c2db)
---
M cppcanvas/source/mtfrenderer/emfplus.cxx
1 file changed, 27 insertions(+), 1 deletion(-)



diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 1dbbd82..383ce31 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -53,6 +53,8 @@
 #define EmfPlusRecordTypeFillRects 16394
 #define EmfPlusRecordTypeFillPolygon 16396
 #define EmfPlusRecordTypeDrawLines 16397
+#define EmfPlusRecordTypeFillEllipse 16398
+#define EmfPlusRecordTypeDrawEllipse 16399
 #define EmfPlusRecordTypeFillPie 16400
 #define EmfPlusRecordTypeFillPath 16404
 #define EmfPlusRecordTypeDrawPath 16405
@@ -1289,7 +1291,31 @@
 
                         EMFP_DEBUG (printf ("EMF+ FillPath slot: %u\n", (unsigned int)index));
 
-                        EMFPPlusFillPolygon (((EMFPPath*) aObjects [index])->GetPolygon (*this), 
rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor);
+                            EMFPPlusFillPolygon (((EMFPPath*) aObjects [index])->GetPolygon 
(*this), rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor);
+                        }
+                        break;
+                case EmfPlusRecordTypeFillEllipse:
+                    {
+                        sal_uInt32 index = flags & 0xff;
+                        sal_uInt32 brushIndexOrColor;
+
+                        rMF >> brushIndexOrColor;
+
+                        EMFP_DEBUG (printf ("EMF+ FillEllipse slot: %u\n", (unsigned int)index));
+
+                        float dx, dy, dw, dh;
+
+                        ReadRectangle (rMF, dx, dy, dw, dh, flags & 0x4000);
+
+                        EMFP_DEBUG (printf ("EMF+ RectData: %f,%f %fx%f\n", dx, dy, dw, dh));
+
+                        B2DPoint mappedCenter (Map (dx + dw/2, dy + dh/2));
+                        B2DSize mappedSize( MapSize (dw/2, dh/2));
+
+                        ::basegfx::B2DPolyPolygon polyPolygon( ::basegfx::B2DPolygon( 
::basegfx::tools::createPolygonFromEllipse( mappedCenter, mappedSize.getX (), mappedSize.getY () ) 
) );
+
+                        EMFPPlusFillPolygon( polyPolygon,
+                                             rFactoryParms, rState, rCanvas, flags & 0x8000, 
brushIndexOrColor );
                     }
                     break;
                 case EmfPlusRecordTypeFillRects:

-- 
To view, visit https://gerrit.libreoffice.org/2750
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9362d05ddae2066f2fa289640f447393d7cda84
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0-2
Gerrit-Owner: Fridrich Strba <fridrich@documentfoundation.org>
Gerrit-Reviewer: Radek DoulĂ­k <rodo@novell.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.