gdi32: Use NtGdiCloseFigure for CloseFigure 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:
parent
cc7e7002ef
commit
0f3173e7d9
|
@ -513,15 +513,14 @@ BOOL CDECL EMFDRV_BeginPath( PHYSDEV dev )
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CDECL EMFDRV_CloseFigure( PHYSDEV dev )
|
BOOL EMFDC_CloseFigure( DC_ATTR *dc_attr )
|
||||||
{
|
{
|
||||||
EMRCLOSEFIGURE emr;
|
EMRCLOSEFIGURE emr;
|
||||||
|
|
||||||
emr.emr.iType = EMR_CLOSEFIGURE;
|
emr.emr.iType = EMR_CLOSEFIGURE;
|
||||||
emr.emr.nSize = sizeof(emr);
|
emr.emr.nSize = sizeof(emr);
|
||||||
|
|
||||||
EMFDRV_WriteRecord( dev, &emr.emr );
|
return EMFDRV_WriteRecord( dc_attr->emf, &emr.emr );
|
||||||
return FALSE; /* always fails without a path */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CDECL EMFDRV_EndPath( PHYSDEV dev )
|
BOOL CDECL EMFDRV_EndPath( PHYSDEV dev )
|
||||||
|
@ -611,18 +610,6 @@ static BOOL CDECL emfpathdrv_BeginPath( PHYSDEV dev )
|
||||||
return (emfdev->funcs->pBeginPath( emfdev ) && next->funcs->pBeginPath( next ));
|
return (emfdev->funcs->pBeginPath( emfdev ) && next->funcs->pBeginPath( next ));
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* 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
|
* emfpathdrv_CreateDC
|
||||||
*/
|
*/
|
||||||
|
@ -670,7 +657,7 @@ static const struct gdi_dc_funcs emfpath_driver =
|
||||||
emfpathdrv_BeginPath, /* pBeginPath */
|
emfpathdrv_BeginPath, /* pBeginPath */
|
||||||
NULL, /* pBlendImage */
|
NULL, /* pBlendImage */
|
||||||
NULL, /* pChord */
|
NULL, /* pChord */
|
||||||
emfpathdrv_CloseFigure, /* pCloseFigure */
|
NULL, /* pCloseFigure */
|
||||||
NULL, /* pCreateCompatibleDC */
|
NULL, /* pCreateCompatibleDC */
|
||||||
emfpathdrv_CreateDC, /* pCreateDC */
|
emfpathdrv_CreateDC, /* pCreateDC */
|
||||||
emfpathdrv_DeleteDC, /* pDeleteDC */
|
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;
|
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,
|
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;
|
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_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_Ellipse( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL CDECL EMFDRV_EndPath( PHYSDEV dev ) 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_ArcTo, /* pArcTo */
|
||||||
EMFDRV_BeginPath, /* pBeginPath */
|
EMFDRV_BeginPath, /* pBeginPath */
|
||||||
NULL, /* pBlendImage */
|
NULL, /* pBlendImage */
|
||||||
EMFDRV_Chord, /* pChord */
|
NULL, /* pChord */
|
||||||
EMFDRV_CloseFigure, /* pCloseFigure */
|
NULL, /* pCloseFigure */
|
||||||
NULL, /* pCreateCompatibleDC */
|
NULL, /* pCreateCompatibleDC */
|
||||||
NULL, /* pCreateDC */
|
NULL, /* pCreateDC */
|
||||||
EMFDRV_DeleteDC, /* pDeleteDC */
|
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,
|
extern BOOL EMFDC_ArcChordPie( DC_ATTR *dc_attr, INT left, INT top, INT right,
|
||||||
INT bottom, INT xstart, INT ystart, INT xend,
|
INT bottom, INT xstart, INT ystart, INT xend,
|
||||||
INT yend, DWORD type ) DECLSPEC_HIDDEN;
|
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,
|
extern BOOL EMFDC_Ellipse( DC_ATTR *dc_attr, INT left, INT top, INT right,
|
||||||
INT bottom ) DECLSPEC_HIDDEN;
|
INT bottom ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL EMFDC_ExtTextOut( DC_ATTR *dc_attr, INT x, INT y, UINT flags, const RECT *rect,
|
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 FALSE;
|
||||||
return NtGdiExtTextOutW( hdc, x, y, flags, rect, str, count, dx, 0 );
|
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.@)
|
* NtGdiCloseFigure (win32u.@)
|
||||||
*
|
|
||||||
* FIXME: Check that SetLastError is being called correctly
|
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI CloseFigure(HDC hdc)
|
BOOL WINAPI NtGdiCloseFigure( HDC hdc )
|
||||||
{
|
{
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
DC *dc = get_dc_ptr( hdc );
|
DC *dc = get_dc_ptr( hdc );
|
||||||
|
|
Loading…
Reference in New Issue