Module: wine Branch: master Commit: dad99e2aa943bf63e06b0c1be089411131fdd864 URL: http://source.winehq.org/git/wine.git/?a=commit;h=dad99e2aa943bf63e06b0c1be0...
Author: Ilya Shpigor shpigor@etersoft.ru Date: Mon Sep 7 10:57:55 2009 +0400
gdi32/tests: Add test for SelectClipRgn in metafile.
---
dlls/gdi32/tests/metafile.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/dlls/gdi32/tests/metafile.c b/dlls/gdi32/tests/metafile.c index 15a2c63..a186608 100644 --- a/dlls/gdi32/tests/metafile.c +++ b/dlls/gdi32/tests/metafile.c @@ -1908,6 +1908,7 @@ static void test_emf_clipping(void) HENHMETAFILE hemf; HRGN hrgn; INT ret; + RECT rc_res, rc_sclip;
SetLastError(0xdeadbeef); hdc = CreateEnhMetaFileA(0, NULL, NULL, NULL); @@ -1946,6 +1947,22 @@ static void test_emf_clipping(void) DeleteEnhMetaFile(hemf); ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); + + hdc = CreateEnhMetaFileA(0, NULL, NULL, NULL); + + SetRect(&rc_sclip, 100, 100, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)); + hrgn = CreateRectRgn(rc_sclip.left, rc_sclip.top, rc_sclip.right, rc_sclip.bottom); + SelectClipRgn(hdc, hrgn); + GetClipBox(hdc, &rc_res); + todo_wine ok(EqualRect(&rc_res, &rc_sclip), + "expected rc_res (%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); + + hemf = CloseEnhMetaFile(hdc); + DeleteEnhMetaFile(hemf); + DeleteObject(hrgn); + DeleteDC(hdc); }
static INT CALLBACK EmfEnumProc(HDC hdc, HANDLETABLE *lpHTable, const ENHMETARECORD *lpEMFR, INT nObj, LPARAM lpData)