gdi32: Implement ArcTo in enhanced metafiles.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bee56c33c5
commit
e92e5ec376
|
@ -56,6 +56,8 @@ extern DWORD EMFDRV_CreateBrushIndirect( PHYSDEV dev, HBRUSH hBrush ) DECLSPEC_H
|
|||
extern BOOL EMFDRV_AbortPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
|
||||
extern BOOL EMFDRV_Arc( PHYSDEV dev, INT left, INT top, INT right,
|
||||
INT bottom, INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
|
||||
extern BOOL EMFDRV_ArcTo( PHYSDEV dev, INT left, INT top, INT right,
|
||||
INT bottom, INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
|
||||
extern BOOL EMFDRV_BeginPath( PHYSDEV dev ) DECLSPEC_HIDDEN;
|
||||
extern BOOL EMFDRV_BitBlt( PHYSDEV devDst, INT xDst, INT yDst, INT width, INT height,
|
||||
PHYSDEV devSrc, INT xSrc, INT ySrc, DWORD rop ) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -177,6 +177,15 @@ EMFDRV_ArcChordPie( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
|||
if(bounds.top > yCentre) bounds.top = yCentre;
|
||||
else if(bounds.bottom < yCentre) bounds.bottom = yCentre;
|
||||
}
|
||||
if (iType == EMR_ARCTO)
|
||||
{
|
||||
POINT pt;
|
||||
GetCurrentPositionEx( dev->hdc, &pt );
|
||||
bounds.left = min( bounds.left, pt.x );
|
||||
bounds.top = min( bounds.top, pt.y );
|
||||
bounds.right = max( bounds.right, pt.x );
|
||||
bounds.bottom = max( bounds.bottom, pt.y );
|
||||
}
|
||||
if(!EMFDRV_WriteRecord( dev, &emr.emr ))
|
||||
return FALSE;
|
||||
if(!physDev->path)
|
||||
|
@ -195,6 +204,16 @@ BOOL EMFDRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
|||
xend, yend, EMR_ARC );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* EMFDRV_ArcTo
|
||||
*/
|
||||
BOOL EMFDRV_ArcTo( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
||||
INT xstart, INT ystart, INT xend, INT yend )
|
||||
{
|
||||
return EMFDRV_ArcChordPie( dev, left, top, right, bottom, xstart, ystart,
|
||||
xend, yend, EMR_ARCTO );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* EMFDRV_Pie
|
||||
*/
|
||||
|
|
|
@ -41,7 +41,7 @@ static const struct gdi_dc_funcs EMFDRV_Funcs =
|
|||
NULL, /* pAlphaBlend */
|
||||
NULL, /* pAngleArc */
|
||||
EMFDRV_Arc, /* pArc */
|
||||
NULL, /* pArcTo */
|
||||
EMFDRV_ArcTo, /* pArcTo */
|
||||
EMFDRV_BeginPath, /* pBeginPath */
|
||||
NULL, /* pBlendImage */
|
||||
EMFDRV_Chord, /* pChord */
|
||||
|
|
|
@ -3599,12 +3599,12 @@ static const unsigned char EMF_PATH_BITS[] =
|
|||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xef, 0xff, 0xff, 0xff, 0xea, 0xff, 0xff, 0xff,
|
||||
0xd8, 0xff, 0xff, 0xff, 0xd8, 0xff, 0xff, 0xff,
|
||||
0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
|
||||
0x0c, 0x02, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
|
||||
0x34, 0x02, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x80, 0x07, 0x00, 0x00, 0x3e, 0x04, 0x00, 0x00,
|
||||
0x20, 0x03, 0x00, 0x00, 0x58, 0x02, 0x00, 0x00,
|
||||
0x40, 0x01, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xe2, 0x04, 0x00,
|
||||
|
@ -3627,7 +3627,12 @@ static const unsigned char EMF_PATH_BITS[] =
|
|||
0x15, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00,
|
||||
0x1c, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00,
|
||||
0x1d, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
|
||||
0x15, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00,
|
||||
0x15, 0x00, 0x00, 0x00, 0x37, 0x00, 0x00, 0x00,
|
||||
0x28, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00,
|
||||
0x17, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
|
||||
0x1a, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00,
|
||||
0x1b, 0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00,
|
||||
0x17, 0x00, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x00,
|
||||
0x28, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
|
||||
0x15, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00,
|
||||
0x1c, 0x00, 0x00, 0x00, 0x27, 0x00, 0x00, 0x00,
|
||||
|
@ -3689,6 +3694,7 @@ static void test_emf_GetPath(void)
|
|||
ok( ret, "LineTo error %d.\n", GetLastError());
|
||||
Rectangle(hdcMetafile, 10, 10, 20, 20);
|
||||
Arc(hdcMetafile, 21, 21, 39, 29, 39, 29, 21, 21);
|
||||
ArcTo(hdcMetafile, 23, 23, 37, 27, 37, 27, 23, 23);
|
||||
Chord(hdcMetafile, 21, 21, 39, 29, 39, 29, 21, 21);
|
||||
Pie(hdcMetafile, 21, 21, 39, 29, 39, 29, 21, 21);
|
||||
Ellipse(hdcMetafile, 10, 10, 20, 20);
|
||||
|
@ -3698,7 +3704,7 @@ static void test_emf_GetPath(void)
|
|||
EndPath(hdcMetafile);
|
||||
|
||||
size = GetPath(hdcMetafile, NULL, NULL, 0);
|
||||
todo_wine ok( size == 77, "GetPath returned %d.\n", size);
|
||||
todo_wine ok( size == 88, "GetPath returned %d.\n", size);
|
||||
|
||||
hemf = CloseEnhMetaFile(hdcMetafile);
|
||||
ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError());
|
||||
|
|
Loading…
Reference in New Issue