diff options
Diffstat (limited to 'cppcanvas/source/mtfrenderer/emfplus.cxx')
-rw-r--r-- | cppcanvas/source/mtfrenderer/emfplus.cxx | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 341e29e3943c..bf9e3b89099d 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -67,7 +67,7 @@ namespace #define EmfPlusRecordTypeDrawEllipse 0x400F #define EmfPlusRecordTypeFillPie 0x4010 #define EmfPlusRecordTypeDrawPie 0x4011 -//TODO EmfPlusRecordTypeDrawArc 0x4012 +#define EmfPlusRecordTypeDrawArc 0x4012 //TODO EmfPlusRecordTypeFillRegion 0x4013 #define EmfPlusRecordTypeFillPath 0x4014 #define EmfPlusRecordTypeDrawPath 0x4015 @@ -224,6 +224,7 @@ const char* emfTypeToName(sal_uInt16 type) case EmfPlusRecordTypeDrawEllipse: return "EmfPlusRecordTypeDrawEllipse"; case EmfPlusRecordTypeFillPie: return "EmfPlusRecordTypeFillPie"; case EmfPlusRecordTypeDrawPie: return "EmfPlusRecordTypeDrawPie"; + case EmfPlusRecordTypeDrawArc: return "EmfPlusRecordTypeDrawArc"; case EmfPlusRecordTypeFillPath: return "EmfPlusRecordTypeFillPath"; case EmfPlusRecordTypeDrawPath: return "EmfPlusRecordTypeDrawPath"; case EmfPlusRecordTypeDrawImage: return "EmfPlusRecordTypeDrawImage"; @@ -1903,6 +1904,7 @@ namespace cppcanvas break; case EmfPlusRecordTypeFillPie: case EmfPlusRecordTypeDrawPie: + case EmfPlusRecordTypeDrawArc: { float startAngle, sweepAngle; @@ -1914,10 +1916,14 @@ namespace cppcanvas rMF.ReadUInt32( brushIndexOrColor ); SAL_INFO("cppcanvas.emf", "EMF+ FillPie colorOrIndex: " << brushIndexOrColor); } - else + else if ( type == EmfPlusRecordTypeDrawPie ) { SAL_INFO("cppcanvas.emf", "EMF+ DrawPie"); } + else + { + SAL_INFO("cppcanvas.emf", "EMF+ DrawArc"); + } rMF.ReadFloat( startAngle ).ReadFloat( sweepAngle ); float dx, dy, dw, dh; @@ -1948,8 +1954,11 @@ namespace cppcanvas " startAngle: " << startAngle << " sweepAngle: " << sweepAngle); B2DPolygon polygon = basegfx::tools::createPolygonFromEllipseSegment (mappedCenter, mappedSize.getX (), mappedSize.getY (), startAngle, endAngle); - polygon.append (mappedCenter); - polygon.setClosed (true); + if ( type != EmfPlusRecordTypeDrawArc ) + { + polygon.append (mappedCenter); + polygon.setClosed (true); + } B2DPolyPolygon polyPolygon (polygon); if ( type == EmfPlusRecordTypeFillPie ) |