Commit d1fa4b2d authored by Dave Belanger's avatar Dave Belanger Committed by Alexandre Julliard

Spit out EMR_RESTOREDC metarecords with -1 as argument as long as we

don't get to the saved state we want.
parent ca2902f3
...@@ -33,11 +33,24 @@ INT EMFDRV_SaveDC( PHYSDEV dev ) ...@@ -33,11 +33,24 @@ INT EMFDRV_SaveDC( PHYSDEV dev )
BOOL EMFDRV_RestoreDC( PHYSDEV dev, INT level ) BOOL EMFDRV_RestoreDC( PHYSDEV dev, INT level )
{ {
EMFDRV_PDEVICE* physDev = (EMFDRV_PDEVICE*)dev;
EMRRESTOREDC emr; EMRRESTOREDC emr;
emr.emr.iType = EMR_RESTOREDC; emr.emr.iType = EMR_RESTOREDC;
emr.emr.nSize = sizeof(emr); emr.emr.nSize = sizeof(emr);
emr.iRelative = level; emr.iRelative = -1;
return EMFDRV_WriteRecord( dev, &emr.emr ); if (level == -1)
return EMFDRV_WriteRecord( dev, &emr.emr );
else if (level > 0 && level <= physDev->dc->saveLevel)
{
while (level >= physDev->dc->saveLevel)
{
EMFDRV_WriteRecord( dev, &emr.emr );
level--;
}
return TRUE;
}
return FALSE;
} }
UINT EMFDRV_SetTextAlign( PHYSDEV dev, UINT align ) UINT EMFDRV_SetTextAlign( PHYSDEV dev, UINT align )
......
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