21#define SetRectRgnIndirect(hrgn, prect) \
22 SetRectRgn(hrgn, (prect)->left, (prect)->top, (prect)->right, (prect)->bottom)
24PSTR apszRgnOp[6] = {
"invalid",
"RGN_AND",
"RGN_OR",
"RGN_XOR",
"RGN_DIFF",
"RGN_COPY" };
31 {{0,0,0,0},{0,0,0,0}, {{
NULLREGION, {0,0,0,0}}, {
NULLREGION, {0,0,0,0}}, {
NULLREGION, {0,0,0,0}}, {
NULLREGION, {0,0,0,0}}}},
32 {{0,0,1,1},{0,0,0,0}, {{
NULLREGION, {0,0,0,0}}, {
SIMPLEREGION, {0,0,1,1}}, {
SIMPLEREGION, {0,0,1,1}}, {
SIMPLEREGION, {0,0,1,1}}}},
33 {{0,0,0,0},{0,0,1,1}, {{
NULLREGION, {0,0,0,0}}, {
SIMPLEREGION, {0,0,1,1}}, {
SIMPLEREGION, {0,0,1,1}}, {
NULLREGION, {0,0,0,0}}}},
36 {{0,0,4,4},{0,0,4,4}, {{
SIMPLEREGION, {0,0,4,4}}, {
SIMPLEREGION, {0,0,4,4}}, {
NULLREGION, {0,0,0,0}}, {
NULLREGION, {0,0,0,0}}}},
39 {{0,0,4,4},{0,0,2,4}, {{
SIMPLEREGION, {0,0,2,4}}, {
SIMPLEREGION, {0,0,4,4}}, {
SIMPLEREGION ,{2,0,4,4}}, {
SIMPLEREGION, {2,0,4,4}}}},
40 {{0,0,4,4},{0,0,4,2}, {{
SIMPLEREGION, {0,0,4,2}}, {
SIMPLEREGION, {0,0,4,4}}, {
SIMPLEREGION ,{0,2,4,4}}, {
SIMPLEREGION, {0,2,4,4}}}},
41 {{0,0,4,4},{2,0,4,4}, {{
SIMPLEREGION, {2,0,4,4}}, {
SIMPLEREGION, {0,0,4,4}}, {
SIMPLEREGION ,{0,0,2,4}}, {
SIMPLEREGION, {0,0,2,4}}}},
42 {{0,0,4,4},{0,2,4,4}, {{
SIMPLEREGION, {0,2,4,4}}, {
SIMPLEREGION, {0,0,4,4}}, {
SIMPLEREGION ,{0,0,4,2}}, {
SIMPLEREGION, {0,0,4,2}}}},
43 {{0,0,4,4},{0,0,2,2}, {{
SIMPLEREGION, {0,0,2,2}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}}},
44 {{0,0,4,4},{2,0,4,2}, {{
SIMPLEREGION, {2,0,4,2}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}}},
45 {{0,0,4,4},{0,2,2,4}, {{
SIMPLEREGION, {0,2,2,4}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}}},
46 {{0,0,4,4},{2,2,4,4}, {{
SIMPLEREGION, {2,2,4,4}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}}},
47 {{0,0,4,4},{0,1,2,3}, {{
SIMPLEREGION, {0,1,2,3}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}}},
48 {{0,0,4,4},{1,0,3,2}, {{
SIMPLEREGION, {1,0,3,2}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}}},
49 {{0,0,4,4},{2,1,4,3}, {{
SIMPLEREGION, {2,1,4,3}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}}},
50 {{0,0,4,4},{1,2,3,4}, {{
SIMPLEREGION, {1,2,3,4}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}}},
51 {{0,0,4,4},{1,1,3,4}, {{
SIMPLEREGION, {1,1,3,4}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}}},
54 {{0,0,2,4},{0,0,4,4}, {{
SIMPLEREGION, {0,0,2,4}}, {
SIMPLEREGION, {0,0,4,4}}, {
SIMPLEREGION ,{2,0,4,4}}, {
NULLREGION, {0,0,0,0}}}},
55 {{0,0,4,2},{0,0,4,4}, {{
SIMPLEREGION, {0,0,4,2}}, {
SIMPLEREGION, {0,0,4,4}}, {
SIMPLEREGION ,{0,2,4,4}}, {
NULLREGION, {0,0,0,0}}}},
56 {{2,0,4,4},{0,0,4,4}, {{
SIMPLEREGION, {2,0,4,4}}, {
SIMPLEREGION, {0,0,4,4}}, {
SIMPLEREGION ,{0,0,2,4}}, {
NULLREGION, {0,0,0,0}}}},
57 {{0,2,4,4},{0,0,4,4}, {{
SIMPLEREGION, {0,2,4,4}}, {
SIMPLEREGION, {0,0,4,4}}, {
SIMPLEREGION ,{0,0,4,2}}, {
NULLREGION, {0,0,0,0}}}},
58 {{0,0,2,2},{0,0,4,4}, {{
SIMPLEREGION, {0,0,2,2}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
NULLREGION, {0,0,0,0}}}},
59 {{2,0,4,2},{0,0,4,4}, {{
SIMPLEREGION, {2,0,4,2}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
NULLREGION, {0,0,0,0}}}},
60 {{0,2,2,4},{0,0,4,4}, {{
SIMPLEREGION, {0,2,2,4}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
NULLREGION, {0,0,0,0}}}},
61 {{2,2,4,4},{0,0,4,4}, {{
SIMPLEREGION, {2,2,4,4}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
NULLREGION, {0,0,0,0}}}},
62 {{0,1,2,3},{0,0,4,4}, {{
SIMPLEREGION, {0,1,2,3}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
NULLREGION, {0,0,0,0}}}},
63 {{1,0,3,2},{0,0,4,4}, {{
SIMPLEREGION, {1,0,3,2}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
NULLREGION, {0,0,0,0}}}},
64 {{2,1,4,3},{0,0,4,4}, {{
SIMPLEREGION, {2,1,4,3}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
NULLREGION, {0,0,0,0}}}},
65 {{1,2,3,4},{0,0,4,4}, {{
SIMPLEREGION, {1,2,3,4}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
NULLREGION, {0,0,0,0}}}},
66 {{1,1,3,4},{0,0,4,4}, {{
SIMPLEREGION, {1,1,3,4}}, {
SIMPLEREGION, {0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
NULLREGION, {0,0,0,0}}}},
69 {{2,2,4,4},{0,2,2,4}, {{
NULLREGION, {0,0,0,0}}, {
SIMPLEREGION, {0,2,4,4}}, {
SIMPLEREGION, {0,2,4,4}}, {
SIMPLEREGION, {2,2,4,4}}}},
70 {{2,2,4,4},{0,1,2,5}, {{
NULLREGION, {0,0,0,0}}, {
COMPLEXREGION,{0,1,4,5}}, {
COMPLEXREGION,{0,1,4,5}}, {
SIMPLEREGION, {2,2,4,4}}}},
71 {{2,2,4,4},{0,3,2,4}, {{
NULLREGION, {0,0,0,0}}, {
COMPLEXREGION,{0,2,4,4}}, {
COMPLEXREGION,{0,2,4,4}}, {
SIMPLEREGION, {2,2,4,4}}}},
72 {{2,2,4,4},{2,0,4,2}, {{
NULLREGION, {0,0,0,0}}, {
SIMPLEREGION, {2,0,4,4}}, {
SIMPLEREGION, {2,0,4,4}}, {
SIMPLEREGION, {2,2,4,4}}}},
73 {{2,2,4,4},{1,0,5,2}, {{
NULLREGION, {0,0,0,0}}, {
COMPLEXREGION,{1,0,5,4}}, {
COMPLEXREGION,{1,0,5,4}}, {
SIMPLEREGION, {2,2,4,4}}}},
74 {{2,2,4,4},{3,0,4,2}, {{
NULLREGION, {0,0,0,0}}, {
COMPLEXREGION,{2,0,4,4}}, {
COMPLEXREGION,{2,0,4,4}}, {
SIMPLEREGION, {2,2,4,4}}}},
75 {{2,2,4,4},{4,2,6,4}, {{
NULLREGION, {0,0,0,0}}, {
SIMPLEREGION, {2,2,6,4}}, {
SIMPLEREGION, {2,2,6,4}}, {
SIMPLEREGION, {2,2,4,4}}}},
76 {{2,2,4,4},{4,1,6,5}, {{
NULLREGION, {0,0,0,0}}, {
COMPLEXREGION,{2,1,6,5}}, {
COMPLEXREGION,{2,1,6,5}}, {
SIMPLEREGION, {2,2,4,4}}}},
77 {{2,2,4,4},{4,3,6,4}, {{
NULLREGION, {0,0,0,0}}, {
COMPLEXREGION,{2,2,6,4}}, {
COMPLEXREGION,{2,2,6,4}}, {
SIMPLEREGION, {2,2,4,4}}}},
78 {{2,2,4,4},{2,4,4,6}, {{
NULLREGION, {0,0,0,0}}, {
SIMPLEREGION, {2,2,4,6}}, {
SIMPLEREGION, {2,2,4,6}}, {
SIMPLEREGION, {2,2,4,4}}}},
79 {{2,2,4,4},{1,4,5,6}, {{
NULLREGION, {0,0,0,0}}, {
COMPLEXREGION,{1,2,5,6}}, {
COMPLEXREGION,{1,2,5,6}}, {
SIMPLEREGION, {2,2,4,4}}}},
80 {{2,2,4,4},{3,4,4,6}, {{
NULLREGION, {0,0,0,0}}, {
COMPLEXREGION,{2,2,4,6}}, {
COMPLEXREGION,{2,2,4,6}}, {
SIMPLEREGION, {2,2,4,4}}}},
83 {{2,2,4,4},{0,2,3,4}, {{
SIMPLEREGION, {2,2,3,4}}, {
SIMPLEREGION, {0,2,4,4}}, {
COMPLEXREGION,{0,2,4,4}}, {
SIMPLEREGION, {3,2,4,4}}}},
84 {{2,2,4,4},{0,1,3,5}, {{
SIMPLEREGION, {2,2,3,4}}, {
COMPLEXREGION,{0,1,4,5}}, {
COMPLEXREGION,{0,1,4,5}}, {
SIMPLEREGION, {3,2,4,4}}}},
85 {{2,2,4,4},{0,3,3,4}, {{
SIMPLEREGION, {2,3,3,4}}, {
COMPLEXREGION,{0,2,4,4}}, {
COMPLEXREGION,{0,2,4,4}}, {
COMPLEXREGION,{2,2,4,4}}}},
86 {{2,2,4,4},{2,0,4,3}, {{
SIMPLEREGION, {2,2,4,3}}, {
SIMPLEREGION, {2,0,4,4}}, {
COMPLEXREGION,{2,0,4,4}}, {
SIMPLEREGION, {2,3,4,4}}}},
87 {{2,2,4,4},{1,0,5,3}, {{
SIMPLEREGION, {2,2,4,3}}, {
COMPLEXREGION,{1,0,5,4}}, {
COMPLEXREGION,{1,0,5,4}}, {
SIMPLEREGION, {2,3,4,4}}}},
88 {{2,2,4,4},{3,0,4,3}, {{
SIMPLEREGION, {3,2,4,3}}, {
COMPLEXREGION,{2,0,4,4}}, {
COMPLEXREGION,{2,0,4,4}}, {
COMPLEXREGION,{2,2,4,4}}}},
89 {{2,2,4,4},{3,2,6,4}, {{
SIMPLEREGION, {3,2,4,4}}, {
SIMPLEREGION, {2,2,6,4}}, {
COMPLEXREGION,{2,2,6,4}}, {
SIMPLEREGION, {2,2,3,4}}}},
90 {{2,2,4,4},{3,1,6,5}, {{
SIMPLEREGION, {3,2,4,4}}, {
COMPLEXREGION,{2,1,6,5}}, {
COMPLEXREGION,{2,1,6,5}}, {
SIMPLEREGION, {2,2,3,4}}}},
91 {{2,2,4,4},{3,3,6,4}, {{
SIMPLEREGION, {3,3,4,4}}, {
COMPLEXREGION,{2,2,6,4}}, {
COMPLEXREGION,{2,2,6,4}}, {
COMPLEXREGION,{2,2,4,4}}}},
92 {{2,2,4,4},{2,3,4,6}, {{
SIMPLEREGION, {2,3,4,4}}, {
SIMPLEREGION, {2,2,4,6}}, {
COMPLEXREGION,{2,2,4,6}}, {
SIMPLEREGION, {2,2,4,3}}}},
93 {{2,2,4,4},{1,3,5,6}, {{
SIMPLEREGION, {2,3,4,4}}, {
COMPLEXREGION,{1,2,5,6}}, {
COMPLEXREGION,{1,2,5,6}}, {
SIMPLEREGION, {2,2,4,3}}}},
94 {{2,2,4,4},{3,3,4,6}, {{
SIMPLEREGION, {3,3,4,4}}, {
COMPLEXREGION,{2,2,4,6}}, {
COMPLEXREGION,{2,2,4,6}}, {
COMPLEXREGION,{2,2,4,4}}}},
95 {{2,2,4,4},{0,0,3,3}, {{
SIMPLEREGION, {2,2,3,3}}, {
COMPLEXREGION,{0,0,4,4}}, {
COMPLEXREGION,{0,0,4,4}}, {
COMPLEXREGION,{2,2,4,4}}}},
96 {{2,2,4,4},{3,0,6,3}, {{
SIMPLEREGION, {3,2,4,3}}, {
COMPLEXREGION,{2,0,6,4}}, {
COMPLEXREGION,{2,0,6,4}}, {
COMPLEXREGION,{2,2,4,4}}}},
97 {{2,2,4,4},{0,3,3,6}, {{
SIMPLEREGION, {2,3,3,4}}, {
COMPLEXREGION,{0,2,4,6}}, {
COMPLEXREGION,{0,2,4,6}}, {
COMPLEXREGION,{2,2,4,4}}}},
98 {{2,2,4,4},{3,3,6,6}, {{
SIMPLEREGION, {3,3,4,4}}, {
COMPLEXREGION,{2,2,6,6}}, {
COMPLEXREGION,{2,2,6,6}}, {
COMPLEXREGION,{2,2,4,4}}}},
102 HRGN hrgn1,
hrgn2, hrgn3, hrgnRes;
112 for (
i = 0;
i <
sizeof(aRectTests) /
sizeof(aRectTests[0]);
i++)
122 ok(iComplexity == aRectTests[
i].
res[iCombine-1].iComplexity,
123 "#%u (%s), iComplexity does not match: expected %u, got %u\n",
124 i,
apszRgnOp[iCombine], aRectTests[
i].
res[iCombine-1].iComplexity, iComplexity);
126 ok(
GetRgnBox(hrgnRes, &rc),
"GetRgnBox failed!\n");
128 "#%u (%s), Bounding box does not match: expected {%ld,%ld,%ld,%ld} got {%ld,%ld,%ld,%ld}\n",
130 aRectTests[
i].
res[iCombine-1].rcDstBounds.left, aRectTests[
i].
res[iCombine-1].rcDstBounds.top,
131 aRectTests[
i].
res[iCombine-1].rcDstBounds.right, aRectTests[
i].
res[iCombine-1].rcDstBounds.bottom,
137 ok(
EqualRgn(hrgnRes, hrgn3),
"#%u (%s), regions are not equal\n",
152 HRGN hrgn1,
hrgn2, hrgn3;
168 HRGN hrgn1,
hrgn2, hrgn3;
188 ok(
EqualRgn(hrgn1, hrgn3),
"Region is not correct\n");
191 ok(
EqualRgn(hrgn1, hrgn3),
"Region is not correct\n");
194 ok(
EqualRgn(hrgn1, hrgn3),
"Region is not correct\n");
197 ok(
EqualRgn(hrgn1, hrgn3),
"Region is not correct\n");
205 HRGN hrgn1,
hrgn2, hrgn3;
256 HRGN hrgn1,
hrgn2, hrgn3;
280 HRGN hrgn1,
hrgn2, hrgn3;
309 HRGN hrgn1,
hrgn2, hrgn3, hrgn4;
327 ok(
EqualRgn(hrgn1, hrgn4),
"Region is not correct\n");
330 ok(
EqualRgn(hrgn1, hrgn3),
"Region is not correct\n");
void Test_CombineRgn_AND()
#define SetRectRgnIndirect(hrgn, prect)
void Test_CombineRgn_COPY()
struct _RECT_TEST RECT_TEST
void Test_CombineRgn_OR()
struct _RECT_TEST * PRECT_TEST
void Test_CombineRgn_DIFF()
void Test_CombineRgn_XOR()
void Test_CombineRgn_Params()
#define ok_long(expression, result)
#define ERROR_INVALID_PARAMETER
#define ERROR_INVALID_HANDLE
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
struct _RECT_TEST::@1595 res[4]
DWORD WINAPI GetLastError(void)
HGDIOBJ WINAPI GetStockObject(_In_ int)
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI EqualRgn(_In_ HRGN, _In_ HRGN)
int WINAPI CombineRgn(_In_opt_ HRGN hrgnDest, _In_opt_ HRGN hrgnSrc1, _In_opt_ HRGN hrgnSrc2, _In_ int fnCombineMode)
BOOL WINAPI SetRectRgn(_In_ HRGN, _In_ int, _In_ int, _In_ int, _In_ int)
int WINAPI GetRgnBox(_In_ HRGN, _Out_ LPRECT)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)