[SPIDER]
[reactos.git] / rostests / apitests / gdi32 / SetWorldTransform.c
1 /*
2 * PROJECT: ReactOS api tests
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PURPOSE: Test for SetWorldTransform
5 * PROGRAMMERS: Timo Kreuzer
6 */
7
8 #include <apitest.h>
9
10 #include <wingdi.h>
11 #include <winuser.h>
12
13 void Test_SetWorldTransform()
14 {
15 HDC hdcScreen, hdc;
16 XFORM xform;
17 BOOL result;
18 //PGDI_TABLE_ENTRY pEntry;
19 //DC_ATTR* pdcattr;
20
21 /* Create a DC */
22 hdcScreen = GetDC(NULL);
23 hdc = CreateCompatibleDC(hdcScreen);
24 ReleaseDC(NULL, hdcScreen);
25 SetGraphicsMode(hdc, GM_ADVANCED);
26
27 /* Set identity transform */
28 xform.eM11 = 1;
29 xform.eM12 = 0;
30 xform.eM21 = 0;
31 xform.eM22 = 1;
32 xform.eDx = 0;
33 xform.eDy = 0;
34 result = SetWorldTransform(hdc, &xform);
35 ok(result == 1, "\n");
36
37 /* Something invalid */
38 xform.eM22 = 0;
39 result = SetWorldTransform(hdc, &xform);
40 ok(result == 0, "\n");
41
42 //pEntry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hdc);
43 //pdcattr = pEntry->UserData;
44
45 DeleteDC(hdc);
46 }
47
48 START_TEST(SetWorldTransform)
49 {
50 Test_SetWorldTransform();
51 }
52