15#define ok_size(x, y) \
16 ok(x == y, "Wrong size, expected '%s' to equal '%s'\n", wine_dbgstr_size(&x), wine_dbgstr_size(&y))
18#define ok_point(x, y) \
19 ok(x == y, "Wrong point, expected '%s' to equal '%s'\n", wine_dbgstr_point(&x), wine_dbgstr_point(&y))
20#define nok_point(x, y) \
21 ok(x != y, "Wrong point, expected '%s' NOT to equal '%s'\n", wine_dbgstr_point(&x), wine_dbgstr_point(&y))
23#define ok_rect(x, y) \
24 ok(x == y, "Wrong rect, expected '%s' to equal '%s'\n", wine_dbgstr_rect(&x), wine_dbgstr_rect(&y))
25#define nok_rect(x, y) \
26 ok(x != y, "Wrong rect, expected '%s' to NOT equal '%s'\n", wine_dbgstr_rect(&x), wine_dbgstr_rect(&y))
32 ok(
empty.cx == 0,
"Expected cx to be 0, was %ld\n",
empty.cx);
33 ok(
empty.cy == 0,
"Expected cy to be 0, was %ld\n",
empty.cy);
35 CSize szPointA(10, 25);
48 CSize szPointD(ptObject);
58 ptObject = szPointA +
pt;
62 ptObject = szPointA -
pt;
70 sz1 =
CSize(222, 222);
71 sz2 =
CSize(111, 111);
74 sz1 =
CSize(100, 100);
78 CSize szResult(150, 125);
81 sz1 =
CSize(100, 100);
89 sz1 =
CSize(100, 100);
92 szResult =
CSize(50, 75);
98 sz1 =
CSize(100, 100);
102 sz1 =
CSize(100, 100);
106 szResult =
CSize(150, 125);
117 szResult =
CSize(50, 75);
126 szResult =
CSize(-50, -75);
131 RECT rc = { 1, 2, 3, 4 };
133 CRect rcres = sz1 + &rc;
134 CRect rcexp(101, 102, 103, 104);
138 rcexp =
CRect(-99, -98, -97, -96);
147 ok(
empty.x == 0,
"Expected x to be 0, was %ld\n",
empty.x);
148 ok(
empty.y == 0,
"Expected y to be 0, was %ld\n",
empty.y);
171 CPoint ptResult(135, 135);
200 ptTest =
CPoint(111, 333);
208 CSize szOffset(35, 35);
223 ptResult =
CPoint(65, 65);
237 ptResult =
CPoint(135, 135);
244 ptResult =
CPoint(433, 211);
248 ptResult =
CPoint(65, 65);
259 ptResult =
CPoint(433, 211);
263 ptResult =
CPoint(100, 100);
272 RECT rc = { 1, 2, 3, 4 };
275 CRect rcexp(101, 102, 103, 104);
279 rcexp =
CRect(-99, -98, -97, -96);
287 ok(
empty.left == 0,
"Expected left to be 0, was %ld\n",
empty.left);
288 ok(
empty.top == 0,
"Expected top to be 0, was %ld\n",
empty.top);
289 ok(
empty.Width() == 0,
"Expected Width to be 0, was %i\n",
empty.Width());
290 ok(
empty.Height() == 0,
"Expected Height to be 0, was %i\n",
empty.Height());
293 ok(
rect.Width() == 100,
"Expected Width to be 100, was %i\n",
rect.Width());
294 ok(
rect.Height() == 50,
"Expected Height to be 50, was %i\n",
rect.Height());
303 CRect rect3(&sdkRect);
312 CPoint ptBottomRight(100, 50);
313 CRect rect5(
pt, ptBottomRight);
319 ptDown =
rect.BottomRight();
327 rect2.BottomRight() = ptLow;
336 pt2 =
rect2.BottomRight();
340 pt2 =
rect2.TopLeft();
344 rect2.TopLeft().Offset(3, 3);
345 rect3 =
CRect(13, 13, 180, 180);
348 CRect rectSource(35, 10, 125, 10);
354 rectSource2.
left = 0;
357 rectSource2.
right = 640;
363 rect.DeflateRect(1, 2);
369 CRect rectDeflate(1, 2, 3, 4);
371 rect2.DeflateRect(&rectDeflate);
375 rect2.DeflateRect(sz);
379 rect2.OffsetRect(sz);
383 CRect rect1(35, 150, 10, 25);
385 rect3 =
CRect(98, 999, 6, 3);
403 rect.InflateRect(50, 200);
408 rect.InflateRect(sz);
414 int nHt =
rect.Height();
416 ok(nHt == 40,
"Expected nHt to be 40, was %i\n", nHt);
418 CRect rectOne(125, 0, 150, 200);
419 CRect rectTwo(0, 75, 350, 95);
427 CRect rectInter2 = rectOne;
428 rectInter2 &= rectTwo;
432 CRect rectNone(0, 0, 0, 0);
433 CRect rectSome(35, 50, 135, 150);
438 CRect rectEmpty(35, 35, 35, 35);
444 CRect rectNotNull(0, 0, 35, 50);
447 rect1 =
CRect(35, 150, 10, 25);
449 rect3 =
CRect(98, 999, 6, 3);
463 rect1 =
CRect(100, 235, 200, 335);
471 rect1 =
CRect(100, 235, 200, 335);
473 CRect rectResult(135, 300, 235, 400);
477 rectResult =
CRect(65, 85, 210, 360);
481 rectResult =
CRect(135, 385, 190, 310);
485 rectResult =
CRect(65, 170, 165, 270);
492 rect1 =
CRect(100, 0, 200, 300);
495 rect3 = rect1 &
rect2;
497 rectResult =
CRect(100, 100, 200, 200);
500 rect3 = rect1 |
rect2;
501 rectResult =
CRect(0, 0, 300, 300);
508 rectResult =
CRect(100, 50, 400, 350);
512 rectResult =
CRect(65, -100, 410, 375);
516 rectResult =
CRect(-35, -150, 310, 325);
520 rectResult =
CRect(0, 0, 300, 300);
524 rectResult =
CRect(100, 50, 400, 350);
528 rectResult =
CRect(-100, -50, 200, 250);
static void test_CPoint()
BOOL EqualRect(LPCRECT lpRect) const
void CopyRect(LPCRECT lpSrcRect)
BOOL IntersectRect(LPCRECT lpRect1, LPCRECT lpRect2)
static const WCHAR empty[]
REFIID LPVOID DWORD_PTR dw
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static __inline const char * wine_dbgstr_size(const SIZE *size)
static __inline const char * wine_dbgstr_rect(const RECT *rect)