Commit 0f3173e7 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

gdi32: Use NtGdiCloseFigure for CloseFigure implementation.

parent cc7e7002
......@@ -513,15 +513,14 @@ BOOL CDECL EMFDRV_BeginPath( PHYSDEV dev )
return TRUE;
}
BOOL CDECL EMFDRV_CloseFigure( PHYSDEV dev )
BOOL EMFDC_CloseFigure( DC_ATTR *dc_attr )
{
EMRCLOSEFIGURE emr;
emr.emr.iType = EMR_CLOSEFIGURE;
emr.emr.nSize = sizeof(emr);
EMFDRV_WriteRecord( dev, &emr.emr );
return FALSE; /* always fails without a path */
return EMFDRV_WriteRecord( dc_attr->emf, &emr.emr );
}
BOOL CDECL EMFDRV_EndPath( PHYSDEV dev )
......@@ -612,18 +611,6 @@ static BOOL CDECL emfpathdrv_BeginPath( PHYSDEV dev )
}
/***********************************************************************
* emfpathdrv_CloseFigure
*/
static BOOL CDECL emfpathdrv_CloseFigure( PHYSDEV dev )
{
PHYSDEV emfdev = get_emfdev( dev );
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pCloseFigure );
emfdev->funcs->pCloseFigure( emfdev );
return next->funcs->pCloseFigure( next );
}
/***********************************************************************
* emfpathdrv_CreateDC
*/
static BOOL CDECL emfpathdrv_CreateDC( PHYSDEV *dev, LPCWSTR driver, LPCWSTR device,
......@@ -670,7 +657,7 @@ static const struct gdi_dc_funcs emfpath_driver =
emfpathdrv_BeginPath, /* pBeginPath */
NULL, /* pBlendImage */
NULL, /* pChord */
emfpathdrv_CloseFigure, /* pCloseFigure */
NULL, /* pCloseFigure */
NULL, /* pCreateCompatibleDC */
emfpathdrv_CreateDC, /* pCreateDC */
emfpathdrv_DeleteDC, /* pDeleteDC */
......
......@@ -71,7 +71,6 @@ extern BOOL CDECL EMFDRV_BitBlt( PHYSDEV devDst, INT xDst, INT yDst, INT wid
PHYSDEV devSrc, INT xSrc, INT ySrc, DWORD rop ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_CloseFigure( PHYSDEV dev ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_DeleteObject( PHYSDEV dev, HGDIOBJ obj ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_Ellipse( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN;
extern BOOL CDECL EMFDRV_EndPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
......
......@@ -44,8 +44,8 @@ static const struct gdi_dc_funcs emfdrv_driver =
EMFDRV_ArcTo, /* pArcTo */
EMFDRV_BeginPath, /* pBeginPath */
NULL, /* pBlendImage */
EMFDRV_Chord, /* pChord */
EMFDRV_CloseFigure, /* pCloseFigure */
NULL, /* pChord */
NULL, /* pCloseFigure */
NULL, /* pCreateCompatibleDC */
NULL, /* pCreateDC */
EMFDRV_DeleteDC, /* pDeleteDC */
......
......@@ -67,6 +67,7 @@ extern BOOL EMFDC_AngleArc( DC_ATTR *dc_attr, INT x, INT y, DWORD radius, FLOAT
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;
extern BOOL EMFDC_CloseFigure( DC_ATTR *dc_attr ) DECLSPEC_HIDDEN;
extern BOOL EMFDC_Ellipse( DC_ATTR *dc_attr, INT left, INT top, INT right,
INT bottom ) DECLSPEC_HIDDEN;
extern BOOL EMFDC_ExtTextOut( DC_ATTR *dc_attr, INT x, INT y, UINT flags, const RECT *rect,
......
......@@ -375,3 +375,15 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags, const RECT *rect,
return FALSE;
return NtGdiExtTextOutW( hdc, x, y, flags, rect, str, count, dx, 0 );
}
/***********************************************************************
* CloseFigure (GDI32.@)
*/
BOOL WINAPI CloseFigure( HDC hdc )
{
DC_ATTR *dc_attr;
if (!(dc_attr = get_dc_attr( hdc ))) return FALSE;
if (dc_attr->emf && !EMFDC_CloseFigure( dc_attr )) return FALSE;
return NtGdiCloseFigure( hdc );
}
......@@ -617,11 +617,9 @@ BOOL WINAPI AbortPath( HDC hdc )
/***********************************************************************
* CloseFigure (GDI32.@)
*
* FIXME: Check that SetLastError is being called correctly
* NtGdiCloseFigure (win32u.@)
*/
BOOL WINAPI CloseFigure(HDC hdc)
BOOL WINAPI NtGdiCloseFigure( HDC hdc )
{
BOOL ret = FALSE;
DC *dc = get_dc_ptr( hdc );
......
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