Implementation of EMF driver OffsetViewportOrg and OffsetWindowOrg

callbacks using the EMR_SETVIEWPORTORGEX and EMR_SETWINDOWORGEX
metarecords respectively.
This commit is contained in:
Dave Belanger 2003-10-09 04:42:45 +00:00 committed by Alexandre Julliard
parent 8e5bb20542
commit 36a6c740c4
2 changed files with 28 additions and 2 deletions

View File

@ -84,8 +84,8 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
EMFDRV_ModifyWorldTransform, /* pModifyWorldTransform */
EMFDRV_MoveTo, /* pMoveTo */
EMFDRV_OffsetClipRgn, /* pOffsetClipRgn */
NULL, /* pOffsetViewportOrg */
NULL, /* pOffsetWindowOrg */
EMFDRV_OffsetViewportOrg, /* pOffsetViewportOrg */
EMFDRV_OffsetWindowOrg, /* pOffsetWindowOrg */
EMFDRV_PaintRgn, /* pPaintRgn */
EMFDRV_PatBlt, /* pPatBlt */
EMFDRV_Pie, /* pPie */

View File

@ -130,3 +130,29 @@ BOOL EMFDRV_ModifyWorldTransform( PHYSDEV dev, const XFORM *xform, INT mode)
return EMFDRV_WriteRecord( dev, &emr.emr );
}
INT EMFDRV_OffsetViewportOrg( PHYSDEV dev, INT x, INT y )
{
EMRSETVIEWPORTORGEX emr;
EMFDRV_PDEVICE* physDev = (EMFDRV_PDEVICE*)dev;
emr.emr.iType = EMR_SETVIEWPORTORGEX;
emr.emr.nSize = sizeof(emr);
emr.ptlOrigin.x = physDev->dc->vportOrgX + x;
emr.ptlOrigin.y = physDev->dc->vportOrgY + y;
return EMFDRV_WriteRecord( dev, &emr.emr );
}
INT EMFDRV_OffsetWindowOrg( PHYSDEV dev, INT x, INT y )
{
EMRSETWINDOWORGEX emr;
EMFDRV_PDEVICE* physDev = (EMFDRV_PDEVICE*)dev;
emr.emr.iType = EMR_SETWINDOWORGEX;
emr.emr.nSize = sizeof(emr);
emr.ptlOrigin.x = physDev->dc->wndOrgX + x;
emr.ptlOrigin.y = physDev->dc->wndOrgY + y;
return EMFDRV_WriteRecord( dev, &emr.emr );
}