Commit 3713901d authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

gdi32: Use NtGdiAngleArc for AngleArc implementation.

parent 0636b360
......@@ -601,18 +601,6 @@ static BOOL CDECL emfpathdrv_AbortPath( PHYSDEV dev )
}
/***********************************************************************
* emfpathdrv_AngleArc
*/
static BOOL CDECL emfpathdrv_AngleArc( PHYSDEV dev, INT x, INT y, DWORD radius, FLOAT start, FLOAT sweep )
{
PHYSDEV emfdev = get_emfdev( dev );
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pAngleArc );
return (emfdev->funcs->pAngleArc( emfdev, x, y, radius, start, sweep ) &&
next->funcs->pAngleArc( next, x, y, radius, start, sweep ));
}
/***********************************************************************
* emfpathdrv_BeginPath
*/
static BOOL CDECL emfpathdrv_BeginPath( PHYSDEV dev )
......@@ -785,7 +773,7 @@ static const struct gdi_dc_funcs emfpath_driver =
NULL, /* pAbortDoc */
emfpathdrv_AbortPath, /* pAbortPath */
NULL, /* pAlphaBlend */
emfpathdrv_AngleArc, /* pAngleArc */
NULL, /* pAngleArc */
NULL, /* pArc */
NULL, /* pArcTo */
emfpathdrv_BeginPath, /* pBeginPath */
......
......@@ -61,7 +61,6 @@ extern DWORD EMFDRV_CreateBrushIndirect( PHYSDEV dev, HBRUSH hBrush ) DECLSPEC_H
extern BOOL CDECL EMFDRV_AbortPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_AlphaBlend( PHYSDEV dev_dst, struct bitblt_coords *dst,
PHYSDEV dev_src, struct bitblt_coords *src, BLENDFUNCTION func ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_AngleArc( PHYSDEV dev, INT x, INT y, DWORD radius, FLOAT start, FLOAT sweep ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_Arc( PHYSDEV dev, INT left, INT top, INT right,
INT bottom, INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_ArcTo( PHYSDEV dev, INT left, INT top, INT right,
......
......@@ -355,9 +355,9 @@ BOOL CDECL EMFDRV_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
}
/***********************************************************************
* EMFDRV_AngleArc
* EMFDC_AngleArc
*/
BOOL CDECL EMFDRV_AngleArc( PHYSDEV dev, INT x, INT y, DWORD radius, FLOAT start, FLOAT sweep )
BOOL EMFDC_AngleArc( DC_ATTR *dc_attr, INT x, INT y, DWORD radius, FLOAT start, FLOAT sweep )
{
EMRANGLEARC emr;
......@@ -369,7 +369,7 @@ BOOL CDECL EMFDRV_AngleArc( PHYSDEV dev, INT x, INT y, DWORD radius, FLOAT start
emr.eStartAngle = start;
emr.eSweepAngle = sweep;
return EMFDRV_WriteRecord( dev, &emr.emr );
return EMFDRV_WriteRecord( dc_attr->emf, &emr.emr );
}
/***********************************************************************
......
......@@ -39,7 +39,7 @@ static const struct gdi_dc_funcs emfdrv_driver =
NULL, /* pAbortDoc */
EMFDRV_AbortPath, /* pAbortPath */
EMFDRV_AlphaBlend, /* pAlphaBlend */
EMFDRV_AngleArc, /* pAngleArc */
NULL, /* pAngleArc */
EMFDRV_Arc, /* pArc */
EMFDRV_ArcTo, /* pArcTo */
EMFDRV_BeginPath, /* pBeginPath */
......
......@@ -56,6 +56,8 @@ extern BOOL METADC_RoundRect( HDC hdc, INT left, INT top, INT right, INT bottom,
INT ell_width, INT ell_height ) DECLSPEC_HIDDEN;
/* enhanced metafiles */
extern BOOL EMFDC_AngleArc( DC_ATTR *dc_attr, INT x, INT y, DWORD radius, FLOAT start,
FLOAT sweep ) DECLSPEC_HIDDEN;
extern BOOL EMFDC_ArcChordPie( DC_ATTR *dc_attr, INT left, INT top, INT right,
INT bottom, INT xstart, INT ystart, INT xend,
INT yend, DWORD type ) DECLSPEC_HIDDEN;
......
......@@ -171,6 +171,21 @@ BOOL WINAPI Pie( HDC hdc, INT left, INT top, INT right, INT bottom,
}
/***********************************************************************
* AngleArc (GDI32.@)
*/
BOOL WINAPI AngleArc( HDC hdc, INT x, INT y, DWORD radius, FLOAT start_angle, FLOAT sweep_angle )
{
DC_ATTR *dc_attr;
TRACE( "%p, (%d, %d), %u, %f, %f\n", hdc, x, y, radius, start_angle, sweep_angle );
if (!(dc_attr = get_dc_attr( hdc ))) return FALSE;
if (dc_attr->emf && !EMFDC_AngleArc( dc_attr, x, y, radius, start_angle, sweep_angle ))
return FALSE;
return NtGdiAngleArc( hdc, x, y, radius, start_angle, sweep_angle );
}
/***********************************************************************
* Ellipse (GDI32.@)
*/
BOOL WINAPI Ellipse( HDC hdc, INT left, INT top, INT right, INT bottom )
......
......@@ -776,16 +776,14 @@ BOOL WINAPI PolyBezierTo( HDC hdc, const POINT* lppt, DWORD cPoints )
}
/***********************************************************************
* AngleArc (GDI32.@)
* NtGdiAngleArc (win32u.@)
*/
BOOL WINAPI AngleArc(HDC hdc, INT x, INT y, DWORD dwRadius, FLOAT eStartAngle, FLOAT eSweepAngle)
BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD dwRadius, FLOAT eStartAngle, FLOAT eSweepAngle )
{
PHYSDEV physdev;
BOOL result;
DC *dc;
TRACE( "%p, (%d, %d), %u, %f, %f\n", hdc, x, y, dwRadius, eStartAngle, eSweepAngle );
if( (signed int)dwRadius < 0 )
return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment