Lines Matching refs:rect
50 SkIRect rect = SkIRect::MakeEmpty();
51 SkDebugf("MakeEmpty isEmpty: %s\n", rect.isEmpty() ? "true" : "false");
52 rect.offset(10, 10);
53 SkDebugf("offset rect isEmpty: %s\n", rect.isEmpty() ? "true" : "false");
54 rect.inset(10, 10);
55 SkDebugf("inset rect isEmpty: %s\n", rect.isEmpty() ? "true" : "false");
56 rect.outset(20, 20);
57 SkDebugf("outset rect isEmpty: %s\n", rect.isEmpty() ? "true" : "false");
60 offset rect isEmpty: true
61 inset rect isEmpty: true
62 outset rect isEmpty: false
104 SkIRect rect = SkIRect::MakeSize(size.toRound());
105 SkDebugf("round width: %d height: %d\n", rect.width(), rect.height());
106 rect = SkIRect::MakeSize(size.toFloor());
107 SkDebugf("floor width: %d height: %d\n", rect.width(), rect.height());
127 SkIRect rect = SkIRect::MakeLTRB(5, 35, 15, 25);
128 SkDebugf("rect: %d, %d, %d, %d isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
129 rect.bottom(), rect.isEmpty() ? "true" : "false");
130 rect.sort();
131 SkDebugf("rect: %d, %d, %d, %d isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
132 rect.bottom(), rect.isEmpty() ? "true" : "false");
134 rect: 5, 35, 15, 25 isEmpty: true
135 rect: 5, 25, 15, 35 isEmpty: false
153 SkIRect rect = SkIRect::MakeXYWH(5, 35, -15, 25);
154 SkDebugf("rect: %d, %d, %d, %d isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
155 rect.bottom(), rect.isEmpty() ? "true" : "false");
156 rect.sort();
157 SkDebugf("rect: %d, %d, %d, %d isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
158 rect.bottom(), rect.isEmpty() ? "true" : "false");
160 rect: 5, 35, -10, 60 isEmpty: true
161 rect: -10, 35, 5, 60 isEmpty: false
406 auto debugster = [](const char* prefix, const SkIRect& rect) -> void {
407 SkISize size = rect.size();
409 SkDebugf("rect: %d, %d, %d, %d ", rect.left(), rect.top(), rect.right(), rect.bottom());
412 SkIRect rect = {20, 30, 40, 50};
413 debugster("original", rect);
414 rect.offset(20, 20);
415 debugster(" offset", rect);
416 rect.outset(20, 20);
417 debugster(" outset", rect);
419 original rect: 20, 30, 40, 50 size: 20, 20
420 offset rect: 40, 50, 60, 70 size: 20, 20
421 outset rect: 20, 30, 80, 90 size: 60, 60
439 for (auto rect : tests) {
440 SkDebugf("rect: {%d, %d, %d, %d} is" "%s empty\n", rect.left(), rect.top(), rect.right(),
441 rect.bottom(), rect.isEmpty() ? "" : " not");
442 rect.sort();
443 SkDebugf("sorted: {%d, %d, %d, %d} is" "%s empty\n", rect.left(), rect.top(), rect.right(),
444 rect.bottom(), rect.isEmpty() ? "" : " not");
447 rect: {20, 40, 10, 50} is empty
449 rect: {20, 40, 20, 50} is empty
468 for (auto rect : tests) {
469 SkDebugf("rect: {%d, %d, %d, %d} is" "%s empty\n", rect.left(), rect.top(), rect.right(),
470 rect.bottom(), rect.isEmpty64() ? "" : " not");
471 rect.sort();
472 SkDebugf("sorted: {%d, %d, %d, %d} is" "%s empty\n", rect.left(), rect.top(), rect.right(),
473 rect.bottom(), rect.isEmpty64() ? "" : " not");
476 rect: {20, 40, 10, 50} is empty
478 rect: {20, 40, 20, 50} is empty
546 SkIRect rect = {3, 4, 1, 2};
548 SkDebugf("rect: {%d, %d, %d, %d} is %s" "empty\n", rect.fLeft, rect.fTop,
549 rect.fRight, rect.fBottom, rect.isEmpty() ? "" : "not ");
550 rect.setEmpty();
553 rect: {3, 4, 1, 2} is empty
554 rect: {0, 0, 0, 0} is empty
625 SkIRect rect;
626 rect.setXYWH(5, 35, -15, 25);
627 SkDebugf("rect: %d, %d, %d, %d isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
628 rect.bottom(), rect.isEmpty() ? "true" : "false");
629 rect.sort();
630 SkDebugf("rect: %d, %d, %d, %d isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
631 rect.bottom(), rect.isEmpty() ? "true" : "false");
633 rect: 5, 35, -10, 60 isEmpty: true
634 rect: -10, 35, 5, 60 isEmpty: false
654 SkIRect rect = { 10, 50, 20, 60 };
655 SkDebugf("rect: %d, %d, %d, %d isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
656 rect.bottom(), rect.isEmpty() ? "true" : "false");
657 rect = rect.makeOffset(15, 32);
658 SkDebugf("rect: %d, %d, %d, %d isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
659 rect.bottom(), rect.isEmpty() ? "true" : "false");
661 rect: 10, 50, 20, 60 isEmpty: false
662 rect: 25, 82, 35, 92 isEmpty: false
679 SkIRect rect = { 10, 50, 20, 60 };
680 SkDebugf("rect: %d, %d, %d, %d isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
681 rect.bottom(), rect.isEmpty() ? "true" : "false");
682 rect = rect.makeInset(15, 32);
683 SkDebugf("rect: %d, %d, %d, %d isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
684 rect.bottom(), rect.isEmpty() ? "true" : "false");
686 rect: 10, 50, 20, 60 isEmpty: false
687 rect: 25, 82, 5, 28 isEmpty: true
704 SkIRect rect = { 10, 50, 20, 60 };
705 SkDebugf("rect: %d, %d, %d, %d isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
706 rect.bottom(), rect.isEmpty() ? "true" : "false");
707 rect = rect.makeOutset(15, 32);
708 SkDebugf("rect: %d, %d, %d, %d isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
709 rect.bottom(), rect.isEmpty() ? "true" : "false");
711 rect: 10, 50, 20, 60 isEmpty: false
712 rect: -5, 18, 35, 92 isEmpty: false
729 SkIRect rect = { 10, 14, 50, 73 };
730 rect.offset(5, 13);
731 SkDebugf("rect: %d, %d, %d, %d\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
733 rect: 15, 27, 55, 86
749 SkIRect rect = { 10, 14, 50, 73 };
750 rect.offset({5, 13});
751 SkDebugf("rect: %d, %d, %d, %d\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
753 rect: 15, 27, 55, 86
770 SkIRect rect = { 10, 14, 50, 73 };
771 rect.offsetTo(15, 27);
772 SkDebugf("rect: %d, %d, %d, %d\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
774 rect: 15, 27, 55, 86
791 SkIRect rect = { 10, 14, 50, 73 };
792 rect.inset(5, 13);
793 SkDebugf("rect: %d, %d, %d, %d\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
795 rect: 15, 27, 45, 60
812 SkIRect rect = { 10, 14, 50, 73 };
813 rect.outset(5, 13);
814 SkDebugf("rect: %d, %d, %d, %d\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
816 rect: 5, 1, 55, 86
847 SkIRect rect = { 8, 11, 19, 22 };
848 rect.adjust(2, -1, 1, -2);
849 SkDebugf("rect: %d, %d, %d, %d\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
851 rect: 10, 10, 20, 20
877 SkIRect rect = { 30, 50, 40, 60 };
880 SkDebugf("rect: (%d, %d, %d, %d) %s (%d, %d)\n",
881 rect.left(), rect.top(), rect.right(), rect.bottom(),
882 rect.contains(pt.x(), pt.y()) ? "contains" : "does not contain", pt.x(), pt.y());
885 rect: (30, 50, 40, 60) contains (30, 50)
886 rect: (30, 50, 40, 60) does not contain (40, 50)
887 rect: (30, 50, 40, 60) does not contain (30, 60)
903 SkIRect rect = { 30, 50, 40, 60 };
906 bool success = rect.contains(
908 SkDebugf("rect: (%d, %d, %d, %d) %s (%d, %d, %d, %d)\n",
909 rect.left(), rect.top(), rect.right(), rect.bottom(),
914 rect: (30, 50, 40, 60) contains (30, 50, 31, 51)
915 rect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)
916 rect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)
932 SkIRect rect = { 30, 50, 40, 60 };
935 SkDebugf("rect: (%d, %d, %d, %d) %s (%d, %d, %d, %d)\n",
936 rect.left(), rect.top(), rect.right(), rect.bottom(),
937 rect.contains(contained) ? "contains" : "does not contain",
941 rect: (30, 50, 40, 60) contains (30, 50, 31, 51)
942 rect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)
943 rect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)
959 SkIRect rect = { 30, 50, 40, 60 };
962 SkDebugf("rect: (%d, %d, %d, %d) %s (%g, %g, %g, %g)\n",
963 rect.left(), rect.top(), rect.right(), rect.bottom(),
964 rect.contains(contained) ? "contains" : "does not contain",
968 rect: (30, 50, 40, 60) contains (30, 50, 31, 51)
969 rect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)
970 rect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)
987 SkIRect rect = { 30, 50, 40, 60 };
990 bool success = rect.containsNoEmptyCheck(
992 SkDebugf("rect: (%d, %d, %d, %d) %s (%d, %d, %d, %d)\n",
993 rect.left(), rect.top(), rect.right(), rect.bottom(),
998 rect: (30, 50, 40, 60) contains (30, 50, 31, 51)
999 rect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)
1000 rect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)
1016 SkIRect rect = { 30, 50, 40, 60 };
1019 SkDebugf("rect: (%d, %d, %d, %d) %s (%d, %d, %d, %d)\n",
1020 rect.left(), rect.top(), rect.right(), rect.bottom(),
1021 rect.containsNoEmptyCheck(contained) ? "contains" : "does not contain",
1025 rect: (30, 50, 40, 60) contains (30, 50, 31, 51)
1026 rect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)
1027 rect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)
1187 SkIRect rect = { 10, 20, 15, 25};
1188 rect.join(50, 60, 55, 65);
1189 SkDebugf("join: %d, %d, %d, %d\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1207 SkIRect rect = { 10, 20, 15, 25};
1208 rect.join({50, 60, 55, 65});
1209 SkDebugf("join: %d, %d, %d, %d\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1232 SkIRect rect = { 30, 50, 20, 10 };
1233 SkDebugf("rect: %d, %d, %d, %d\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1234 rect.sort();
1235 SkDebugf("sorted: %d, %d, %d, %d\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1237 rect: 30, 50, 20, 10
1256 SkIRect rect = { 30, 50, 20, 10 };
1257 SkDebugf("rect: %d, %d, %d, %d\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1258 SkIRect sort = rect.makeSorted();
1261 rect: 30, 50, 20, 10
1279 const SkIRect& rect = SkIRect::EmptyIRect();
1280 SkDebugf("rect: %d, %d, %d, %d\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1282 rect: 0, 0, 0, 0