gdi32: Handle EMFs directly in MoveToEx.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
531a599405
commit
4fc7a1df1b
|
@ -734,17 +734,6 @@ static BOOL CDECL emfpathdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
|
|||
next->funcs->pExtTextOut( next, x, y, flags, rect, str, count, dx ));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* 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
|
||||
*/
|
||||
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue