Commit 10c37640 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Record SetWorldTransform and ModifyWorldTransform in enhanced

metafiles.
parent 635b09f9
......@@ -112,6 +112,7 @@ static struct graphics_driver *create_driver( HMODULE module )
GET_FUNC(InvertRgn);
GET_FUNC(LineTo);
GET_FUNC(MoveTo);
GET_FUNC(ModifyWorldTransform);
GET_FUNC(OffsetClipRgn);
GET_FUNC(OffsetViewportOrg);
GET_FUNC(OffsetWindowOrg);
......@@ -166,6 +167,7 @@ static struct graphics_driver *create_driver( HMODULE module )
GET_FUNC(SetViewportOrg);
GET_FUNC(SetWindowExt);
GET_FUNC(SetWindowOrg);
GET_FUNC(SetWorldTransform);
GET_FUNC(StartDoc);
GET_FUNC(StartPage);
GET_FUNC(StretchBlt);
......
......@@ -83,6 +83,7 @@ extern INT EMFDRV_IntersectClipRect( PHYSDEV dev, INT left, INT top, INT ri
INT bottom );
extern BOOL EMFDRV_InvertRgn( PHYSDEV dev, HRGN hrgn );
extern BOOL EMFDRV_LineTo( PHYSDEV dev, INT x, INT y );
extern BOOL EMFDRV_ModifyWorldTransform( PHYSDEV dev, const XFORM *xform, INT mode );
extern BOOL EMFDRV_MoveTo( PHYSDEV dev, INT x, INT y );
extern INT EMFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y );
extern INT EMFDRV_OffsetViewportOrg( PHYSDEV dev, INT x, INT y );
......@@ -134,6 +135,7 @@ extern INT EMFDRV_SetViewportExt( PHYSDEV dev, INT x, INT y );
extern INT EMFDRV_SetViewportOrg( PHYSDEV dev, INT x, INT y );
extern INT EMFDRV_SetWindowExt( PHYSDEV dev, INT x, INT y );
extern INT EMFDRV_SetWindowOrg( PHYSDEV dev, INT x, INT y );
extern BOOL EMFDRV_SetWorldTransform( PHYSDEV dev, const XFORM *xform );
extern BOOL EMFDRV_StretchBlt( PHYSDEV devDst, INT xDst, INT yDst,
INT widthDst, INT heightDst,
PHYSDEV devSrc, INT xSrc, INT ySrc,
......
......@@ -79,6 +79,7 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
EMFDRV_IntersectClipRect, /* pIntersectClipRect */
EMFDRV_InvertRgn, /* pInvertRgn */
EMFDRV_LineTo, /* pLineTo */
EMFDRV_ModifyWorldTransform, /* pModifyWorldTransform */
EMFDRV_MoveTo, /* pMoveTo */
EMFDRV_OffsetClipRgn, /* pOffsetClipRgn */
NULL, /* pOffsetViewportOrg */
......@@ -134,6 +135,7 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
EMFDRV_SetViewportOrg, /* pSetViewportOrg */
EMFDRV_SetWindowExt, /* pSetWindowExt */
EMFDRV_SetWindowOrg, /* pSetWindowOrg */
EMFDRV_SetWorldTransform, /* pSetWorldTransform */
NULL, /* pStartDoc */
NULL, /* pStartPage */
NULL, /* pStretchBlt */
......
......@@ -107,3 +107,26 @@ INT EMFDRV_ScaleWindowExt( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
return EMFDRV_WriteRecord( dev, &emr.emr );
}
BOOL EMFDRV_SetWorldTransform( PHYSDEV dev, const XFORM *xform)
{
EMRSETWORLDTRANSFORM emr;
emr.emr.iType = EMR_SETWORLDTRANSFORM;
emr.emr.nSize = sizeof(emr);
emr.xform = *xform;
return EMFDRV_WriteRecord( dev, &emr.emr );
}
BOOL EMFDRV_ModifyWorldTransform( PHYSDEV dev, const XFORM *xform, INT mode)
{
EMRMODIFYWORLDTRANSFORM emr;
emr.emr.iType = EMR_MODIFYWORLDTRANSFORM;
emr.emr.nSize = sizeof(emr);
emr.xform = *xform;
emr.iMode = mode;
return EMFDRV_WriteRecord( dev, &emr.emr );
}
......@@ -80,6 +80,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
MFDRV_IntersectClipRect, /* pIntersectClipRect */
MFDRV_InvertRgn, /* pInvertRgn */
MFDRV_LineTo, /* pLineTo */
NULL, /* pModifyWorldTransform */
MFDRV_MoveTo, /* pMoveTo */
MFDRV_OffsetClipRgn, /* pOffsetClipRgn */
MFDRV_OffsetViewportOrg, /* pOffsetViewportOrg */
......@@ -135,6 +136,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
MFDRV_SetViewportOrg, /* pSetViewportOrg */
MFDRV_SetWindowExt, /* pSetWindowExt */
MFDRV_SetWindowOrg, /* pSetWindowOrg */
NULL, /* pSetWorldTransform */
NULL, /* pStartDoc */
NULL, /* pStartPage */
MFDRV_StretchBlt, /* pStretchBlt */
......
......@@ -219,6 +219,7 @@ typedef struct tagDC_FUNCS
INT (*pIntersectClipRect)(PHYSDEV,INT,INT,INT,INT);
BOOL (*pInvertRgn)(PHYSDEV,HRGN);
BOOL (*pLineTo)(PHYSDEV,INT,INT);
BOOL (*pModifyWorldTransform)(PHYSDEV,const XFORM*,INT);
BOOL (*pMoveTo)(PHYSDEV,INT,INT);
INT (*pOffsetClipRgn)(PHYSDEV,INT,INT);
INT (*pOffsetViewportOrg)(PHYSDEV,INT,INT);
......@@ -275,6 +276,7 @@ typedef struct tagDC_FUNCS
INT (*pSetViewportOrg)(PHYSDEV,INT,INT);
INT (*pSetWindowExt)(PHYSDEV,INT,INT);
INT (*pSetWindowOrg)(PHYSDEV,INT,INT);
BOOL (*pSetWorldTransform)(PHYSDEV,const XFORM*);
INT (*pStartDoc)(PHYSDEV,const DOCINFOA*);
INT (*pStartPage)(PHYSDEV);
BOOL (*pStretchBlt)(PHYSDEV,INT,INT,INT,INT,PHYSDEV,INT,INT,INT,INT,DWORD);
......
......@@ -1014,6 +1014,12 @@ BOOL WINAPI SetWorldTransform( HDC hdc, const XFORM *xform )
/* Check that graphics mode is GM_ADVANCED */
if (dc->GraphicsMode!=GM_ADVANCED) goto done;
if (dc->funcs->pSetWorldTransform)
{
ret = dc->funcs->pSetWorldTransform(dc->physDev, xform);
if (!ret) goto done;
}
dc->xformWorld2Wnd = *xform;
DC_UpdateXforms( dc );
ret = TRUE;
......@@ -1058,6 +1064,12 @@ BOOL WINAPI ModifyWorldTransform( HDC hdc, const XFORM *xform,
/* Check that graphics mode is GM_ADVANCED */
if (dc->GraphicsMode!=GM_ADVANCED) goto done;
if (dc->funcs->pModifyWorldTransform)
{
ret = dc->funcs->pModifyWorldTransform(dc->physDev, xform, iMode);
if (!ret) goto done;
}
switch (iMode)
{
case MWT_IDENTITY:
......
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