mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 06:11:34 +00:00
gdi32/enhmfdrv: Don't update document bounds in PolyPolyline within a path.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
67e26bec8d
commit
dfb750b9c2
|
@ -533,6 +533,7 @@ static BOOL
|
|||
EMFDRV_PolyPolylinegon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT polys,
|
||||
DWORD iType)
|
||||
{
|
||||
EMFDRV_PDEVICE *physDev = (EMFDRV_PDEVICE*) dev;
|
||||
EMRPOLYPOLYLINE *emr;
|
||||
DWORD cptl = 0, poly, size, i;
|
||||
INT point;
|
||||
|
@ -576,7 +577,7 @@ EMFDRV_PolyPolylinegon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT po
|
|||
if(use_small_emr) emr->emr.iType += EMR_POLYPOLYLINE16 - EMR_POLYPOLYLINE;
|
||||
|
||||
emr->emr.nSize = size;
|
||||
if(bounds_valid)
|
||||
if(bounds_valid && !physDev->path)
|
||||
emr->rclBounds = bounds;
|
||||
else
|
||||
emr->rclBounds = empty;
|
||||
|
@ -608,7 +609,7 @@ EMFDRV_PolyPolylinegon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT po
|
|||
ret = FALSE;
|
||||
SetLastError( ERROR_INVALID_PARAMETER );
|
||||
}
|
||||
if(ret)
|
||||
if(ret && !physDev->path)
|
||||
EMFDRV_UpdateBBox( dev, &emr->rclBounds );
|
||||
HeapFree( GetProcessHeap(), 0, emr );
|
||||
return ret;
|
||||
|
|
|
@ -3585,7 +3585,7 @@ static const unsigned char EMF_PATH_BITS[] =
|
|||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xef, 0xff, 0xff, 0xff, 0xea, 0xff, 0xff, 0xff,
|
||||
0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
|
||||
0xd4, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||
0x0c, 0x02, 0x00, 0x00, 0x11, 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,
|
||||
|
@ -3634,6 +3634,13 @@ static const unsigned char EMF_PATH_BITS[] =
|
|||
0xff, 0xff, 0xff, 0xff, 0x04, 0x00, 0x00, 0x00,
|
||||
0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x0a, 0x00,
|
||||
0x0a, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00,
|
||||
0x5a, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x0a, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x0a, 0x00,
|
||||
0x0a, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00,
|
||||
0x3c, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x0e, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||
|
@ -3643,6 +3650,7 @@ static const unsigned char EMF_PATH_BITS[] =
|
|||
static void test_emf_GetPath(void)
|
||||
{
|
||||
POINT pts[4] = {{10, 10}, {20, 10}, {10, 20}, {20, 20}};
|
||||
DWORD counts[2] = {2, 2};
|
||||
HDC hdcMetafile;
|
||||
HENHMETAFILE hemf;
|
||||
BOOL ret;
|
||||
|
@ -3670,10 +3678,11 @@ static void test_emf_GetPath(void)
|
|||
Ellipse(hdcMetafile, 10, 10, 20, 20);
|
||||
RoundRect(hdcMetafile, 10, 10, 20, 20, 3, 5);
|
||||
Polyline(hdcMetafile, pts, 4);
|
||||
PolyPolyline(hdcMetafile, pts, counts, 2);
|
||||
EndPath(hdcMetafile);
|
||||
|
||||
size = GetPath(hdcMetafile, NULL, NULL, 0);
|
||||
todo_wine ok( size == 73, "GetPath returned %d.\n", size);
|
||||
todo_wine ok( size == 77, "GetPath returned %d.\n", size);
|
||||
|
||||
hemf = CloseEnhMetaFile(hdcMetafile);
|
||||
ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError());
|
||||
|
|
Loading…
Reference in a new issue