mirror of
https://github.com/reactos/reactos.git
synced 2024-11-09 16:20:37 +00:00
4b95e17c61
Introduce a "apitest.h" header gathering special things for apitests (SEH macros, wine/test.h inclusion, and so on...). svn path=/trunk/; revision=60313
52 lines
1 KiB
C
52 lines
1 KiB
C
/*
|
|
* PROJECT: ReactOS api tests
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
|
* PURPOSE: Test for SetWorldTransform
|
|
* PROGRAMMERS: Timo Kreuzer
|
|
*/
|
|
|
|
#include <apitest.h>
|
|
|
|
#include <wingdi.h>
|
|
#include <winuser.h>
|
|
|
|
void Test_SetWorldTransform()
|
|
{
|
|
HDC hdcScreen, hdc;
|
|
XFORM xform;
|
|
BOOL result;
|
|
//PGDI_TABLE_ENTRY pEntry;
|
|
//DC_ATTR* pdcattr;
|
|
|
|
/* Create a DC */
|
|
hdcScreen = GetDC(NULL);
|
|
hdc = CreateCompatibleDC(hdcScreen);
|
|
ReleaseDC(NULL, hdcScreen);
|
|
SetGraphicsMode(hdc, GM_ADVANCED);
|
|
|
|
/* Set identity transform */
|
|
xform.eM11 = 1;
|
|
xform.eM12 = 0;
|
|
xform.eM21 = 0;
|
|
xform.eM22 = 1;
|
|
xform.eDx = 0;
|
|
xform.eDy = 0;
|
|
result = SetWorldTransform(hdc, &xform);
|
|
ok(result == 1, "\n");
|
|
|
|
/* Something invalid */
|
|
xform.eM22 = 0;
|
|
result = SetWorldTransform(hdc, &xform);
|
|
ok(result == 0, "\n");
|
|
|
|
//pEntry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hdc);
|
|
//pdcattr = pEntry->UserData;
|
|
|
|
DeleteDC(hdc);
|
|
}
|
|
|
|
START_TEST(SetWorldTransform)
|
|
{
|
|
Test_SetWorldTransform();
|
|
}
|
|
|