mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
gdi32: Handle metafiles directly in 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:
parent
b70616b508
commit
b789992337
6 changed files with 29 additions and 9 deletions
|
@ -37,6 +37,8 @@ static inline BOOL is_meta_dc( HDC hdc )
|
||||||
return (handle & NTGDI_HANDLE_TYPE_MASK) >> NTGDI_HANDLE_TYPE_SHIFT == NTGDI_OBJ_METADC;
|
return (handle & NTGDI_HANDLE_TYPE_MASK) >> NTGDI_HANDLE_TYPE_SHIFT == NTGDI_OBJ_METADC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern BOOL METADC_Arc( HDC hdc, INT left, INT top, INT right, INT bottom,
|
||||||
|
INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL METADC_Chord( HDC hdc, INT left, INT top, INT right, INT bottom, INT xstart,
|
extern BOOL METADC_Chord( HDC hdc, INT left, INT top, INT right, INT bottom, INT xstart,
|
||||||
INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
|
INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL METADC_LineTo( HDC hdc, INT x, INT y ) DECLSPEC_HIDDEN;
|
extern BOOL METADC_LineTo( HDC hdc, INT x, INT y ) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -55,6 +55,11 @@ BOOL WINAPI Arc( HDC hdc, INT left, INT top, INT right, INT bottom,
|
||||||
{
|
{
|
||||||
TRACE( "%p, (%d, %d)-(%d, %d), (%d, %d), (%d, %d)\n", hdc, left, top,
|
TRACE( "%p, (%d, %d)-(%d, %d), (%d, %d), (%d, %d)\n", hdc, left, top,
|
||||||
right, bottom, xstart, ystart, xend, yend );
|
right, bottom, xstart, ystart, xend, yend );
|
||||||
|
|
||||||
|
if (is_meta_dc( hdc ))
|
||||||
|
return METADC_Arc( hdc, left, top, right, bottom,
|
||||||
|
xstart, ystart, xend, yend );
|
||||||
|
|
||||||
return NtGdiArcInternal( NtGdiArc, hdc, left, top, right, bottom,
|
return NtGdiArcInternal( NtGdiArc, hdc, left, top, right, bottom,
|
||||||
xstart, ystart, xend, yend );
|
xstart, ystart, xend, yend );
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,13 +48,23 @@ BOOL METADC_LineTo( HDC hdc, INT x, INT y )
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* MFDRV_Arc
|
* METADC_Arc
|
||||||
*/
|
*/
|
||||||
BOOL CDECL MFDRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
BOOL METADC_Arc( HDC hdc, INT left, INT top, INT right, INT bottom,
|
||||||
INT xstart, INT ystart, INT xend, INT yend )
|
INT xstart, INT ystart, INT xend, INT yend )
|
||||||
{
|
{
|
||||||
return MFDRV_MetaParam8(dev, META_ARC, left, top, right, bottom,
|
return metadc_param8( hdc, META_ARC, left, top, right, bottom,
|
||||||
xstart, ystart, xend, yend);
|
xstart, ystart, xend, yend );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* MFDRV_ArcTo
|
||||||
|
*/
|
||||||
|
BOOL CDECL MFDRV_ArcTo( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
||||||
|
INT xstart, INT ystart, INT xend, INT yend )
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -103,8 +103,8 @@ static const struct gdi_dc_funcs MFDRV_Funcs =
|
||||||
MFDRV_AbortPath, /* pAbortPath */
|
MFDRV_AbortPath, /* pAbortPath */
|
||||||
NULL, /* pAlphaBlend */
|
NULL, /* pAlphaBlend */
|
||||||
NULL, /* pAngleArc */
|
NULL, /* pAngleArc */
|
||||||
MFDRV_Arc, /* pArc */
|
NULL, /* pArc */
|
||||||
NULL, /* pArcTo */
|
MFDRV_ArcTo, /* pArcTo */
|
||||||
MFDRV_BeginPath, /* pBeginPath */
|
MFDRV_BeginPath, /* pBeginPath */
|
||||||
NULL, /* pBlendImage */
|
NULL, /* pBlendImage */
|
||||||
NULL, /* pChord */
|
NULL, /* pChord */
|
||||||
|
|
|
@ -67,8 +67,8 @@ extern BOOL metadc_param8( HDC hdc, short func, short param1, short param2,
|
||||||
/* Metafile driver functions */
|
/* Metafile driver functions */
|
||||||
|
|
||||||
extern BOOL CDECL MFDRV_AbortPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
|
extern BOOL CDECL MFDRV_AbortPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL CDECL MFDRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
extern BOOL CDECL MFDRV_ArcTo( 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 MFDRV_BeginPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
|
extern BOOL CDECL MFDRV_BeginPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL CDECL MFDRV_CloseFigure( PHYSDEV dev ) DECLSPEC_HIDDEN;
|
extern BOOL CDECL MFDRV_CloseFigure( PHYSDEV dev ) DECLSPEC_HIDDEN;
|
||||||
extern BOOL CDECL MFDRV_DeleteObject( PHYSDEV dev, HGDIOBJ obj ) DECLSPEC_HIDDEN;
|
extern BOOL CDECL MFDRV_DeleteObject( PHYSDEV dev, HGDIOBJ obj ) DECLSPEC_HIDDEN;
|
||||||
|
|
|
@ -3312,6 +3312,9 @@ static void test_mf_Graphics(void)
|
||||||
ret = Ellipse(hdcMetafile, 0, 0, 2, 2);
|
ret = Ellipse(hdcMetafile, 0, 0, 2, 2);
|
||||||
ok( ret, "Ellipse error %d.\n", GetLastError());
|
ok( ret, "Ellipse error %d.\n", GetLastError());
|
||||||
|
|
||||||
|
ret = ArcTo(hdcMetafile, 1, 2, 30, 40, 11, 12, 23, 24 );
|
||||||
|
ok( !ret, "ArcTo succeeded\n" );
|
||||||
|
|
||||||
hMetafile = CloseMetaFile(hdcMetafile);
|
hMetafile = CloseMetaFile(hdcMetafile);
|
||||||
ok(hMetafile != 0, "CloseMetaFile error %d\n", GetLastError());
|
ok(hMetafile != 0, "CloseMetaFile error %d\n", GetLastError());
|
||||||
type = GetObjectType(hdcMetafile);
|
type = GetObjectType(hdcMetafile);
|
||||||
|
|
Loading…
Reference in a new issue