Commit 9c47baa3 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdiplus/metafile: Implement playback for EmfPlusRecordTypeFillPie.

parent f75b57ad
...@@ -476,6 +476,19 @@ typedef struct EmfPlusFillEllipse ...@@ -476,6 +476,19 @@ typedef struct EmfPlusFillEllipse
} RectData; } RectData;
} EmfPlusFillEllipse; } EmfPlusFillEllipse;
typedef struct EmfPlusFillPie
{
EmfPlusRecordHeader Header;
DWORD BrushId;
float StartAngle;
float SweepAngle;
union
{
EmfPlusRect rect;
EmfPlusRectF rectF;
} RectData;
} EmfPlusFillPie;
typedef struct EmfPlusFont typedef struct EmfPlusFont
{ {
DWORD Version; DWORD Version;
...@@ -2917,6 +2930,47 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile, ...@@ -2917,6 +2930,47 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
GdipDeleteBrush((GpBrush *)solidfill); GdipDeleteBrush((GpBrush *)solidfill);
return stat; return stat;
} }
case EmfPlusRecordTypeFillPie:
{
EmfPlusFillPie *fill = (EmfPlusFillPie *)header;
GpSolidFill *solidfill = NULL;
GpBrush *brush;
if (dataSize <= FIELD_OFFSET(EmfPlusFillPie, RectData) - sizeof(EmfPlusRecordHeader))
return InvalidParameter;
dataSize -= FIELD_OFFSET(EmfPlusFillPie, RectData) - sizeof(EmfPlusRecordHeader);
if (dataSize != (flags & 0x4000 ? sizeof(EmfPlusRect) : sizeof(EmfPlusRectF)))
return InvalidParameter;
if (flags & 0x8000) /* S */
{
stat = GdipCreateSolidFill(fill->BrushId, (GpSolidFill **)&solidfill);
if (stat != Ok)
return stat;
brush = (GpBrush *)solidfill;
}
else
{
if (fill->BrushId >= EmfPlusObjectTableSize ||
real_metafile->objtable[fill->BrushId].type != ObjectTypeBrush)
return InvalidParameter;
brush = real_metafile->objtable[fill->BrushId].u.brush;
}
if (flags & 0x4000) /* C */
stat = GdipFillPieI(real_metafile->playback_graphics, brush, fill->RectData.rect.X,
fill->RectData.rect.Y, fill->RectData.rect.Width, fill->RectData.rect.Height,
fill->StartAngle, fill->SweepAngle);
else
stat = GdipFillPie(real_metafile->playback_graphics, brush, fill->RectData.rectF.X,
fill->RectData.rectF.Y, fill->RectData.rectF.Width, fill->RectData.rectF.Height,
fill->StartAngle, fill->SweepAngle);
GdipDeleteBrush((GpBrush *)solidfill);
return stat;
}
case EmfPlusRecordTypeDrawPath: case EmfPlusRecordTypeDrawPath:
{ {
EmfPlusDrawPath *draw = (EmfPlusDrawPath *)header; EmfPlusDrawPath *draw = (EmfPlusDrawPath *)header;
......
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