Commit 4fc7a1df authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

gdi32: Handle EMFs directly in MoveToEx.

parent 531a5994
......@@ -735,17 +735,6 @@ static BOOL CDECL emfpathdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
}
/***********************************************************************
* emfpathdrv_MoveTo
*/
static BOOL CDECL emfpathdrv_MoveTo( PHYSDEV dev, INT x, INT y )
{
PHYSDEV emfdev = get_emfdev( dev );
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pMoveTo );
return (emfdev->funcs->pMoveTo( emfdev, x, y ) && next->funcs->pMoveTo( next, x, y ));
}
/***********************************************************************
* emfpathdrv_Pie
*/
static BOOL CDECL emfpathdrv_Pie( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
......@@ -944,7 +933,7 @@ static const struct gdi_dc_funcs emfpath_driver =
NULL, /* pInvertRgn */
NULL, /* pLineTo */
NULL, /* pModifyWorldTransform */
emfpathdrv_MoveTo, /* pMoveTo */
NULL, /* pMoveTo */
NULL, /* pOffsetClipRgn */
NULL, /* pOffsetViewportOrg */
NULL, /* pOffsetWindowOrg */
......
......@@ -92,7 +92,6 @@ extern INT CDECL EMFDRV_IntersectClipRect( PHYSDEV dev, INT left, INT top,
extern BOOL CDECL EMFDRV_InvertRgn( PHYSDEV dev, HRGN hrgn ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_LineTo( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_ModifyWorldTransform( PHYSDEV dev, const XFORM *xform, DWORD mode ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_MoveTo( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern INT CDECL EMFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_OffsetViewportOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_OffsetWindowOrgEx( PHYSDEV dev, INT x, INT y, POINT *pt ) DECLSPEC_HIDDEN;
......
......@@ -118,10 +118,11 @@ static BOOL emfdrv_stroke_and_fill_path( PHYSDEV dev, INT type )
}
/**********************************************************************
* EMFDRV_MoveTo
* EMFDC_MoveTo
*/
BOOL CDECL EMFDRV_MoveTo(PHYSDEV dev, INT x, INT y)
BOOL EMFDC_MoveTo( DC_ATTR *dc_attr, INT x, INT y )
{
EMFDRV_PDEVICE *emf = dc_attr->emf;
EMRMOVETOEX emr;
emr.emr.iType = EMR_MOVETOEX;
......@@ -129,7 +130,7 @@ BOOL CDECL EMFDRV_MoveTo(PHYSDEV dev, INT x, INT y)
emr.ptl.x = x;
emr.ptl.y = y;
return EMFDRV_WriteRecord( dev, &emr.emr );
return EMFDRV_WriteRecord( &emf->dev, &emr.emr );
}
/***********************************************************************
......
......@@ -98,7 +98,7 @@ static const struct gdi_dc_funcs emfdrv_driver =
EMFDRV_InvertRgn, /* pInvertRgn */
EMFDRV_LineTo, /* pLineTo */
EMFDRV_ModifyWorldTransform, /* pModifyWorldTransform */
EMFDRV_MoveTo, /* pMoveTo */
NULL, /* pMoveTo */
EMFDRV_OffsetClipRgn, /* pOffsetClipRgn */
EMFDRV_OffsetViewportOrgEx, /* pOffsetViewportOrgEx */
EMFDRV_OffsetWindowOrgEx, /* pOffsetWindowOrgEx */
......
......@@ -53,5 +53,6 @@ extern BOOL METADC_Pie( HDC hdc, INT left, INT top, INT right, INT bottom,
/* enhanced metafiles */
extern BOOL EMFDC_LineTo( DC_ATTR *dc_attr, INT x, INT y ) DECLSPEC_HIDDEN;
extern BOOL EMFDC_MoveTo( DC_ATTR *dc_attr, INT x, INT y ) DECLSPEC_HIDDEN;
#endif /* __WINE_GDI_PRIVATE_H */
......@@ -68,9 +68,13 @@ BOOL WINAPI LineTo( HDC hdc, INT x, INT y )
*/
BOOL WINAPI MoveToEx( HDC hdc, INT x, INT y, POINT *pt )
{
DC_ATTR *dc_attr;
TRACE( "%p, (%d, %d), %p\n", hdc, x, y, pt );
if (is_meta_dc( hdc )) return METADC_MoveTo( hdc, x, y );
if (!(dc_attr = get_dc_attr( hdc ))) return FALSE;
if (dc_attr->emf && !EMFDC_MoveTo( dc_attr, x, y )) return FALSE;
return NtGdiMoveTo( hdc, x, y, pt );
}
......
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