Kaydet (Commit) cf6b2f0e authored tarafından Radek Doulik's avatar Radek Doulik

implemented EmfPlusRecordTypeFillEllipse record

Change-Id: Id9362d05ddae2066f2fa289640f447393d7cda84
üst b6f6c3a2
......@@ -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
......@@ -1296,6 +1298,30 @@ namespace cppcanvas
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:
{
EMFP_DEBUG (printf ("EMF+ FillRects\n"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment