diff --git a/dlls/gdi32/gdidc.c b/dlls/gdi32/gdidc.c index 33adb8ccf82..2fc74d7685b 100644 --- a/dlls/gdi32/gdidc.c +++ b/dlls/gdi32/gdidc.c @@ -42,3 +42,15 @@ BOOL WINAPI MoveToEx( HDC hdc, INT x, INT y, POINT *pt ) TRACE( "%p, (%d, %d), %p\n", hdc, x, y, pt ); return NtGdiMoveTo( hdc, x, y, pt ); } + +/*********************************************************************** + * Arc (GDI32.@) + */ +BOOL WINAPI Arc( HDC hdc, INT left, INT top, INT right, INT bottom, + INT xstart, INT ystart, INT xend, INT yend ) +{ + TRACE( "%p, (%d, %d)-(%d, %d), (%d, %d), (%d, %d)\n", 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/painting.c b/dlls/gdi32/painting.c index 85c940c7f3d..b235480dacb 100644 --- a/dlls/gdi32/painting.c +++ b/dlls/gdi32/painting.c @@ -275,22 +275,29 @@ BOOL WINAPI NtGdiMoveTo( HDC hdc, INT x, INT y, POINT *pt ) /*********************************************************************** - * Arc (GDI32.@) + * NtGdiArcInternal (win32u.@) */ -BOOL WINAPI Arc( HDC hdc, INT left, INT top, INT right, - INT bottom, INT xstart, INT ystart, - INT xend, INT yend ) +BOOL WINAPI NtGdiArcInternal( UINT type, HDC hdc, INT left, INT top, INT right, + INT bottom, INT xstart, INT ystart, INT xend, INT yend ) { PHYSDEV physdev; BOOL ret; - DC * dc = get_dc_ptr( hdc ); + DC *dc; - TRACE( "%p, (%d, %d)-(%d, %d), (%d, %d), (%d, %d)\n", hdc, left, top, right, bottom, xstart, ystart, xend, yend ); - - if (!dc) return FALSE; + if (!(dc = get_dc_ptr( hdc ))) return FALSE; update_dc( dc ); - physdev = GET_DC_PHYSDEV( dc, pArc ); - ret = physdev->funcs->pArc( physdev, left, top, right, bottom, xstart, ystart, xend, yend ); + + switch (type) + { + case NtGdiArc: + physdev = GET_DC_PHYSDEV( dc, pArc ); + ret = physdev->funcs->pArc( physdev, left, top, right, bottom, xstart, ystart, xend, yend ); + break; + default: + WARN( "invalid arc type %u\n", type ); + ret = FALSE; + } + release_dc_ptr( dc ); return ret; } diff --git a/include/ntgdi.h b/include/ntgdi.h index d8adc327548..d90529392d5 100644 --- a/include/ntgdi.h +++ b/include/ntgdi.h @@ -72,6 +72,14 @@ typedef struct _GDI_SHARED_MEMORY GDI_HANDLE_ENTRY Handles[GDI_MAX_HANDLE_COUNT]; } GDI_SHARED_MEMORY, *PGDI_SHARED_MEMORY; +enum +{ + NtGdiArc, + NtGdiArcTo, + NtGdiChord, + NtGdiPie, +}; + INT WINAPI NtGdiAbortDoc( HDC hdc ); BOOL WINAPI NtGdiAbortPath( HDC hdc ); BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, FLOAT start_angle,