mirror of
https://github.com/reactos/reactos.git
synced 2025-01-03 21:09:19 +00:00
[GDI32_WINETEST] Sync with Wine Staging 1.9.14.
svn path=/trunk/; revision=71894
This commit is contained in:
parent
b9a5fd8135
commit
dc0f375a2d
6 changed files with 1542 additions and 315 deletions
|
@ -54,8 +54,7 @@ static void test_GetRandomRgn(void)
|
|||
ret = GetRandomRgn(hdc, hrgn, 1);
|
||||
ok(ret != 0, "GetRandomRgn rets %d\n", ret);
|
||||
GetRgnBox(hrgn, &ret_rc);
|
||||
ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom);
|
||||
ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %s\n", wine_dbgstr_rect(&ret_rc));
|
||||
|
||||
ret = GetRandomRgn(hdc, hrgn, 2);
|
||||
ok(ret == 0, "GetRandomRgn rets %d\n", ret);
|
||||
|
@ -63,8 +62,7 @@ static void test_GetRandomRgn(void)
|
|||
ret = GetRandomRgn(hdc, hrgn, 3);
|
||||
ok(ret != 0, "GetRandomRgn rets %d\n", ret);
|
||||
GetRgnBox(hrgn, &ret_rc);
|
||||
ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom);
|
||||
ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %s\n", wine_dbgstr_rect(&ret_rc));
|
||||
|
||||
/* Move the clip to the meta and clear the clip */
|
||||
SetMetaRgn(hdc);
|
||||
|
@ -74,14 +72,12 @@ static void test_GetRandomRgn(void)
|
|||
ret = GetRandomRgn(hdc, hrgn, 2);
|
||||
ok(ret != 0, "GetRandomRgn rets %d\n", ret);
|
||||
GetRgnBox(hrgn, &ret_rc);
|
||||
ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom);
|
||||
ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %s\n", wine_dbgstr_rect(&ret_rc));
|
||||
|
||||
ret = GetRandomRgn(hdc, hrgn, 3);
|
||||
ok(ret != 0, "GetRandomRgn rets %d\n", ret);
|
||||
GetRgnBox(hrgn, &ret_rc);
|
||||
ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom);
|
||||
ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %s\n", wine_dbgstr_rect(&ret_rc));
|
||||
|
||||
/* Set a new clip (still got the meta) */
|
||||
SetRect(&rc2, 10, 30, 70, 90);
|
||||
|
@ -90,22 +86,19 @@ static void test_GetRandomRgn(void)
|
|||
ret = GetRandomRgn(hdc, hrgn, 1);
|
||||
ok(ret != 0, "GetRandomRgn rets %d\n", ret);
|
||||
GetRgnBox(hrgn, &ret_rc);
|
||||
ok(EqualRect(&rc2, &ret_rc), "GetRandomRgn %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom);
|
||||
ok(EqualRect(&rc2, &ret_rc), "GetRandomRgn %s\n", wine_dbgstr_rect(&ret_rc));
|
||||
|
||||
ret = GetRandomRgn(hdc, hrgn, 2);
|
||||
ok(ret != 0, "GetRandomRgn rets %d\n", ret);
|
||||
GetRgnBox(hrgn, &ret_rc);
|
||||
ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom);
|
||||
ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %s\n", wine_dbgstr_rect(&ret_rc));
|
||||
|
||||
IntersectRect(&rc2, &rc, &rc2);
|
||||
|
||||
ret = GetRandomRgn(hdc, hrgn, 3);
|
||||
ok(ret != 0, "GetRandomRgn rets %d\n", ret);
|
||||
GetRgnBox(hrgn, &ret_rc);
|
||||
ok(EqualRect(&rc2, &ret_rc), "GetRandomRgn %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom);
|
||||
ok(EqualRect(&rc2, &ret_rc), "GetRandomRgn %s\n", wine_dbgstr_rect(&ret_rc));
|
||||
|
||||
|
||||
ret = GetRandomRgn(hdc, hrgn, SYSRGN);
|
||||
|
@ -115,10 +108,7 @@ static void test_GetRandomRgn(void)
|
|||
OffsetRect(&window_rc, -window_rc.left, -window_rc.top);
|
||||
/* the window may be partially obscured so the region may be smaller */
|
||||
IntersectRect( &window_rc, &ret_rc, &ret_rc );
|
||||
ok(EqualRect(&window_rc, &ret_rc) ||
|
||||
broken(IsRectEmpty(&ret_rc)), /* win95 */
|
||||
"GetRandomRgn %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom);
|
||||
ok(EqualRect(&window_rc, &ret_rc), "GetRandomRgn %s\n", wine_dbgstr_rect(&ret_rc));
|
||||
|
||||
DeleteObject(hrgn);
|
||||
ReleaseDC(hwnd, hdc);
|
||||
|
@ -149,15 +139,13 @@ static void verify_region(HRGN hrgn, const RECT *rc)
|
|||
else
|
||||
ok(ret == sizeof(rgn.data.rdh) + sizeof(RECT), "expected sizeof(rgn), got %u\n", ret);
|
||||
|
||||
trace("size %u, type %u, count %u, rgn size %u, bound (%d,%d-%d,%d)\n",
|
||||
rgn.data.rdh.dwSize, rgn.data.rdh.iType,
|
||||
rgn.data.rdh.nCount, rgn.data.rdh.nRgnSize,
|
||||
rgn.data.rdh.rcBound.left, rgn.data.rdh.rcBound.top,
|
||||
rgn.data.rdh.rcBound.right, rgn.data.rdh.rcBound.bottom);
|
||||
trace("size %u, type %u, count %u, rgn size %u, bound %s\n",
|
||||
rgn.data.rdh.dwSize, rgn.data.rdh.iType, rgn.data.rdh.nCount, rgn.data.rdh.nRgnSize,
|
||||
wine_dbgstr_rect(&rgn.data.rdh.rcBound));
|
||||
if (rgn.data.rdh.nCount != 0)
|
||||
{
|
||||
rect = (const RECT *)rgn.data.Buffer;
|
||||
trace("rect (%d,%d-%d,%d)\n", rect->left, rect->top, rect->right, rect->bottom);
|
||||
trace("rect %s\n", wine_dbgstr_rect(rect));
|
||||
ok(EqualRect(rect, rc), "rects don't match\n");
|
||||
}
|
||||
|
||||
|
@ -415,7 +403,7 @@ static void test_memory_dc_clipping(void)
|
|||
ret = GetRgnBox(hrgn, &rc);
|
||||
ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret);
|
||||
ok(rc.left == 0 && rc.top == 0 && rc.right == 1 && rc.bottom == 1,
|
||||
"expected 0,0-1,1, got %d,%d-%d,%d\n", rc.left, rc.top, rc.right, rc.bottom);
|
||||
"expected 0,0-1,1, got %s\n", wine_dbgstr_rect(&rc));
|
||||
|
||||
ret = ExtSelectClipRgn(hdc, 0, RGN_COPY);
|
||||
ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret);
|
||||
|
@ -440,15 +428,15 @@ static void test_memory_dc_clipping(void)
|
|||
ret = GetRgnBox(hrgn, &rc);
|
||||
ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret);
|
||||
ok(rc.left == 0 && rc.top == 0 && rc.right == 100 && rc.bottom == 100,
|
||||
"expected 0,0-100,100, got %d,%d-%d,%d\n", rc.left, rc.top, rc.right, rc.bottom);
|
||||
"expected 0,0-100,100, got %s\n", wine_dbgstr_rect(&rc));
|
||||
|
||||
SetRect( &rc, 10, 10, 20, 20 );
|
||||
ret = RectVisible( hdc, &rc );
|
||||
ok( ret, "RectVisible failed for %d,%d-%d,%d\n", rc.left, rc.top, rc.right, rc.bottom );
|
||||
ok(ret, "RectVisible failed for %s\n", wine_dbgstr_rect(&rc));
|
||||
|
||||
SetRect( &rc, 20, 20, 10, 10 );
|
||||
ret = RectVisible( hdc, &rc );
|
||||
ok( ret, "RectVisible failed for %d,%d-%d,%d\n", rc.left, rc.top, rc.right, rc.bottom );
|
||||
ok(ret, "RectVisible failed for %s\n", wine_dbgstr_rect(&rc));
|
||||
|
||||
ret = ExtSelectClipRgn(hdc, 0, RGN_DIFF);
|
||||
ok(ret == 0, "expected 0, got %d\n", ret);
|
||||
|
@ -459,7 +447,7 @@ static void test_memory_dc_clipping(void)
|
|||
ret = GetRgnBox(hrgn, &rc);
|
||||
ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret);
|
||||
ok(rc.left == 0 && rc.top == 0 && rc.right == 100 && rc.bottom == 100,
|
||||
"expected 0,0-100,100, got %d,%d-%d,%d\n", rc.left, rc.top, rc.right, rc.bottom);
|
||||
"expected 0,0-100,100, got %s\n", wine_dbgstr_rect(&rc));
|
||||
|
||||
DeleteDC(hdc);
|
||||
DeleteObject(hrgn);
|
||||
|
@ -510,17 +498,16 @@ static void test_window_dc_clipping(void)
|
|||
|
||||
ret = GetRgnBox(hrgn, &rc);
|
||||
ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret);
|
||||
ok(EqualRect(&rc, &virtual_rect), "expected %d,%d-%d,%d, got %d,%d-%d,%d\n",
|
||||
virtual_rect.left, virtual_rect.top, virtual_rect.right, virtual_rect.bottom,
|
||||
rc.left, rc.top, rc.right, rc.bottom);
|
||||
ok(EqualRect(&rc, &virtual_rect), "expected %s, got %s\n", wine_dbgstr_rect(&virtual_rect),
|
||||
wine_dbgstr_rect(&rc));
|
||||
|
||||
SetRect( &rc, 10, 10, 20, 20 );
|
||||
ret = RectVisible( hdc, &rc );
|
||||
ok( ret, "RectVisible failed for %d,%d-%d,%d\n", rc.left, rc.top, rc.right, rc.bottom );
|
||||
ok( ret, "RectVisible failed for %s\n", wine_dbgstr_rect(&rc));
|
||||
|
||||
SetRect( &rc, 20, 20, 10, 10 );
|
||||
ret = RectVisible( hdc, &rc );
|
||||
ok( ret, "RectVisible failed for %d,%d-%d,%d\n", rc.left, rc.top, rc.right, rc.bottom );
|
||||
ok( ret, "RectVisible failed for %s\n", wine_dbgstr_rect(&rc));
|
||||
|
||||
ret = ExtSelectClipRgn(hdc, 0, RGN_DIFF);
|
||||
ok(ret == 0, "expected 0, got %d\n", ret);
|
||||
|
@ -530,9 +517,8 @@ static void test_window_dc_clipping(void)
|
|||
|
||||
ret = GetRgnBox(hrgn, &rc);
|
||||
ok(ret == SIMPLEREGION, "expected SIMPLEREGION, got %d\n", ret);
|
||||
ok(EqualRect(&rc, &virtual_rect), "expected %d,%d-%d,%d, got %d,%d-%d,%d\n",
|
||||
virtual_rect.left, virtual_rect.top, virtual_rect.right, virtual_rect.bottom,
|
||||
rc.left, rc.top, rc.right, rc.bottom);
|
||||
ok(EqualRect(&rc, &virtual_rect), "expected %s, got %s\n", wine_dbgstr_rect(&virtual_rect),
|
||||
wine_dbgstr_rect(&rc));
|
||||
|
||||
ret = ExtSelectClipRgn(hdc, 0, RGN_COPY);
|
||||
ok(ret == SIMPLEREGION || (ret == COMPLEXREGION && GetSystemMetrics(SM_CMONITORS) > 1),
|
||||
|
|
|
@ -134,14 +134,12 @@ static void test_savedc_2(void)
|
|||
ret = GetClipRgn(hdc, hrgn);
|
||||
ok(ret == 0, "GetClipRgn returned %d instead of 0\n", ret);
|
||||
ret = GetRgnBox(hrgn, &rc);
|
||||
ok(ret == NULLREGION, "GetRgnBox returned %d (%d,%d-%d,%d) instead of NULLREGION\n",
|
||||
ret, rc.left, rc.top, rc.right, rc.bottom);
|
||||
ok(ret == NULLREGION, "GetRgnBox returned %d %s instead of NULLREGION\n",
|
||||
ret, wine_dbgstr_rect(&rc));
|
||||
/*dump_region(hrgn);*/
|
||||
SetRect(&rc, 0, 0, 100, 100);
|
||||
ok(EqualRect(&rc, &rc_clip),
|
||||
"rects are not equal: (%d,%d-%d,%d) - (%d,%d-%d,%d)\n",
|
||||
rc.left, rc.top, rc.right, rc.bottom,
|
||||
rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom);
|
||||
ok(EqualRect(&rc, &rc_clip), "rects are not equal: %s - %s\n", wine_dbgstr_rect(&rc),
|
||||
wine_dbgstr_rect(&rc_clip));
|
||||
|
||||
ret = SaveDC(hdc);
|
||||
ok(ret == 1, "ret = %d\n", ret);
|
||||
|
@ -162,10 +160,8 @@ static void test_savedc_2(void)
|
|||
ret = GetClipBox(hdc, &rc_clip);
|
||||
ok(ret == SIMPLEREGION || broken(ret == COMPLEXREGION), "GetClipBox returned %d instead of SIMPLEREGION\n", ret);
|
||||
SetRect(&rc, 0, 0, 50, 50);
|
||||
ok(EqualRect(&rc, &rc_clip),
|
||||
"rects are not equal: (%d,%d-%d,%d) - (%d,%d-%d,%d)\n",
|
||||
rc.left, rc.top, rc.right, rc.bottom,
|
||||
rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom);
|
||||
ok(EqualRect(&rc, &rc_clip), "rects are not equal: %s - %s\n", wine_dbgstr_rect(&rc),
|
||||
wine_dbgstr_rect(&rc_clip));
|
||||
|
||||
ret = RestoreDC(hdc, 1);
|
||||
ok(ret, "ret = %d\n", ret);
|
||||
|
@ -173,10 +169,8 @@ static void test_savedc_2(void)
|
|||
ret = GetClipBox(hdc, &rc_clip);
|
||||
ok(ret == SIMPLEREGION || broken(ret == COMPLEXREGION), "GetClipBox returned %d instead of SIMPLEREGION\n", ret);
|
||||
SetRect(&rc, 0, 0, 100, 100);
|
||||
ok(EqualRect(&rc, &rc_clip),
|
||||
"rects are not equal: (%d,%d-%d,%d) - (%d,%d-%d,%d)\n",
|
||||
rc.left, rc.top, rc.right, rc.bottom,
|
||||
rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom);
|
||||
ok(EqualRect(&rc, &rc_clip), "rects are not equal: %s - %s\n", wine_dbgstr_rect(&rc),
|
||||
wine_dbgstr_rect(&rc_clip));
|
||||
|
||||
DeleteObject(hrgn);
|
||||
ReleaseDC(hwnd, hdc);
|
||||
|
@ -432,8 +426,8 @@ static void test_device_caps( HDC hdc, HDC ref_dc, const char *descr, int scale
|
|||
"GetBoundsRect returned type %x for %s\n", type, descr );
|
||||
if (type == DCB_RESET)
|
||||
ok( rect.left == 0 && rect.top == 0 && rect.right == 0 && rect.bottom == 0,
|
||||
"GetBoundsRect returned %d,%d,%d,%d type %x for %s\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom, type, descr );
|
||||
"GetBoundsRect returned %s type %x for %s\n", wine_dbgstr_rect( &rect ),
|
||||
type, descr );
|
||||
type = SetBoundsRect( hdc, NULL, DCB_RESET | DCB_ENABLE );
|
||||
ok( type == (DCB_RESET | DCB_DISABLE) || broken(type == (DCB_SET | DCB_ENABLE)) /* XP */,
|
||||
"SetBoundsRect returned %x for %s (hdc type %d)\n", type, descr, GetObjectType( hdc ) );
|
||||
|
@ -443,8 +437,8 @@ static void test_device_caps( HDC hdc, HDC ref_dc, const char *descr, int scale
|
|||
type = GetBoundsRect( hdc, &rect, DCB_RESET );
|
||||
todo_wine_if (GetObjectType( hdc ) == OBJ_ENHMETADC || (GetObjectType( hdc ) == OBJ_DC && GetDeviceCaps( hdc, TECHNOLOGY ) == DT_RASPRINTER))
|
||||
ok( rect.left == 2 && rect.top == 2 && rect.right == 4 && rect.bottom == 4 && type == DCB_SET,
|
||||
"GetBoundsRect returned %d,%d,%d,%d type %x for %s\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom, type, descr );
|
||||
"GetBoundsRect returned %s type %x for %s\n", wine_dbgstr_rect( &rect ),
|
||||
type, descr );
|
||||
}
|
||||
|
||||
type = GetClipBox( ref_dc, &rect );
|
||||
|
@ -477,8 +471,8 @@ static void test_device_caps( HDC hdc, HDC ref_dc, const char *descr, int scale
|
|||
|
||||
todo_wine_if (GetDeviceCaps( ref_dc, TECHNOLOGY ) == DT_RASDISPLAY && GetObjectType( hdc ) != OBJ_ENHMETADC &&
|
||||
(GetSystemMetrics( SM_XVIRTUALSCREEN ) || GetSystemMetrics( SM_YVIRTUALSCREEN )))
|
||||
ok( EqualRect( &rect, &ref_rect ), "GetClipBox returned %d,%d,%d,%d on %s\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom, descr );
|
||||
ok( EqualRect( &rect, &ref_rect ), "GetClipBox returned %s on %s\n",
|
||||
wine_dbgstr_rect( &rect ), descr );
|
||||
}
|
||||
|
||||
SetBoundsRect( ref_dc, NULL, DCB_RESET | DCB_ACCUMULATE );
|
||||
|
@ -488,8 +482,7 @@ static void test_device_caps( HDC hdc, HDC ref_dc, const char *descr, int scale
|
|||
/* it may or may not work on non-memory DCs */
|
||||
ok( (rect.left == 0 && rect.top == 0 && rect.right == 0 && rect.bottom == 0 && type == DCB_RESET) ||
|
||||
(rect.left == 3 && rect.top == 3 && rect.right == 5 && rect.bottom == 5 && type == DCB_SET),
|
||||
"GetBoundsRect returned %d,%d,%d,%d type %x on %s\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom, type, descr );
|
||||
"GetBoundsRect returned %s type %x on %s\n", wine_dbgstr_rect( &rect ), type, descr );
|
||||
|
||||
if (GetObjectType( hdc ) == OBJ_MEMDC)
|
||||
{
|
||||
|
@ -521,16 +514,15 @@ static void test_device_caps( HDC hdc, HDC ref_dc, const char *descr, int scale
|
|||
type = GetClipBox( hdc, &rect );
|
||||
ok( type == SIMPLEREGION, "GetClipBox returned %d on memdc for %s\n", type, descr );
|
||||
ok( rect.left == 0 && rect.top == 0 && rect.right == 16 && rect.bottom == 16,
|
||||
"GetClipBox returned %d,%d,%d,%d on memdc for %s\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom, descr );
|
||||
"GetClipBox returned %s on memdc for %s\n", wine_dbgstr_rect( &rect ), descr );
|
||||
|
||||
SetBoundsRect( hdc, NULL, DCB_RESET | DCB_ENABLE );
|
||||
SetMapMode( hdc, MM_TEXT );
|
||||
Rectangle( hdc, 5, 5, 12, 14 );
|
||||
type = GetBoundsRect( hdc, &rect, DCB_RESET );
|
||||
ok( rect.left == 5 && rect.top == 5 && rect.right == 12 && rect.bottom == 14 && type == DCB_SET,
|
||||
"GetBoundsRect returned %d,%d,%d,%d type %x on memdc for %s\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom, type, descr );
|
||||
"GetBoundsRect returned %s type %x on memdc for %s\n", wine_dbgstr_rect( &rect ),
|
||||
type, descr );
|
||||
|
||||
SelectObject( hdc, old );
|
||||
DeleteObject( dib );
|
||||
|
@ -891,10 +883,8 @@ static void test_boundsrect(void)
|
|||
ok(ret == DCB_RESET,
|
||||
"Expected GetBoundsRect to return DCB_RESET, got %u\n", ret);
|
||||
SetRectEmpty(&expect);
|
||||
ok(EqualRect(&rect, &expect) ||
|
||||
broken(EqualRect(&rect, &set_rect)), /* nt4 sp1-5 */
|
||||
"Expected output rectangle (0,0)-(0,0), got (%d,%d)-(%d,%d)\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom);
|
||||
ok(EqualRect(&rect, &expect), "Expected output rectangle (0,0)-(0,0), got %s\n",
|
||||
wine_dbgstr_rect(&rect));
|
||||
|
||||
ret = GetBoundsRect(NULL, NULL, 0);
|
||||
ok(ret == 0, "Expected GetBoundsRect to return 0, got %u\n", ret);
|
||||
|
@ -915,23 +905,20 @@ static void test_boundsrect(void)
|
|||
ret = GetBoundsRect(hdc, &rect, 0);
|
||||
ok(ret == DCB_SET, "GetBoundsRect returned %x\n", ret);
|
||||
SetRect(&expect, 10, 20, 40, 50);
|
||||
ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom);
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
|
||||
SetMapMode( hdc, MM_ANISOTROPIC );
|
||||
SetViewportExtEx( hdc, 2, 2, NULL );
|
||||
ret = GetBoundsRect(hdc, &rect, 0);
|
||||
ok(ret == DCB_SET, "GetBoundsRect returned %x\n", ret);
|
||||
SetRect(&expect, 5, 10, 20, 25);
|
||||
ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom);
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
|
||||
SetViewportOrgEx( hdc, 20, 30, NULL );
|
||||
ret = GetBoundsRect(hdc, &rect, 0);
|
||||
ok(ret == DCB_SET, "GetBoundsRect returned %x\n", ret);
|
||||
SetRect(&expect, -5, -5, 10, 10);
|
||||
ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom);
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
|
||||
SetRect(&set_rect, 10, 20, 40, 50);
|
||||
ret = SetBoundsRect(hdc, &set_rect, DCB_SET);
|
||||
|
@ -940,16 +927,14 @@ static void test_boundsrect(void)
|
|||
ret = GetBoundsRect(hdc, &rect, 0);
|
||||
ok(ret == DCB_SET, "GetBoundsRect returned %x\n", ret);
|
||||
SetRect(&expect, 10, 20, 40, 50);
|
||||
ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom);
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
|
||||
SetMapMode( hdc, MM_TEXT );
|
||||
SetViewportOrgEx( hdc, 0, 0, NULL );
|
||||
ret = GetBoundsRect(hdc, &rect, 0);
|
||||
ok(ret == DCB_SET, "GetBoundsRect returned %x\n", ret);
|
||||
SetRect(&expect, 40, 70, 100, 130);
|
||||
ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom);
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
|
||||
if (pSetLayout)
|
||||
{
|
||||
|
@ -957,23 +942,20 @@ static void test_boundsrect(void)
|
|||
ret = GetBoundsRect(hdc, &rect, 0);
|
||||
ok(ret == DCB_SET, "GetBoundsRect returned %x\n", ret);
|
||||
SetRect(&expect, 159, 70, 99, 130);
|
||||
ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom);
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
SetRect(&set_rect, 50, 25, 30, 35);
|
||||
ret = SetBoundsRect(hdc, &set_rect, DCB_SET);
|
||||
ok(ret == (DCB_SET | DCB_DISABLE), "SetBoundsRect returned %x\n", ret);
|
||||
ret = GetBoundsRect(hdc, &rect, 0);
|
||||
ok(ret == DCB_SET, "GetBoundsRect returned %x\n", ret);
|
||||
SetRect(&expect, 50, 25, 30, 35);
|
||||
ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom);
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
|
||||
pSetLayout( hdc, LAYOUT_LTR );
|
||||
ret = GetBoundsRect(hdc, &rect, 0);
|
||||
ok(ret == DCB_SET, "GetBoundsRect returned %x\n", ret);
|
||||
SetRect(&expect, 149, 25, 169, 35);
|
||||
ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom);
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
}
|
||||
|
||||
/* empty rect resets, except on nt4 */
|
||||
|
@ -986,8 +968,7 @@ static void test_boundsrect(void)
|
|||
if (ret == DCB_RESET)
|
||||
{
|
||||
SetRectEmpty(&expect);
|
||||
ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom);
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
|
||||
SetRect(&expect, 20, 20, 20, 20);
|
||||
ret = SetBoundsRect(hdc, &set_rect, DCB_SET);
|
||||
|
@ -995,8 +976,7 @@ static void test_boundsrect(void)
|
|||
ret = GetBoundsRect(hdc, &rect, 0);
|
||||
ok(ret == DCB_RESET, "GetBoundsRect returned %x\n", ret);
|
||||
SetRectEmpty(&expect);
|
||||
ok(EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom);
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
}
|
||||
|
||||
SetBoundsRect( hdc, NULL, DCB_RESET | DCB_ENABLE );
|
||||
|
@ -1005,47 +985,47 @@ static void test_boundsrect(void)
|
|||
ret = GetBoundsRect( hdc, &rect, 0 );
|
||||
ok( ret == DCB_SET, "GetBoundsRect returned %x\n", ret );
|
||||
SetRect( &expect, 10, 10, 21, 21 );
|
||||
ok( EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok( EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
SetRect( &rect, 8, 8, 23, 23 );
|
||||
expect = rect;
|
||||
SetBoundsRect( hdc, &rect, DCB_ACCUMULATE );
|
||||
ret = GetBoundsRect( hdc, &rect, 0 );
|
||||
ok( ret == DCB_SET, "GetBoundsRect returned %x\n", ret );
|
||||
ok( EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
|
||||
level = SaveDC( hdc );
|
||||
LineTo( hdc, 30, 25 );
|
||||
ret = GetBoundsRect( hdc, &rect, 0 );
|
||||
ok( ret == DCB_SET, "GetBoundsRect returned %x\n", ret );
|
||||
SetRect( &expect, 8, 8, 31, 26 );
|
||||
ok( EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
SetBoundsRect( hdc, NULL, DCB_DISABLE );
|
||||
LineTo( hdc, 40, 40 );
|
||||
ret = GetBoundsRect( hdc, &rect, 0 );
|
||||
ok( ret == DCB_SET, "GetBoundsRect returned %x\n", ret );
|
||||
SetRect( &expect, 8, 8, 31, 26 );
|
||||
ok( EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
SetRect( &rect, 6, 6, 30, 30 );
|
||||
SetBoundsRect( hdc, &rect, DCB_ACCUMULATE );
|
||||
ret = GetBoundsRect( hdc, &rect, 0 );
|
||||
ok( ret == DCB_SET, "GetBoundsRect returned %x\n", ret );
|
||||
SetRect( &expect, 6, 6, 31, 30 );
|
||||
ok( EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
|
||||
RestoreDC( hdc, level );
|
||||
ret = GetBoundsRect( hdc, &rect, 0 );
|
||||
ok( ret == DCB_SET, "GetBoundsRect returned %x\n", ret );
|
||||
ok( EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
LineTo( hdc, 40, 40 );
|
||||
ret = GetBoundsRect( hdc, &rect, 0 );
|
||||
ok( ret == DCB_SET, "GetBoundsRect returned %x\n", ret );
|
||||
ok( EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
|
||||
SelectObject( hdc, old );
|
||||
ret = GetBoundsRect( hdc, &rect, 0 );
|
||||
ok( ret == DCB_SET, "GetBoundsRect returned %x\n", ret );
|
||||
SetRect( &expect, 6, 6, 1, 1 );
|
||||
ok( EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
SetBoundsRect( hdc, NULL, DCB_ENABLE );
|
||||
LineTo( hdc, 50, 40 );
|
||||
|
||||
|
@ -1053,13 +1033,13 @@ static void test_boundsrect(void)
|
|||
ret = GetBoundsRect( hdc, &rect, 0 );
|
||||
ok( ret == DCB_SET, "GetBoundsRect returned %x\n", ret );
|
||||
SetRect( &expect, 6, 6, 51, 41 );
|
||||
ok( EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
SelectObject( hdc, GetStockObject( NULL_PEN ));
|
||||
LineTo( hdc, 50, 50 );
|
||||
ret = GetBoundsRect( hdc, &rect, 0 );
|
||||
ok( ret == DCB_SET, "GetBoundsRect returned %x\n", ret );
|
||||
SetRect( &expect, 6, 6, 51, 51 );
|
||||
ok( EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
|
||||
memset( buffer, 0, sizeof(buffer) );
|
||||
info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
|
||||
|
@ -1074,22 +1054,22 @@ static void test_boundsrect(void)
|
|||
ret = GetBoundsRect( hdc, &rect, 0 );
|
||||
ok( ret == DCB_SET, "GetBoundsRect returned %x\n", ret );
|
||||
SetRect( &expect, 6, 6, 51, 51 );
|
||||
ok( EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
LineTo( hdc, 55, 30 );
|
||||
ret = GetBoundsRect( hdc, &rect, 0 );
|
||||
ok( ret == DCB_SET, "GetBoundsRect returned %x\n", ret );
|
||||
SetRect( &expect, 6, 6, 56, 51 );
|
||||
ok( EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
LineTo( hdc, 300, 30 );
|
||||
ret = GetBoundsRect( hdc, &rect, 0 );
|
||||
ok( ret == DCB_SET, "GetBoundsRect returned %x\n", ret );
|
||||
SetRect( &expect, 6, 6, 256, 51 );
|
||||
ok( EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
LineTo( hdc, -300, -300 );
|
||||
ret = GetBoundsRect( hdc, &rect, 0 );
|
||||
ok( ret == DCB_SET, "GetBoundsRect returned %x\n", ret );
|
||||
SetRect( &expect, 0, 0, 256, 51 );
|
||||
ok( EqualRect(&rect, &expect), "Got (%d,%d)-(%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok(EqualRect(&rect, &expect), "Got %s\n", wine_dbgstr_rect(&rect));
|
||||
|
||||
/* test the wide pen heuristics */
|
||||
SetBoundsRect( hdc, NULL, DCB_ENABLE | DCB_RESET );
|
||||
|
@ -1130,10 +1110,8 @@ static void test_boundsrect(void)
|
|||
expect.top = max( expect.top, 0 );
|
||||
expect.right = min( expect.right, 256 );
|
||||
expect.bottom = min( expect.bottom, 256 );
|
||||
ok( EqualRect(&rect, &expect),
|
||||
"Got %d,%d,%d,%d expected %d,%d,%d,%d %u/%x/%x\n",
|
||||
rect.left, rect.top, rect.right, rect.bottom,
|
||||
expect.left, expect.top, expect.right, expect.bottom, width, endcap, join );
|
||||
ok(EqualRect(&rect, &expect), "Got %s expected %s %u/%x/%x\n", wine_dbgstr_rect(&rect),
|
||||
wine_dbgstr_rect(&expect), width, endcap, join);
|
||||
DeleteObject( SelectObject( hdc, old ));
|
||||
}
|
||||
|
||||
|
|
|
@ -1275,14 +1275,12 @@ static void compare_bounds( HDC hdc, const char *info )
|
|||
current_bounds->right == -1 &&
|
||||
current_bounds->bottom == -1)
|
||||
{
|
||||
ok( 0, "missing bounds, got { %d, %d, %d, %d },\n", rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok( 0, "missing bounds, got %s,\n", wine_dbgstr_rect( &rect ));
|
||||
return;
|
||||
}
|
||||
|
||||
ok( !memcmp( current_bounds, &rect, sizeof(RECT) ),
|
||||
"%s: %s: expected bounds %d,%d,%d,%d got %d,%d,%d,%d\n", dst_format, info,
|
||||
current_bounds->left, current_bounds->top, current_bounds->right, current_bounds->bottom,
|
||||
rect.left, rect.top, rect.right, rect.bottom );
|
||||
ok( EqualRect( current_bounds, &rect ), "%s: %s: expected bounds %s got %s\n", dst_format, info,
|
||||
wine_dbgstr_rect( current_bounds ), wine_dbgstr_rect( &rect ));
|
||||
current_bounds++;
|
||||
}
|
||||
|
||||
|
|
|
@ -309,27 +309,22 @@ static void test_dc_layout(void)
|
|||
hrgn = CreateRectRgn( 0, 0, 0, 0 );
|
||||
GetClipRgn( hdc, hrgn );
|
||||
GetRgnBox( hrgn, &ret_rc );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
|
||||
pSetLayout( hdc, LAYOUT_LTR );
|
||||
SetRect( &rc, 80, 10, 90, 20 );
|
||||
GetClipRgn( hdc, hrgn );
|
||||
GetRgnBox( hrgn, &ret_rc );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
|
||||
GetClipBox( hdc, &ret_rc );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
|
||||
IntersectClipRect( hdc, 80, 10, 85, 20 );
|
||||
pSetLayout( hdc, LAYOUT_RTL );
|
||||
SetRect( &rc, 15, 10, 20, 20 );
|
||||
GetClipRgn( hdc, hrgn );
|
||||
GetRgnBox( hrgn, &ret_rc );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
|
||||
GetClipBox( hdc, &ret_rc );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
|
||||
SetRectRgn( hrgn, 60, 10, 80, 20 );
|
||||
pSetLayout( hdc, LAYOUT_LTR );
|
||||
ExtSelectClipRgn( hdc, hrgn, RGN_OR );
|
||||
|
@ -337,19 +332,16 @@ static void test_dc_layout(void)
|
|||
SetRect( &rc, 15, 10, 40, 20 );
|
||||
GetClipRgn( hdc, hrgn );
|
||||
GetRgnBox( hrgn, &ret_rc );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
|
||||
GetClipBox( hdc, &ret_rc );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
|
||||
|
||||
/* OffsetClipRgn mirrors too */
|
||||
OffsetClipRgn( hdc, 5, 5 );
|
||||
OffsetRect( &rc, 5, 5 );
|
||||
GetClipRgn( hdc, hrgn );
|
||||
GetRgnBox( hrgn, &ret_rc );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
|
||||
|
||||
/* GetRandomRgn returns the raw region */
|
||||
if (pGetRandomRgn)
|
||||
|
@ -357,8 +349,7 @@ static void test_dc_layout(void)
|
|||
SetRect( &rc, 55, 15, 80, 25 );
|
||||
pGetRandomRgn( hdc, hrgn, 1 );
|
||||
GetRgnBox( hrgn, &ret_rc );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %d,%d - %d,%d\n",
|
||||
ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom );
|
||||
ok( EqualRect( &rc, &ret_rc ), "wrong clip box %s\n", wine_dbgstr_rect( &ret_rc ));
|
||||
}
|
||||
|
||||
SetMapMode(hdc, MM_LOMETRIC);
|
||||
|
|
|
@ -2624,16 +2624,15 @@ static int CALLBACK clip_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table,
|
|||
|
||||
rgn1 = (const union _rgn *)clip->RgnData;
|
||||
|
||||
trace("size %u, type %u, count %u, rgn size %u, bound (%d,%d-%d,%d)\n",
|
||||
trace("size %u, type %u, count %u, rgn size %u, bound %s\n",
|
||||
rgn1->data.rdh.dwSize, rgn1->data.rdh.iType,
|
||||
rgn1->data.rdh.nCount, rgn1->data.rdh.nRgnSize,
|
||||
rgn1->data.rdh.rcBound.left, rgn1->data.rdh.rcBound.top,
|
||||
rgn1->data.rdh.rcBound.right, rgn1->data.rdh.rcBound.bottom);
|
||||
wine_dbgstr_rect(&rgn1->data.rdh.rcBound));
|
||||
|
||||
ok(EqualRect(&rgn1->data.rdh.rcBound, rc), "rects don't match\n");
|
||||
|
||||
rect = *(const RECT *)rgn1->data.Buffer;
|
||||
trace("rect (%d,%d-%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom);
|
||||
trace("rect %s\n", wine_dbgstr_rect(&rect));
|
||||
ok(EqualRect(&rect, rc), "rects don't match\n");
|
||||
|
||||
ok(rgn1->data.rdh.dwSize == sizeof(rgn1->data.rdh), "expected sizeof(rdh), got %u\n", rgn1->data.rdh.dwSize);
|
||||
|
@ -2671,25 +2670,21 @@ static int CALLBACK clip_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table,
|
|||
ret = GetRegionData(hrgn, sizeof(rgn2), &rgn2.data);
|
||||
ok(ret == sizeof(rgn2), "expected sizeof(rgn2), got %u\n", ret);
|
||||
|
||||
trace("size %u, type %u, count %u, rgn size %u, bound (%d,%d-%d,%d)\n",
|
||||
rgn2.data.rdh.dwSize, rgn2.data.rdh.iType,
|
||||
rgn2.data.rdh.nCount, rgn2.data.rdh.nRgnSize,
|
||||
rgn2.data.rdh.rcBound.left, rgn2.data.rdh.rcBound.top,
|
||||
rgn2.data.rdh.rcBound.right, rgn2.data.rdh.rcBound.bottom);
|
||||
trace("size %u, type %u, count %u, rgn size %u, bound %s\n", rgn2.data.rdh.dwSize,
|
||||
rgn2.data.rdh.iType, rgn2.data.rdh.nCount, rgn2.data.rdh.nRgnSize,
|
||||
wine_dbgstr_rect(&rgn2.data.rdh.rcBound));
|
||||
|
||||
rect = rgn2.data.rdh.rcBound;
|
||||
rc_transformed = *rc;
|
||||
translate((POINT *)&rc_transformed, 2, &xform);
|
||||
trace("transformed (%d,%d-%d,%d)\n", rc_transformed.left, rc_transformed.top,
|
||||
rc_transformed.right, rc_transformed.bottom);
|
||||
trace("transformed %s\n", wine_dbgstr_rect(&rc_transformed));
|
||||
ok(is_equal_rect(&rect, &rc_transformed), "rects don't match\n");
|
||||
|
||||
rect = *(const RECT *)rgn2.data.Buffer;
|
||||
trace("rect (%d,%d-%d,%d)\n", rect.left, rect.top, rect.right, rect.bottom);
|
||||
trace("rect %s\n", wine_dbgstr_rect(&rect));
|
||||
rc_transformed = *rc;
|
||||
translate((POINT *)&rc_transformed, 2, &xform);
|
||||
trace("transformed (%d,%d-%d,%d)\n", rc_transformed.left, rc_transformed.top,
|
||||
rc_transformed.right, rc_transformed.bottom);
|
||||
trace("transformed %s\n", wine_dbgstr_rect(&rc_transformed));
|
||||
ok(is_equal_rect(&rect, &rc_transformed), "rects don't match\n");
|
||||
|
||||
ok(rgn2.data.rdh.dwSize == sizeof(rgn1->data.rdh), "expected sizeof(rdh), got %u\n", rgn2.data.rdh.dwSize);
|
||||
|
@ -2761,10 +2756,8 @@ static void test_emf_clipping(void)
|
|||
SetRect(&rc_res, -1, -1, -1, -1);
|
||||
ret = GetClipBox(hdc, &rc_res);
|
||||
ok(ret == SIMPLEREGION, "got %d\n", ret);
|
||||
ok(EqualRect(&rc_res, &rc_sclip),
|
||||
"expected (%d,%d)-(%d,%d), got (%d,%d)-(%d,%d)\n",
|
||||
rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom,
|
||||
rc_res.left, rc_res.top, rc_res.right, rc_res.bottom);
|
||||
ok(EqualRect(&rc_res, &rc_sclip), "expected %s, got %s\n", wine_dbgstr_rect(&rc_sclip),
|
||||
wine_dbgstr_rect(&rc_res));
|
||||
|
||||
OffsetRect(&rc_sclip, -100, -100);
|
||||
ret = OffsetClipRgn(hdc, -100, -100);
|
||||
|
@ -2772,10 +2765,8 @@ static void test_emf_clipping(void)
|
|||
SetRect(&rc_res, -1, -1, -1, -1);
|
||||
ret = GetClipBox(hdc, &rc_res);
|
||||
ok(ret == SIMPLEREGION, "got %d\n", ret);
|
||||
ok(EqualRect(&rc_res, &rc_sclip),
|
||||
"expected (%d,%d)-(%d,%d), got (%d,%d)-(%d,%d)\n",
|
||||
rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom,
|
||||
rc_res.left, rc_res.top, rc_res.right, rc_res.bottom);
|
||||
ok(EqualRect(&rc_res, &rc_sclip), "expected %s, got %s\n", wine_dbgstr_rect(&rc_sclip),
|
||||
wine_dbgstr_rect(&rc_res));
|
||||
|
||||
ret = IntersectClipRect(hdc, 0, 0, 100, 100);
|
||||
ok(ret == SIMPLEREGION || broken(ret == COMPLEXREGION) /* XP */, "got %d\n", ret);
|
||||
|
@ -2790,10 +2781,8 @@ static void test_emf_clipping(void)
|
|||
SetRect(&rc_res, -1, -1, -1, -1);
|
||||
ret = GetClipBox(hdc, &rc_res);
|
||||
ok(ret == SIMPLEREGION, "got %d\n", ret);
|
||||
ok(EqualRect(&rc_res, &rc),
|
||||
"expected (%d,%d)-(%d,%d), got (%d,%d)-(%d,%d)\n",
|
||||
rc.left, rc.top, rc.right, rc.bottom,
|
||||
rc_res.left, rc_res.top, rc_res.right, rc_res.bottom);
|
||||
ok(EqualRect(&rc_res, &rc), "expected %s, got %s\n", wine_dbgstr_rect(&rc),
|
||||
wine_dbgstr_rect(&rc_res));
|
||||
|
||||
SetRect(&rc_sclip, 0, 0, 100, 50);
|
||||
ret = ExcludeClipRect(hdc, 0, 50, 100, 100);
|
||||
|
@ -2809,10 +2798,8 @@ static void test_emf_clipping(void)
|
|||
SetRect(&rc_res, -1, -1, -1, -1);
|
||||
ret = GetClipBox(hdc, &rc_res);
|
||||
ok(ret == SIMPLEREGION, "got %d\n", ret);
|
||||
ok(EqualRect(&rc_res, &rc_sclip),
|
||||
"expected (%d,%d)-(%d,%d), got (%d,%d)-(%d,%d)\n",
|
||||
rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom,
|
||||
rc_res.left, rc_res.top, rc_res.right, rc_res.bottom);
|
||||
ok(EqualRect(&rc_res, &rc_sclip), "expected %s, got %s\n", wine_dbgstr_rect(&rc_sclip),
|
||||
wine_dbgstr_rect(&rc_res));
|
||||
|
||||
hemf = CloseEnhMetaFile(hdc);
|
||||
DeleteEnhMetaFile(hemf);
|
||||
|
@ -3227,8 +3214,7 @@ static void test_SetWinMetaFileBits(void)
|
|||
if (!wmfDC) return;
|
||||
|
||||
SetWindowExtEx(wmfDC, 100, 100, NULL);
|
||||
rect.left = rect.top = 0;
|
||||
rect.right = rect.bottom = 50;
|
||||
SetRect(&rect, 0, 0, 50, 50);
|
||||
FillRect(wmfDC, &rect, GetStockObject(BLACK_BRUSH));
|
||||
wmf = CloseMetaFile(wmfDC);
|
||||
ok(wmf != NULL, "Metafile creation failed\n");
|
||||
|
@ -3366,16 +3352,17 @@ static BOOL near_match(int x, int y)
|
|||
|
||||
static void getwinmetafilebits(UINT mode, int scale, RECT *rc)
|
||||
{
|
||||
HENHMETAFILE emf;
|
||||
HENHMETAFILE emf, emf2;
|
||||
HDC display_dc, emf_dc;
|
||||
ENHMETAHEADER *enh_header;
|
||||
UINT size, emf_size, i;
|
||||
ENHMETAHEADER *enh_header, *enh2_header;
|
||||
UINT size, emf_size, i, emf2_size;
|
||||
WORD check = 0;
|
||||
DWORD rec_num = 0;
|
||||
METAHEADER *mh = NULL;
|
||||
METARECORD *rec;
|
||||
INT horz_res, vert_res, horz_size, vert_size;
|
||||
INT curve_caps, line_caps, poly_caps;
|
||||
METAFILEPICT mfp;
|
||||
|
||||
display_dc = GetDC(NULL);
|
||||
ok(display_dc != NULL, "display_dc is NULL\n");
|
||||
|
@ -3518,6 +3505,21 @@ static void getwinmetafilebits(UINT mode, int scale, RECT *rc)
|
|||
rec = (METARECORD*)((WORD*)rec + rec->rdSize);
|
||||
}
|
||||
|
||||
/* Show that we get the original back when we do the reverse conversion.
|
||||
mfp is ignored in this case. */
|
||||
mfp.mm = MM_ISOTROPIC;
|
||||
mfp.xExt = 0xcafe;
|
||||
mfp.yExt = 0xbeef;
|
||||
emf2 = SetWinMetaFileBits( size, (BYTE*)mh, NULL, &mfp );
|
||||
ok( !!emf2, "got NULL\n" );
|
||||
emf2_size = GetEnhMetaFileBits( emf2, 0, NULL );
|
||||
enh2_header = HeapAlloc( GetProcessHeap(), 0, emf2_size );
|
||||
emf2_size = GetEnhMetaFileBits( emf2, emf2_size, (BYTE*)enh2_header );
|
||||
ok( emf_size == emf2_size, "%d %d\n", emf_size, emf2_size );
|
||||
ok( !memcmp( enh_header, enh2_header, emf_size ), "mismatch\n" );
|
||||
HeapFree( GetProcessHeap(), 0, enh2_header );
|
||||
DeleteEnhMetaFile( emf2 );
|
||||
|
||||
end:
|
||||
HeapFree(GetProcessHeap(), 0, mh);
|
||||
HeapFree(GetProcessHeap(), 0, enh_header);
|
||||
|
@ -3697,15 +3699,15 @@ static void test_emf_polybezier(void)
|
|||
static const unsigned char EMF_PATH_BITS[] =
|
||||
{
|
||||
0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
|
||||
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,
|
||||
0x0a, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
||||
0x96, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00,
|
||||
0x90, 0x01, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00,
|
||||
0x70, 0x17, 0x00, 0x00, 0x70, 0x17, 0x00, 0x00,
|
||||
0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
|
||||
0x0c, 0x02, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
|
||||
0xf8, 0x02, 0x00, 0x00, 0x17, 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,
|
||||
|
@ -3728,7 +3730,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,
|
||||
|
@ -3751,23 +3758,78 @@ 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,
|
||||
0x59, 0x00, 0x00, 0x00, 0x2c, 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,
|
||||
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, 0x5c, 0x00, 0x00, 0x00,
|
||||
0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0x09, 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,
|
||||
0x14, 0x00, 0x00, 0x00
|
||||
0x1e, 0x00, 0x1e, 0x00, 0x28, 0x00, 0x14, 0x00,
|
||||
0x14, 0x00, 0x1e, 0x00, 0x14, 0x00, 0x14, 0x00,
|
||||
0x14, 0x00, 0x0a, 0x00, 0x06, 0x02, 0x04, 0x04,
|
||||
0x04, 0x02, 0x03, 0x06, 0x02, 0x00, 0x00, 0x00,
|
||||
0x29, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00,
|
||||
0x25, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
|
||||
0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x42,
|
||||
0x00, 0x00, 0x34, 0x43, 0x3c, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00,
|
||||
0x18, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00,
|
||||
0x0a, 0x00, 0x00, 0x00, 0x96, 0x00, 0x00, 0x00,
|
||||
0x96, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00,
|
||||
0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0x0e, 0x00, 0x00, 0x00,
|
||||
0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
static void test_emf_GetPath(void)
|
||||
static const unsigned char EMF_EMPTY_PATH_BITS[] =
|
||||
{
|
||||
POINT pts[4] = {{10, 10}, {20, 10}, {10, 20}, {20, 20}};
|
||||
0x01, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xd8, 0xff, 0xff, 0xff, 0xd8, 0xff, 0xff, 0xff,
|
||||
0x20, 0x45, 0x4d, 0x46, 0x00, 0x00, 0x01, 0x00,
|
||||
0xc8, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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,
|
||||
0x80, 0xa9, 0x03, 0x00, 0x3b, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x3b, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00,
|
||||
0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x10, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
static void test_emf_paths(void)
|
||||
{
|
||||
POINT pts[9] = {{10, 10}, {20, 10}, {10, 20}, {20, 20}, {30, 30}, {40, 20}, {20, 30}, {20, 20}, {20, 10}};
|
||||
DWORD counts[2] = {2, 2};
|
||||
BYTE types[9] = { PT_MOVETO, PT_LINETO, PT_BEZIERTO, PT_BEZIERTO, PT_BEZIERTO, PT_LINETO,
|
||||
PT_LINETO | PT_CLOSEFIGURE, PT_MOVETO, PT_LINETO };
|
||||
HDC hdcMetafile;
|
||||
HENHMETAFILE hemf;
|
||||
BOOL ret;
|
||||
|
@ -3791,24 +3853,67 @@ 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);
|
||||
RoundRect(hdcMetafile, 10, 10, 20, 20, 3, 5);
|
||||
Polyline(hdcMetafile, pts, 4);
|
||||
PolylineTo(hdcMetafile, pts, 4);
|
||||
PolyPolyline(hdcMetafile, pts, counts, 2);
|
||||
PolyDraw(hdcMetafile, pts, types, 9);
|
||||
AngleArc(hdcMetafile, 37, 36, 23, 90, 180);
|
||||
EndPath(hdcMetafile);
|
||||
|
||||
size = GetPath(hdcMetafile, NULL, NULL, 0);
|
||||
todo_wine ok( size == 77, "GetPath returned %d.\n", size);
|
||||
ok( size == 112, "GetPath returned %d.\n", size);
|
||||
|
||||
ret = StrokeAndFillPath( hdcMetafile );
|
||||
ok( ret, "StrokeAndFillPath failed err %d\n", GetLastError() );
|
||||
ret = StrokeAndFillPath( hdcMetafile );
|
||||
ok( !ret, "StrokeAndFillPath succeeded\n" );
|
||||
|
||||
hemf = CloseEnhMetaFile(hdcMetafile);
|
||||
ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError());
|
||||
|
||||
if (compare_emf_bits(hemf, EMF_PATH_BITS, sizeof(EMF_PATH_BITS), "test_emf_GetPath", FALSE) != 0)
|
||||
if (compare_emf_bits(hemf, EMF_PATH_BITS, sizeof(EMF_PATH_BITS), "test_emf_paths", FALSE) != 0)
|
||||
{
|
||||
dump_emf_bits(hemf, "test_emf_GetPath");
|
||||
dump_emf_records(hemf, "test_emf_GetPath");
|
||||
dump_emf_bits(hemf, "test_emf_paths");
|
||||
dump_emf_records(hemf, "test_emf_paths");
|
||||
}
|
||||
|
||||
DeleteEnhMetaFile(hemf);
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
hdcMetafile = CreateEnhMetaFileA(GetDC(0), NULL, NULL, NULL);
|
||||
ok(hdcMetafile != 0, "CreateEnhMetaFileA error %d\n", GetLastError());
|
||||
|
||||
ret = BeginPath(hdcMetafile);
|
||||
ok( ret, "BeginPath failed error %d\n", GetLastError() );
|
||||
ret = CloseFigure(hdcMetafile);
|
||||
ok( ret, "CloseFigure failed error %d\n", GetLastError() );
|
||||
ret = BeginPath(hdcMetafile);
|
||||
ok( ret, "BeginPath failed error %d\n", GetLastError() );
|
||||
ret = EndPath(hdcMetafile);
|
||||
ok( ret, "EndPath failed error %d\n", GetLastError() );
|
||||
ret = EndPath(hdcMetafile);
|
||||
ok( !ret, "EndPath succeeded\n" );
|
||||
ret = CloseFigure(hdcMetafile);
|
||||
ok( !ret, "CloseFigure succeeded\n" );
|
||||
ret = BeginPath(hdcMetafile);
|
||||
ok( ret, "BeginPath failed error %d\n", GetLastError() );
|
||||
ret = AbortPath(hdcMetafile);
|
||||
ok( ret, "AbortPath failed error %d\n", GetLastError() );
|
||||
ret = AbortPath(hdcMetafile);
|
||||
ok( ret, "AbortPath failed error %d\n", GetLastError() );
|
||||
|
||||
hemf = CloseEnhMetaFile(hdcMetafile);
|
||||
ok(hemf != 0, "CloseEnhMetaFile error %d\n", GetLastError());
|
||||
|
||||
if (compare_emf_bits(hemf, EMF_EMPTY_PATH_BITS, sizeof(EMF_EMPTY_PATH_BITS), "empty path", FALSE) != 0)
|
||||
{
|
||||
dump_emf_bits(hemf, "empty path");
|
||||
dump_emf_records(hemf, "empty path");
|
||||
}
|
||||
|
||||
DeleteEnhMetaFile(hemf);
|
||||
|
@ -3925,7 +4030,7 @@ START_TEST(metafile)
|
|||
test_emf_ExtTextOut_on_path();
|
||||
test_emf_clipping();
|
||||
test_emf_polybezier();
|
||||
test_emf_GetPath();
|
||||
test_emf_paths();
|
||||
test_emf_PolyPolyline();
|
||||
test_emf_GradientFill();
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue