gdi32: Use NtGdiArcInternal for Arc implementation.

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:
Jacek Caban 2021-07-17 16:56:54 +02:00 committed by Alexandre Julliard
parent af039dc5ab
commit c16bf295cc
3 changed files with 37 additions and 10 deletions

View File

@ -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 );
}

View File

@ -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;
}

View File

@ -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,