145bbb11aSKatayama Hirofumi MZ /*
245bbb11aSKatayama Hirofumi MZ * PROJECT: ReactOS api tests
345bbb11aSKatayama Hirofumi MZ * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later)
445bbb11aSKatayama Hirofumi MZ * PURPOSE: Test for NtGdiTransformPoints
545bbb11aSKatayama Hirofumi MZ * COPYRIGHT: Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
645bbb11aSKatayama Hirofumi MZ */
745bbb11aSKatayama Hirofumi MZ
8*a5c3bb5bSSerge Gautherie #include "../win32nt.h"
945bbb11aSKatayama Hirofumi MZ
START_TEST(NtGdiTransformPoints)1045bbb11aSKatayama Hirofumi MZ START_TEST(NtGdiTransformPoints)
1145bbb11aSKatayama Hirofumi MZ {
1245bbb11aSKatayama Hirofumi MZ HDC hDC;
1345bbb11aSKatayama Hirofumi MZ POINT apt1[3], apt2[3];
1445bbb11aSKatayama Hirofumi MZ BOOL ret;
1545bbb11aSKatayama Hirofumi MZ SIZE siz;
1645bbb11aSKatayama Hirofumi MZ
1745bbb11aSKatayama Hirofumi MZ /* NULL HDC */
1845bbb11aSKatayama Hirofumi MZ
1945bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
2045bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(NULL, NULL, NULL, 0, GdiDpToLp);
2145bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
2245bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
2345bbb11aSKatayama Hirofumi MZ
2445bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
2545bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(NULL, NULL, NULL, 1, GdiDpToLp);
2645bbb11aSKatayama Hirofumi MZ ok_int(ret, FALSE);
2745bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
2845bbb11aSKatayama Hirofumi MZ
2945bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
3045bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(NULL, apt1, NULL, 1, GdiDpToLp);
3145bbb11aSKatayama Hirofumi MZ ok_int(ret, FALSE);
3245bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
3345bbb11aSKatayama Hirofumi MZ
3445bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
3545bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(NULL, NULL, apt2, 1, GdiDpToLp);
3645bbb11aSKatayama Hirofumi MZ ok_int(ret, FALSE);
3745bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
3845bbb11aSKatayama Hirofumi MZ
3945bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
4045bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(NULL, apt1, apt1, 0, GdiDpToLp);
4145bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
4245bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
4345bbb11aSKatayama Hirofumi MZ
4445bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
4545bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(NULL, apt1, apt2, 0, GdiDpToLp);
4645bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
4745bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
4845bbb11aSKatayama Hirofumi MZ
4945bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
5045bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(NULL, apt1, apt2, 1, GdiDpToLp);
5145bbb11aSKatayama Hirofumi MZ ok_int(ret, FALSE);
5245bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
5345bbb11aSKatayama Hirofumi MZ
5445bbb11aSKatayama Hirofumi MZ /* (HDC)1 */
5545bbb11aSKatayama Hirofumi MZ
5645bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
5745bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints((HDC)1, NULL, NULL, 0, GdiDpToLp);
5845bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
5945bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
6045bbb11aSKatayama Hirofumi MZ
6145bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
6245bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints((HDC)1, NULL, NULL, 1, GdiDpToLp);
6345bbb11aSKatayama Hirofumi MZ ok_int(ret, FALSE);
6445bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
6545bbb11aSKatayama Hirofumi MZ
6645bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
6745bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints((HDC)1, apt1, NULL, 1, GdiDpToLp);
6845bbb11aSKatayama Hirofumi MZ ok_int(ret, FALSE);
6945bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
7045bbb11aSKatayama Hirofumi MZ
7145bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
7245bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints((HDC)1, NULL, apt2, 1, GdiDpToLp);
7345bbb11aSKatayama Hirofumi MZ ok_int(ret, FALSE);
7445bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
7545bbb11aSKatayama Hirofumi MZ
7645bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
7745bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints((HDC)1, apt1, apt1, 0, GdiDpToLp);
7845bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
7945bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
8045bbb11aSKatayama Hirofumi MZ
8145bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
8245bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints((HDC)1, apt1, apt2, 0, GdiDpToLp);
8345bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
8445bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
8545bbb11aSKatayama Hirofumi MZ
8645bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
8745bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints((HDC)1, apt1, apt2, 1, GdiDpToLp);
8845bbb11aSKatayama Hirofumi MZ ok_int(ret, FALSE);
8945bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
9045bbb11aSKatayama Hirofumi MZ
9145bbb11aSKatayama Hirofumi MZ /* hDC */
9245bbb11aSKatayama Hirofumi MZ
9345bbb11aSKatayama Hirofumi MZ hDC = CreateCompatibleDC(NULL);
9445bbb11aSKatayama Hirofumi MZ ok(hDC != NULL, "hDC was NULL\n");
9545bbb11aSKatayama Hirofumi MZ
9645bbb11aSKatayama Hirofumi MZ SetMapMode(hDC, MM_TEXT);
9745bbb11aSKatayama Hirofumi MZ
9845bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
9945bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, NULL, NULL, 0, GdiDpToLp);
10045bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
10145bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
10245bbb11aSKatayama Hirofumi MZ
10345bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
10445bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, NULL, NULL, 1, GdiDpToLp);
10545bbb11aSKatayama Hirofumi MZ ok_int(ret, FALSE);
10645bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
10745bbb11aSKatayama Hirofumi MZ
10845bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
10945bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, apt1, NULL, 1, GdiDpToLp);
11045bbb11aSKatayama Hirofumi MZ ok_int(ret, FALSE);
11145bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
11245bbb11aSKatayama Hirofumi MZ
11345bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
11445bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, NULL, apt2, 1, GdiDpToLp);
11545bbb11aSKatayama Hirofumi MZ ok_int(ret, FALSE);
11645bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
11745bbb11aSKatayama Hirofumi MZ
11845bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
11945bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, apt1, apt1, 0, GdiDpToLp);
12045bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
12145bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
12245bbb11aSKatayama Hirofumi MZ
12345bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
12445bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, apt1, apt2, 0, GdiDpToLp);
12545bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
12645bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
12745bbb11aSKatayama Hirofumi MZ
12845bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
12945bbb11aSKatayama Hirofumi MZ apt1[0].x = apt1[0].y = 256;
13045bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, apt1, apt1, 1, GdiDpToLp);
13145bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
13245bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
13345bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].x, 256);
13445bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].y, 256);
13545bbb11aSKatayama Hirofumi MZ
13645bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
13745bbb11aSKatayama Hirofumi MZ apt1[0].x = apt1[0].y = 256;
13845bbb11aSKatayama Hirofumi MZ apt2[0].x = apt2[0].y = 0xBEEFDEAD;
13945bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, apt1, apt2, 0, GdiDpToLp);
14045bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
14145bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
14245bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].x, 256);
14345bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].y, 256);
14445bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 0xBEEFDEAD);
14545bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 0xBEEFDEAD);
14645bbb11aSKatayama Hirofumi MZ
14745bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
14845bbb11aSKatayama Hirofumi MZ apt1[0].x = apt1[0].y = 256;
14945bbb11aSKatayama Hirofumi MZ apt2[0].x = apt2[0].y = 0xBEEFDEAD;
15045bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, apt1, apt2, 1, GdiDpToLp);
15145bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
15245bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
15345bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].x, 256);
15445bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].y, 256);
15545bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 256);
15645bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 256);
15745bbb11aSKatayama Hirofumi MZ
15845bbb11aSKatayama Hirofumi MZ /* MM_ISOTROPIC */
15945bbb11aSKatayama Hirofumi MZ
16045bbb11aSKatayama Hirofumi MZ SetMapMode(hDC, MM_ISOTROPIC);
16145bbb11aSKatayama Hirofumi MZ ok_int(SetWindowExtEx(hDC, 10, 10, NULL), TRUE);
16245bbb11aSKatayama Hirofumi MZ ok_int(GetWindowExtEx(hDC, &siz), TRUE);
16345bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 10);
16445bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 10);
16545bbb11aSKatayama Hirofumi MZ ok_int(SetViewportExtEx(hDC, 100, 100, NULL), TRUE);
16645bbb11aSKatayama Hirofumi MZ ok_int(GetViewportExtEx(hDC, &siz), TRUE);
16745bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 100);
16845bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 100);
16945bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
17045bbb11aSKatayama Hirofumi MZ apt1[0].x = apt1[0].y = 256;
17145bbb11aSKatayama Hirofumi MZ apt2[0].x = apt2[0].y = 0xBEEFDEAD;
17245bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, apt1, apt2, 1, GdiDpToLp);
17345bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
17445bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
17545bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].x, 256);
17645bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].y, 256);
17745bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 26);
17845bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 26);
17945bbb11aSKatayama Hirofumi MZ
18045bbb11aSKatayama Hirofumi MZ SetMapMode(hDC, MM_ISOTROPIC);
18145bbb11aSKatayama Hirofumi MZ ok_int(SetWindowExtEx(hDC, 10, 10, NULL), TRUE);
18245bbb11aSKatayama Hirofumi MZ ok_int(GetWindowExtEx(hDC, &siz), TRUE);
18345bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 10);
18445bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 10);
18545bbb11aSKatayama Hirofumi MZ ok_int(SetViewportExtEx(hDC, 20, 100, NULL), TRUE);
18645bbb11aSKatayama Hirofumi MZ ok_int(GetViewportExtEx(hDC, &siz), TRUE);
18745bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 20);
18845bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 20);
18945bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
19045bbb11aSKatayama Hirofumi MZ apt1[0].x = apt1[0].y = 256;
19145bbb11aSKatayama Hirofumi MZ apt2[0].x = apt2[0].y = 0xBEEFDEAD;
19245bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, apt1, apt2, 1, GdiDpToLp);
19345bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
19445bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
19545bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].x, 256);
19645bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].y, 256);
19745bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 128);
19845bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 128);
19945bbb11aSKatayama Hirofumi MZ
20045bbb11aSKatayama Hirofumi MZ SetMapMode(hDC, MM_ISOTROPIC);
20145bbb11aSKatayama Hirofumi MZ ok_int(SetWindowExtEx(hDC, 10, 10, NULL), TRUE);
20245bbb11aSKatayama Hirofumi MZ ok_int(GetWindowExtEx(hDC, &siz), TRUE);
20345bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 10);
20445bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 10);
20545bbb11aSKatayama Hirofumi MZ ok_int(SetViewportExtEx(hDC, 100, 0, NULL), TRUE);
20645bbb11aSKatayama Hirofumi MZ ok_int(GetViewportExtEx(hDC, &siz), TRUE);
20745bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 20);
20845bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 20);
20945bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
21045bbb11aSKatayama Hirofumi MZ apt1[0].x = apt1[0].y = 256;
21145bbb11aSKatayama Hirofumi MZ apt2[0].x = apt2[0].y = 0xBEEFDEAD;
21245bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, apt1, apt2, 1, GdiDpToLp);
21345bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
21445bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
21545bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].x, 256);
21645bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].y, 256);
21745bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 128);
21845bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 128);
21945bbb11aSKatayama Hirofumi MZ
22045bbb11aSKatayama Hirofumi MZ SetMapMode(hDC, MM_ISOTROPIC);
22145bbb11aSKatayama Hirofumi MZ ok_int(SetWindowExtEx(hDC, 10, 10, NULL), TRUE);
22245bbb11aSKatayama Hirofumi MZ ok_int(GetWindowExtEx(hDC, &siz), TRUE);
22345bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 10);
22445bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 10);
22545bbb11aSKatayama Hirofumi MZ ok_int(SetViewportExtEx(hDC, 0, 100, NULL), TRUE);
22645bbb11aSKatayama Hirofumi MZ ok_int(GetViewportExtEx(hDC, &siz), TRUE);
22745bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 20);
22845bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 20);
22945bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
23045bbb11aSKatayama Hirofumi MZ apt1[0].x = apt1[0].y = 256;
23145bbb11aSKatayama Hirofumi MZ apt2[0].x = apt2[0].y = 0xBEEFDEAD;
23245bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, apt1, apt2, 1, GdiDpToLp);
23345bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
23445bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
23545bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].x, 256);
23645bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].y, 256);
23745bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 128);
23845bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 128);
23945bbb11aSKatayama Hirofumi MZ
24045bbb11aSKatayama Hirofumi MZ SetMapMode(hDC, MM_ISOTROPIC);
24145bbb11aSKatayama Hirofumi MZ ok_int(SetWindowExtEx(hDC, 10, 10, NULL), TRUE);
24245bbb11aSKatayama Hirofumi MZ ok_int(GetWindowExtEx(hDC, &siz), TRUE);
24345bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 10);
24445bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 10);
24545bbb11aSKatayama Hirofumi MZ ok_int(SetViewportExtEx(hDC, 0, 0, NULL), TRUE);
24645bbb11aSKatayama Hirofumi MZ ok_int(GetViewportExtEx(hDC, &siz), TRUE);
24745bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 20);
24845bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 20);
24945bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
25045bbb11aSKatayama Hirofumi MZ apt1[0].x = apt1[0].y = 256;
25145bbb11aSKatayama Hirofumi MZ apt2[0].x = apt2[0].y = 0xBEEFDEAD;
25245bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, apt1, apt2, 1, GdiDpToLp);
25345bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
25445bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
25545bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].x, 256);
25645bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].y, 256);
25745bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 128);
25845bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 128);
25945bbb11aSKatayama Hirofumi MZ
26045bbb11aSKatayama Hirofumi MZ /* MM_ANISOTROPIC */
26145bbb11aSKatayama Hirofumi MZ
26245bbb11aSKatayama Hirofumi MZ SetMapMode(hDC, MM_ANISOTROPIC);
26345bbb11aSKatayama Hirofumi MZ ok_int(SetWindowExtEx(hDC, 10, 10, NULL), TRUE);
26445bbb11aSKatayama Hirofumi MZ ok_int(GetWindowExtEx(hDC, &siz), TRUE);
26545bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 10);
26645bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 10);
26745bbb11aSKatayama Hirofumi MZ ok_int(SetViewportExtEx(hDC, 100, 100, NULL), TRUE);
26845bbb11aSKatayama Hirofumi MZ ok_int(GetViewportExtEx(hDC, &siz), TRUE);
26945bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 100);
27045bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 100);
27145bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
27245bbb11aSKatayama Hirofumi MZ apt1[0].x = apt1[0].y = 256;
27345bbb11aSKatayama Hirofumi MZ apt2[0].x = apt2[0].y = 0xBEEFDEAD;
27445bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, apt1, apt2, 1, GdiDpToLp);
27545bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
27645bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
27745bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].x, 256);
27845bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].y, 256);
27945bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 26);
28045bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 26);
28145bbb11aSKatayama Hirofumi MZ
28245bbb11aSKatayama Hirofumi MZ SetMapMode(hDC, MM_ANISOTROPIC);
28345bbb11aSKatayama Hirofumi MZ ok_int(SetWindowExtEx(hDC, 10, 10, NULL), TRUE);
28445bbb11aSKatayama Hirofumi MZ ok_int(GetWindowExtEx(hDC, &siz), TRUE);
28545bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 10);
28645bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 10);
28745bbb11aSKatayama Hirofumi MZ ok_int(SetViewportExtEx(hDC, 20, 100, NULL), TRUE);
28845bbb11aSKatayama Hirofumi MZ ok_int(GetViewportExtEx(hDC, &siz), TRUE);
28945bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 20);
29045bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 100);
29145bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
29245bbb11aSKatayama Hirofumi MZ apt1[0].x = apt1[0].y = 256;
29345bbb11aSKatayama Hirofumi MZ apt2[0].x = apt2[0].y = 0xBEEFDEAD;
29445bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, apt1, apt2, 1, GdiDpToLp);
29545bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
29645bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
29745bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].x, 256);
29845bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].y, 256);
29945bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 128);
30045bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 128);
30145bbb11aSKatayama Hirofumi MZ
30245bbb11aSKatayama Hirofumi MZ SetMapMode(hDC, MM_ANISOTROPIC);
30345bbb11aSKatayama Hirofumi MZ ok_int(SetWindowExtEx(hDC, 10, 10, NULL), TRUE);
30445bbb11aSKatayama Hirofumi MZ ok_int(GetWindowExtEx(hDC, &siz), TRUE);
30545bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 10);
30645bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 10);
30745bbb11aSKatayama Hirofumi MZ ok_int(SetViewportExtEx(hDC, 100, 0, NULL), TRUE);
30845bbb11aSKatayama Hirofumi MZ ok_int(GetViewportExtEx(hDC, &siz), TRUE);
30945bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 20);
31045bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 100);
31145bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
31245bbb11aSKatayama Hirofumi MZ apt1[0].x = apt1[0].y = 256;
31345bbb11aSKatayama Hirofumi MZ apt2[0].x = apt2[0].y = 0xBEEFDEAD;
31445bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, apt1, apt2, 1, GdiDpToLp);
31545bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
31645bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
31745bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].x, 256);
31845bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].y, 256);
31945bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 128);
32045bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 128);
32145bbb11aSKatayama Hirofumi MZ
32245bbb11aSKatayama Hirofumi MZ SetMapMode(hDC, MM_ANISOTROPIC);
32345bbb11aSKatayama Hirofumi MZ ok_int(SetWindowExtEx(hDC, 10, 10, NULL), TRUE);
32445bbb11aSKatayama Hirofumi MZ ok_int(GetWindowExtEx(hDC, &siz), TRUE);
32545bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 10);
32645bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 10);
32745bbb11aSKatayama Hirofumi MZ ok_int(SetViewportExtEx(hDC, 0, 100, NULL), TRUE);
32845bbb11aSKatayama Hirofumi MZ ok_int(GetViewportExtEx(hDC, &siz), TRUE);
32945bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 20);
33045bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 100);
33145bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
33245bbb11aSKatayama Hirofumi MZ apt1[0].x = apt1[0].y = 256;
33345bbb11aSKatayama Hirofumi MZ apt2[0].x = apt2[0].y = 0xBEEFDEAD;
33445bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, apt1, apt2, 1, GdiDpToLp);
33545bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
33645bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
33745bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].x, 256);
33845bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].y, 256);
33945bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 128);
34045bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 128);
34145bbb11aSKatayama Hirofumi MZ
34245bbb11aSKatayama Hirofumi MZ SetMapMode(hDC, MM_ANISOTROPIC);
34345bbb11aSKatayama Hirofumi MZ ok_int(SetWindowExtEx(hDC, 10, 10, NULL), TRUE);
34445bbb11aSKatayama Hirofumi MZ ok_int(GetWindowExtEx(hDC, &siz), TRUE);
34545bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 10);
34645bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 10);
34745bbb11aSKatayama Hirofumi MZ ok_int(SetViewportExtEx(hDC, 0, 0, NULL), TRUE);
34845bbb11aSKatayama Hirofumi MZ ok_int(GetViewportExtEx(hDC, &siz), TRUE);
34945bbb11aSKatayama Hirofumi MZ ok_long(siz.cx, 20);
35045bbb11aSKatayama Hirofumi MZ ok_long(siz.cy, 100);
35145bbb11aSKatayama Hirofumi MZ SetLastError(0xDEADBEEF);
35245bbb11aSKatayama Hirofumi MZ apt1[0].x = apt1[0].y = 256;
35345bbb11aSKatayama Hirofumi MZ apt2[0].x = apt2[0].y = 0xBEEFDEAD;
35445bbb11aSKatayama Hirofumi MZ ret = NtGdiTransformPoints(hDC, apt1, apt2, 1, GdiDpToLp);
35545bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
35645bbb11aSKatayama Hirofumi MZ ok_err(0xDEADBEEF);
35745bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].x, 256);
35845bbb11aSKatayama Hirofumi MZ ok_long(apt1[0].y, 256);
35945bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 128);
36045bbb11aSKatayama Hirofumi MZ ok_long(apt2[0].x, 128);
36145bbb11aSKatayama Hirofumi MZ
36245bbb11aSKatayama Hirofumi MZ ret = DeleteDC(hDC);
36345bbb11aSKatayama Hirofumi MZ ok_int(ret, TRUE);
36445bbb11aSKatayama Hirofumi MZ }
365