diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h index 8c014b7123f..436846c5bd5 100644 --- a/dlls/gdi32/gdi_private.h +++ b/dlls/gdi32/gdi_private.h @@ -37,6 +37,8 @@ static inline BOOL is_meta_dc( HDC hdc ) return (handle & NTGDI_HANDLE_TYPE_MASK) >> NTGDI_HANDLE_TYPE_SHIFT == NTGDI_OBJ_METADC; } +extern BOOL METADC_Arc( HDC hdc, INT left, INT top, INT right, INT bottom, + INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN; extern BOOL METADC_Chord( HDC hdc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN; extern BOOL METADC_LineTo( HDC hdc, INT x, INT y ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/gdidc.c b/dlls/gdi32/gdidc.c index d3f71d3c59d..01c9dfdf8c7 100644 --- a/dlls/gdi32/gdidc.c +++ b/dlls/gdi32/gdidc.c @@ -55,6 +55,11 @@ BOOL WINAPI Arc( HDC hdc, INT left, INT top, INT right, INT bottom, { TRACE( "%p, (%d, %d)-(%d, %d), (%d, %d), (%d, %d)\n", hdc, left, top, right, bottom, xstart, ystart, xend, yend ); + + if (is_meta_dc( hdc )) + return METADC_Arc( hdc, left, top, right, bottom, + xstart, ystart, xend, yend ); + return NtGdiArcInternal( NtGdiArc, hdc, left, top, right, bottom, xstart, ystart, xend, yend ); } diff --git a/dlls/gdi32/mfdrv/graphics.c b/dlls/gdi32/mfdrv/graphics.c index 89793d0e72d..2037d7ac2e2 100644 --- a/dlls/gdi32/mfdrv/graphics.c +++ b/dlls/gdi32/mfdrv/graphics.c @@ -48,13 +48,23 @@ BOOL METADC_LineTo( HDC hdc, INT x, INT y ) /*********************************************************************** - * MFDRV_Arc + * METADC_Arc */ -BOOL CDECL MFDRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom, - INT xstart, INT ystart, INT xend, INT yend ) +BOOL METADC_Arc( HDC hdc, INT left, INT top, INT right, INT bottom, + INT xstart, INT ystart, INT xend, INT yend ) { - return MFDRV_MetaParam8(dev, META_ARC, left, top, right, bottom, - xstart, ystart, xend, yend); + return metadc_param8( hdc, META_ARC, left, top, right, bottom, + xstart, ystart, xend, yend ); +} + + +/*********************************************************************** + * MFDRV_ArcTo + */ +BOOL CDECL MFDRV_ArcTo( PHYSDEV dev, INT left, INT top, INT right, INT bottom, + INT xstart, INT ystart, INT xend, INT yend ) +{ + return FALSE; } diff --git a/dlls/gdi32/mfdrv/init.c b/dlls/gdi32/mfdrv/init.c index 17352282471..444d3dbf1d4 100644 --- a/dlls/gdi32/mfdrv/init.c +++ b/dlls/gdi32/mfdrv/init.c @@ -103,8 +103,8 @@ static const struct gdi_dc_funcs MFDRV_Funcs = MFDRV_AbortPath, /* pAbortPath */ NULL, /* pAlphaBlend */ NULL, /* pAngleArc */ - MFDRV_Arc, /* pArc */ - NULL, /* pArcTo */ + NULL, /* pArc */ + MFDRV_ArcTo, /* pArcTo */ MFDRV_BeginPath, /* pBeginPath */ NULL, /* pBlendImage */ NULL, /* pChord */ diff --git a/dlls/gdi32/mfdrv/metafiledrv.h b/dlls/gdi32/mfdrv/metafiledrv.h index fd206b75ac0..46a9d43d34b 100644 --- a/dlls/gdi32/mfdrv/metafiledrv.h +++ b/dlls/gdi32/mfdrv/metafiledrv.h @@ -67,8 +67,8 @@ extern BOOL metadc_param8( HDC hdc, short func, short param1, short param2, /* Metafile driver functions */ extern BOOL CDECL MFDRV_AbortPath( PHYSDEV dev ) DECLSPEC_HIDDEN; -extern BOOL CDECL MFDRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom, - INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN; +extern BOOL CDECL MFDRV_ArcTo( PHYSDEV dev, INT left, INT top, INT right, INT bottom, + INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN; extern BOOL CDECL MFDRV_BeginPath( PHYSDEV dev ) DECLSPEC_HIDDEN; extern BOOL CDECL MFDRV_CloseFigure( PHYSDEV dev ) DECLSPEC_HIDDEN; extern BOOL CDECL MFDRV_DeleteObject( PHYSDEV dev, HGDIOBJ obj ) DECLSPEC_HIDDEN; diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index 2ea8b1070ce..0e2a5aa4cec 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -3312,6 +3312,9 @@ static void test_mf_Graphics(void) ret = Ellipse(hdcMetafile, 0, 0, 2, 2); ok( ret, "Ellipse error %d.\n", GetLastError()); + ret = ArcTo(hdcMetafile, 1, 2, 30, 40, 11, 12, 23, 24 ); + ok( !ret, "ArcTo succeeded\n" ); + hMetafile = CloseMetaFile(hdcMetafile); ok(hMetafile != 0, "CloseMetaFile error %d\n", GetLastError()); type = GetObjectType(hdcMetafile);