Commit 2f2cbd41 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

gdiplus/metafile: Implement playback for EmfPlusRecordTypeDrawArc.

parent a063ca2e
......@@ -432,6 +432,18 @@ typedef struct EmfPlusDrawPath
DWORD PenId;
} EmfPlusDrawPath;
typedef struct EmfPlusDrawArc
{
EmfPlusRecordHeader Header;
float StartAngle;
float SweepAngle;
union
{
EmfPlusRect rect;
EmfPlusRectF rectF;
} RectData;
} EmfPlusDrawArc;
typedef struct EmfPlusDrawPie
{
EmfPlusRecordHeader Header;
......@@ -3058,6 +3070,27 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
return GdipDrawPath(real_metafile->playback_graphics, real_metafile->objtable[draw->PenId].u.pen,
real_metafile->objtable[path].u.path);
}
case EmfPlusRecordTypeDrawArc:
{
EmfPlusDrawArc *draw = (EmfPlusDrawArc *)header;
BYTE pen = flags & 0xff;
if (pen >= EmfPlusObjectTableSize || real_metafile->objtable[pen].type != ObjectTypePen)
return InvalidParameter;
if (dataSize != FIELD_OFFSET(EmfPlusDrawArc, RectData) - sizeof(EmfPlusRecordHeader) +
(flags & 0x4000 ? sizeof(EmfPlusRect) : sizeof(EmfPlusRectF)))
return InvalidParameter;
if (flags & 0x4000) /* C */
return GdipDrawArcI(real_metafile->playback_graphics, real_metafile->objtable[pen].u.pen,
draw->RectData.rect.X, draw->RectData.rect.Y, draw->RectData.rect.Width,
draw->RectData.rect.Height, draw->StartAngle, draw->SweepAngle);
else
return GdipDrawArc(real_metafile->playback_graphics, real_metafile->objtable[pen].u.pen,
draw->RectData.rectF.X, draw->RectData.rectF.Y, draw->RectData.rectF.Width,
draw->RectData.rectF.Height, draw->StartAngle, draw->SweepAngle);
}
case EmfPlusRecordTypeDrawPie:
{
EmfPlusDrawPie *draw = (EmfPlusDrawPie *)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