Commit 36a6c740 authored by Dave Belanger's avatar Dave Belanger Committed by Alexandre Julliard

Implementation of EMF driver OffsetViewportOrg and OffsetWindowOrg

callbacks using the EMR_SETVIEWPORTORGEX and EMR_SETWINDOWORGEX metarecords respectively.
parent 8e5bb205
...@@ -84,8 +84,8 @@ static const DC_FUNCTIONS EMFDRV_Funcs = ...@@ -84,8 +84,8 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
EMFDRV_ModifyWorldTransform, /* pModifyWorldTransform */ EMFDRV_ModifyWorldTransform, /* pModifyWorldTransform */
EMFDRV_MoveTo, /* pMoveTo */ EMFDRV_MoveTo, /* pMoveTo */
EMFDRV_OffsetClipRgn, /* pOffsetClipRgn */ EMFDRV_OffsetClipRgn, /* pOffsetClipRgn */
NULL, /* pOffsetViewportOrg */ EMFDRV_OffsetViewportOrg, /* pOffsetViewportOrg */
NULL, /* pOffsetWindowOrg */ EMFDRV_OffsetWindowOrg, /* pOffsetWindowOrg */
EMFDRV_PaintRgn, /* pPaintRgn */ EMFDRV_PaintRgn, /* pPaintRgn */
EMFDRV_PatBlt, /* pPatBlt */ EMFDRV_PatBlt, /* pPatBlt */
EMFDRV_Pie, /* pPie */ EMFDRV_Pie, /* pPie */
......
...@@ -130,3 +130,29 @@ BOOL EMFDRV_ModifyWorldTransform( PHYSDEV dev, const XFORM *xform, INT mode) ...@@ -130,3 +130,29 @@ BOOL EMFDRV_ModifyWorldTransform( PHYSDEV dev, const XFORM *xform, INT mode)
return EMFDRV_WriteRecord( dev, &emr.emr ); 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 );
}
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