gdiplus: Implement SetPageTransform playback.
This commit is contained in:
parent
6518edfa5f
commit
7c12d889d4
|
@ -528,8 +528,14 @@ static GpStatus METAFILE_PlaybackUpdateWorldTransform(GpMetafile *metafile)
|
||||||
|
|
||||||
if (stat == Ok)
|
if (stat == Ok)
|
||||||
{
|
{
|
||||||
/* FIXME: Prepend page transform. */
|
REAL scale = units_to_pixels(1.0, metafile->page_unit, 96.0);
|
||||||
|
|
||||||
|
if (metafile->page_unit != UnitDisplay)
|
||||||
|
scale *= metafile->page_scale;
|
||||||
|
|
||||||
|
stat = GdipScaleMatrix(real_transform, scale, scale, MatrixOrderPrepend);
|
||||||
|
|
||||||
|
if (stat == Ok)
|
||||||
stat = GdipMultiplyMatrix(real_transform, metafile->world_transform, MatrixOrderPrepend);
|
stat = GdipMultiplyMatrix(real_transform, metafile->world_transform, MatrixOrderPrepend);
|
||||||
|
|
||||||
if (stat == Ok)
|
if (stat == Ok)
|
||||||
|
@ -545,6 +551,7 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
|
||||||
EmfPlusRecordType recordType, UINT flags, UINT dataSize, GDIPCONST BYTE *data)
|
EmfPlusRecordType recordType, UINT flags, UINT dataSize, GDIPCONST BYTE *data)
|
||||||
{
|
{
|
||||||
GpStatus stat;
|
GpStatus stat;
|
||||||
|
GpMetafile *real_metafile = (GpMetafile*)metafile;
|
||||||
|
|
||||||
TRACE("(%p,%x,%x,%d,%p)\n", metafile, recordType, flags, dataSize, data);
|
TRACE("(%p,%x,%x,%d,%p)\n", metafile, recordType, flags, dataSize, data);
|
||||||
|
|
||||||
|
@ -655,6 +662,19 @@ GpStatus WINGDIPAPI GdipPlayMetafileRecord(GDIPCONST GpMetafile *metafile,
|
||||||
|
|
||||||
return stat;
|
return stat;
|
||||||
}
|
}
|
||||||
|
case EmfPlusRecordTypeSetPageTransform:
|
||||||
|
{
|
||||||
|
EmfPlusSetPageTransform *record = (EmfPlusSetPageTransform*)header;
|
||||||
|
GpUnit unit = (GpUnit)flags;
|
||||||
|
|
||||||
|
if (dataSize + sizeof(EmfPlusRecordHeader) < sizeof(EmfPlusSetPageTransform))
|
||||||
|
return InvalidParameter;
|
||||||
|
|
||||||
|
real_metafile->page_unit = unit;
|
||||||
|
real_metafile->page_scale = record->PageScale;
|
||||||
|
|
||||||
|
return METAFILE_PlaybackUpdateWorldTransform(real_metafile);
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
FIXME("Not implemented for record type %x\n", recordType);
|
FIXME("Not implemented for record type %x\n", recordType);
|
||||||
return NotImplemented;
|
return NotImplemented;
|
||||||
|
@ -774,7 +794,7 @@ GpStatus WINGDIPAPI GdipEnumerateMetafileSrcRectDestPoints(GpGraphics *graphics,
|
||||||
|
|
||||||
if (stat == Ok)
|
if (stat == Ok)
|
||||||
{
|
{
|
||||||
real_metafile->page_unit = UnitPixel; /* FIXME: Use frame unit here? */
|
real_metafile->page_unit = UnitDisplay;
|
||||||
real_metafile->page_scale = 1.0;
|
real_metafile->page_scale = 1.0;
|
||||||
stat = METAFILE_PlaybackUpdateWorldTransform(real_metafile);
|
stat = METAFILE_PlaybackUpdateWorldTransform(real_metafile);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue