diff --git a/dlls/gdi32/enhmfdrv/enhmetafiledrv.h b/dlls/gdi32/enhmfdrv/enhmetafiledrv.h index c7e4489eee0..22d3cc58089 100644 --- a/dlls/gdi32/enhmfdrv/enhmetafiledrv.h +++ b/dlls/gdi32/enhmfdrv/enhmetafiledrv.h @@ -54,6 +54,7 @@ extern DWORD EMFDRV_CreateBrushIndirect( PHYSDEV dev, HBRUSH hBrush ) DECLSPEC_H /* Metafile driver functions */ extern BOOL EMFDRV_AbortPath( PHYSDEV dev ) DECLSPEC_HIDDEN; +extern BOOL EMFDRV_AngleArc( PHYSDEV dev, INT x, INT y, DWORD radius, FLOAT start, FLOAT sweep ) DECLSPEC_HIDDEN; extern BOOL EMFDRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN; extern BOOL EMFDRV_ArcTo( PHYSDEV dev, INT left, INT top, INT right, diff --git a/dlls/gdi32/enhmfdrv/graphics.c b/dlls/gdi32/enhmfdrv/graphics.c index 80cca1f6d45..55c3be52dfe 100644 --- a/dlls/gdi32/enhmfdrv/graphics.c +++ b/dlls/gdi32/enhmfdrv/graphics.c @@ -298,6 +298,24 @@ BOOL EMFDRV_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom, xend, yend, EMR_CHORD ); } +/*********************************************************************** + * EMFDRV_AngleArc + */ +BOOL EMFDRV_AngleArc( PHYSDEV dev, INT x, INT y, DWORD radius, FLOAT start, FLOAT sweep ) +{ + EMRANGLEARC emr; + + emr.emr.iType = EMR_ANGLEARC; + emr.emr.nSize = sizeof( emr ); + emr.ptlCenter.x = x; + emr.ptlCenter.y = y; + emr.nRadius = radius; + emr.eStartAngle = start; + emr.eSweepAngle = sweep; + + return EMFDRV_WriteRecord( dev, &emr.emr ); +} + /*********************************************************************** * EMFDRV_Ellipse */ diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c index 1678f412a42..835cf2c5596 100644 --- a/dlls/gdi32/enhmfdrv/init.c +++ b/dlls/gdi32/enhmfdrv/init.c @@ -39,7 +39,7 @@ static const struct gdi_dc_funcs EMFDRV_Funcs = NULL, /* pAbortDoc */ EMFDRV_AbortPath, /* pAbortPath */ NULL, /* pAlphaBlend */ - NULL, /* pAngleArc */ + EMFDRV_AngleArc, /* pAngleArc */ EMFDRV_Arc, /* pArc */ EMFDRV_ArcTo, /* pArcTo */ EMFDRV_BeginPath, /* pBeginPath */ diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index 2ad7206af57..dd35a0e955d 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -3601,7 +3601,7 @@ static const unsigned char EMF_PATH_BITS[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0xff, 0xff, 0xff, 0xd8, 0xff, 0xff, 0xff, 0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00, - 0xac, 0x02, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0xc8, 0x02, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x03, 0x00, 0x00, 0x58, 0x02, 0x00, 0x00, @@ -3677,10 +3677,13 @@ static const unsigned char EMF_PATH_BITS[] = 0x14, 0x00, 0x1e, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x0a, 0x00, 0x06, 0x02, 0x04, 0x04, 0x04, 0x02, 0x03, 0x06, 0x02, 0x00, 0x00, 0x00, - 0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x14, 0x00, 0x00, 0x00 + 0x29, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, + 0x25, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x42, + 0x00, 0x00, 0x34, 0x43, 0x3c, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, + 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00 }; static void test_emf_GetPath(void) @@ -3720,10 +3723,11 @@ static void test_emf_GetPath(void) PolylineTo(hdcMetafile, pts, 4); PolyPolyline(hdcMetafile, pts, counts, 2); PolyDraw(hdcMetafile, pts, types, 9); + AngleArc(hdcMetafile, 37, 36, 23, 90, 180); EndPath(hdcMetafile); size = GetPath(hdcMetafile, NULL, NULL, 0); - todo_wine ok( size == 102, "GetPath returned %d.\n", size); + todo_wine ok( size == 112, "GetPath returned %d.\n", size); hemf = CloseEnhMetaFile(hdcMetafile); ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError());