gdiplus/metafile: Implement playback for EmfPlusRecordTypeDrawArc.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Vincent Povirk <vincent@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a063ca2e5b
commit
2f2cbd4150
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue