31void Test_ExtCreateRegion_Parameters()
38#define CheckRect(prect, _left, _top, _right, _bottom) \
40 ok(((prect)->left == _left) && ((prect)->top == _top) && \
41 ((prect)->right == _right) && ((prect)->bottom == _bottom), \
42 "Region does not match, expected (%d,%d,%d,%d) got (%ld,%ld,%ld,%ld)\n", \
43 _left, _top, _right, _bottom, \
44 (prect)->left, (prect)->top, (prect)->right, (prect)->bottom); \
47#define CheckRectRegion(hrgn, _left, _top, _right, _bottom) \
49 HRGN hrgnTemp = CreateRectRgn(_left, _top, _right, _bottom); \
51 ok(GetRgnBox(hrgn, &rcTemp) == SIMPLEREGION, "Region is not SIMPLEREGION\n"); \
52 CheckRect(&rcTemp, _left, _top, _right, _bottom); \
53 ok(EqualRgn(hrgn, hrgnTemp), "Region does not match\n"); \
54 DeleteObject(hrgnTemp); \
64 PRECT prect = (
PRECT)&RgnDataBuffer.rgndata.Buffer;
73 RgnDataBuffer.rgndata.rdh.nCount = 1;
75 RgnDataBuffer.rgndata.rdh.rcBound.left = 0;
76 RgnDataBuffer.rgndata.rdh.rcBound.top = 0;
77 RgnDataBuffer.rgndata.rdh.rcBound.right = 10;
78 RgnDataBuffer.rgndata.rdh.rcBound.bottom = 10;
87 ok(
hrgn !=
NULL,
"ExtCreateRegion failed with without transform\n");
90 InitXFORM(&xform, 1., 0., 0., 1., 0., 0.);
92 ok(
hrgn !=
NULL,
"ExtCreateRegion failed with identity transform\n");
95 InitXFORM(&xform, 1., 0., 0., 1., 10., 10.);
97 ok(
hrgn !=
NULL,
"ExtCreateRegion failed with offset transform\n");
100 InitXFORM(&xform, 2.5, 0., 0., 1.5, 0., 0.);
102 ok(
hrgn !=
NULL,
"ExtCreateRegion failed with scaling transform\n");
105 InitXFORM(&xform, 2.5, 0., 0., 1.5, 20., 40.);
107 ok(
hrgn !=
NULL,
"ExtCreateRegion failed with scaling+offset transform\n");
110 InitXFORM(&xform, 1., 10., 0., 1., 0., 0.);
112 ok(
hrgn !=
NULL,
"ExtCreateRegion failed with shearing transform\n");
119 ok(
hrgn !=
NULL,
"ExtCreateRegion failed with rotating transform\n");
VOID InitXFORM(PXFORM pxform, FLOAT eM11, FLOAT eM12, FLOAT eM21, FLOAT eM22, FLOAT eDx, FLOAT eDy)
#define CheckRect(prect, _left, _top, _right, _bottom)
#define CheckRectRegion(hrgn, _left, _top, _right, _bottom)
void Test_ExtCreateRegion_Transform()
struct _RGNDATAHEADER RGNDATAHEADER
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
_Check_return_ float __cdecl cosf(_In_ float x)
_Check_return_ float __cdecl sinf(_In_ float x)
HRGN WINAPI ExtCreateRegion(_In_opt_ const XFORM *lpx, _In_ DWORD nCount, _In_reads_bytes_(nCount) const RGNDATA *lpData)
int WINAPI GetRgnBox(_In_ HRGN, _Out_ LPRECT)
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)