Lines Matching refs:rect

54     SkRect rect = SkRect::MakeEmpty();
55 SkDebugf("MakeEmpty isEmpty: %s\n", rect.isEmpty() ? "true" : "false");
56 rect.offset(10, 10);
57 SkDebugf("offset rect isEmpty: %s\n", rect.isEmpty() ? "true" : "false");
58 rect.inset(10, 10);
59 SkDebugf("inset rect isEmpty: %s\n", rect.isEmpty() ? "true" : "false");
60 rect.outset(20, 20);
61 SkDebugf("outset rect isEmpty: %s\n", rect.isEmpty() ? "true" : "false");
64 offset rect isEmpty: true
65 inset rect isEmpty: true
66 outset rect isEmpty: false
133 SkRect rect = SkRect::MakeSize(size);
134 SkDebugf("rect width: %g height: %g\n", rect.width(), rect.height());
136 rect = SkRect::MakeSize(SkSize::Make(floor));
137 SkDebugf("floor width: %g height: %g\n", rect.width(), rect.height());
139 rect width: 25.5 height: 35.5
157 SkRect rect = SkRect::MakeLTRB(5, 35, 15, 25);
158 SkDebugf("rect: %g, %g, %g, %g isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
159 rect.bottom(), rect.isEmpty() ? "true" : "false");
160 rect.sort();
161 SkDebugf("rect: %g, %g, %g, %g isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
162 rect.bottom(), rect.isEmpty() ? "true" : "false");
164 rect: 5, 35, 15, 25 isEmpty: true
165 rect: 5, 25, 15, 35 isEmpty: false
190 SkRect rect = SkRect::MakeXYWH(5, 35, -15, 25);
191 SkDebugf("rect: %g, %g, %g, %g isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
192 rect.bottom(), rect.isEmpty() ? "true" : "false");
193 rect.sort();
194 SkDebugf("rect: %g, %g, %g, %g isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
195 rect.bottom(), rect.isEmpty() ? "true" : "false");
197 rect: 5, 35, -10, 60 isEmpty: true
198 rect: -10, 35, 5, 60 isEmpty: false
260 for (auto rect : tests) {
261 SkDebugf("rect: {%g, %g, %g, %g} is" "%s empty\n", rect.left(), rect.top(), rect.right(),
262 rect.bottom(), rect.isEmpty() ? "" : " not");
263 rect.sort();
264 SkDebugf("sorted: {%g, %g, %g, %g} is" "%s empty\n", rect.left(), rect.top(), rect.right(),
265 rect.bottom(), rect.isEmpty() ? "" : " not");
268 rect: {20, 40, 10, 50} is empty
270 rect: {20, 40, 20, 50} is empty
289 for (auto rect : tests) {
290 SkDebugf("rect: {%g, %g, %g, %g} is" "%s sorted\n", rect.left(), rect.top(), rect.right(),
291 rect.bottom(), rect.isSorted() ? "" : " not");
292 rect.sort();
293 SkDebugf("sorted: {%g, %g, %g, %g} is" "%s sorted\n", rect.left(), rect.top(), rect.right(),
294 rect.bottom(), rect.isSorted() ? "" : " not");
297 rect: {20, 40, 10, 50} is not sorted
299 rect: {20, 40, 20, 50} is sorted
533 for (auto rect : tests) {
534 SkDebugf("left: %3g right: %3g centerX: %3g\n", rect.left(), rect.right(), rect.centerX());
535 rect.sort();
536 SkDebugf("left: %3g right: %3g centerX: %3g\n", rect.left(), rect.right(), rect.centerX());
559 SkRect rect = { 2e+38, 2e+38, 3e+38, 3e+38 };
560 SkDebugf("left: %g right: %g centerX: %g ", rect.left(), rect.right(), rect.centerX());
561 SkDebugf("safe mid x: %g\n", rect.left() / 2 + rect.right() / 2);
596 for (auto rect : tests) {
597 debugster(rect);
645 SkRect rect = {1, 2, 3, 4};
647 rect.toQuad(corners);
648 SkDebugf("rect: {%g, %g, %g, %g}\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
655 rect: {1, 2, 3, 4}
675 SkRect rect;
676 rect.setBounds(points, count);
682 SkDebugf("count: %d rect: %g, %g, %g, %g\n", count,
683 rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
686 count: 0 rect: 0, 0, 0, 0
687 added: 3, 4 count: 1 rect: 3, 4, 3, 4
688 added: 1, 2 count: 2 rect: 1, 2, 3, 4
689 added: 5, 6 count: 3 rect: 1, 2, 5, 6
690 added: nan, 8 count: 4 rect: 0, 0, 0, 0
709 SkRect rect;
710 bool success = rect.setBoundsCheck(points, count);
716 SkDebugf("count: %d rect: %g, %g, %g, %g success: %s\n", count,
717 rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, success ? "true" : "false");
720 count: 0 rect: 0, 0, 0, 0 success: true
721 added: 3, 4 count: 1 rect: 3, 4, 3, 4 success: true
722 added: 1, 2 count: 2 rect: 1, 2, 3, 4 success: true
723 added: 5, 6 count: 3 rect: 1, 2, 5, 6 success: true
724 added: nan, 8 count: 4 rect: 0, 0, 0, 0 success: false
747 SkRect rect;
748 rect.setBoundsNoCheck(points, count);
754 SkDebugf("count: %d rect: %g, %g, %g, %g\n", count,
755 rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
771 SkRect rect = {3, 4, 1, 2};
773 SkDebugf("rect: {%g, %g, %g, %g} is %s" "empty\n", rect.fLeft, rect.fTop,
774 rect.fRight, rect.fBottom, rect.isEmpty() ? "" : "not ");
775 rect.setEmpty();
778 rect: {3, 4, 1, 2} is empty
779 rect: {0, 0, 0, 0} is empty
868 SkRect rect;
869 rect.set(points, count);
875 SkDebugf("count: %d rect: %g, %g, %g, %g\n", count,
876 rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
879 count: 0 rect: 0, 0, 0, 0
880 added: 3, 4 count: 1 rect: 3, 4, 3, 4
881 added: 1, 2 count: 2 rect: 1, 2, 3, 4
882 added: 5, 6 count: 3 rect: 1, 2, 5, 6
883 added: nan, 8 count: 4 rect: 0, 0, 0, 0
904 SkRect rect;
905 rect.set(point1, point2);
906 SkDebugf("rect: %g, %g, %g, %g\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
907 rect.set(point2, point1);
908 SkDebugf("rect: %g, %g, %g, %g\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
930 SkRect rect;
931 rect.setXYWH(5, 35, -15, 25);
932 SkDebugf("rect: %g, %g, %g, %g isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
933 rect.bottom(), rect.isEmpty() ? "true" : "false");
934 rect.sort();
935 SkDebugf("rect: %g, %g, %g, %g isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
936 rect.bottom(), rect.isEmpty() ? "true" : "false");
938 rect: 5, 35, -10, 60 isEmpty: true
939 rect: -10, 35, 5, 60 isEmpty: false
956 SkRect rect;
957 rect.setWH(-15, 25);
958 SkDebugf("rect: %g, %g, %g, %g isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
959 rect.bottom(), rect.isEmpty() ? "true" : "false");
960 rect.sort();
961 SkDebugf("rect: %g, %g, %g, %g isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
962 rect.bottom(), rect.isEmpty() ? "true" : "false");
964 rect: 0, 0, -15, 25 isEmpty: true
965 rect: -15, 0, 0, 25 isEmpty: false
1040 SkRect rect = { 10, 50, 20, 60 };
1041 SkDebugf("rect: %g, %g, %g, %g isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
1042 rect.bottom(), rect.isEmpty() ? "true" : "false");
1043 rect = rect.makeOffset(15, 32);
1044 SkDebugf("rect: %g, %g, %g, %g isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
1045 rect.bottom(), rect.isEmpty() ? "true" : "false");
1047 rect: 10, 50, 20, 60 isEmpty: false
1048 rect: 25, 82, 35, 92 isEmpty: false
1065 SkRect rect = { 10, 50, 20, 60 };
1066 SkDebugf("rect: %g, %g, %g, %g isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
1067 rect.bottom(), rect.isEmpty() ? "true" : "false");
1068 rect = rect.makeInset(15, 32);
1069 SkDebugf("rect: %g, %g, %g, %g isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
1070 rect.bottom(), rect.isEmpty() ? "true" : "false");
1072 rect: 10, 50, 20, 60 isEmpty: false
1073 rect: 25, 82, 5, 28 isEmpty: true
1090 SkRect rect = { 10, 50, 20, 60 };
1091 SkDebugf("rect: %g, %g, %g, %g isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
1092 rect.bottom(), rect.isEmpty() ? "true" : "false");
1093 rect = rect.makeOutset(15, 32);
1094 SkDebugf("rect: %g, %g, %g, %g isEmpty: %s\n", rect.left(), rect.top(), rect.right(),
1095 rect.bottom(), rect.isEmpty() ? "true" : "false");
1097 rect: 10, 50, 20, 60 isEmpty: false
1098 rect: -5, 18, 35, 92 isEmpty: false
1115 SkRect rect = { 10, 14, 50, 73 };
1116 rect.offset(5, 13);
1117 SkDebugf("rect: %g, %g, %g, %g\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1119 rect: 15, 27, 55, 86
1135 SkRect rect = { 10, 14, 50, 73 };
1136 rect.offset({5, 13});
1137 SkDebugf("rect: %g, %g, %g, %g\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1139 rect: 15, 27, 55, 86
1156 SkRect rect = { 10, 14, 50, 73 };
1157 rect.offsetTo(15, 27);
1158 SkDebugf("rect: %g, %g, %g, %g\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1160 rect: 15, 27, 55, 86
1177 SkRect rect = { 10, 14, 50, 73 };
1178 rect.inset(5, 13);
1179 SkDebugf("rect: %g, %g, %g, %g\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1181 rect: 15, 27, 45, 60
1198 SkRect rect = { 10, 14, 50, 73 };
1199 rect.outset(5, 13);
1200 SkDebugf("rect: %g, %g, %g, %g\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1202 rect: 5, 1, 55, 86
1233 SkRect rect = { 30, 50, 40, 60 };
1236 SkDebugf("rect: (%g, %g, %g, %g) %s (%g, %g)\n",
1237 rect.left(), rect.top(), rect.right(), rect.bottom(),
1238 rect.contains(contained.x(), contained.y()) ? "contains" : "does not contain",
1242 rect: (30, 50, 40, 60) contains (30, 50)
1243 rect: (30, 50, 40, 60) does not contain (39, 49)
1244 rect: (30, 50, 40, 60) does not contain (29, 59)
1260 SkRect rect = { 30, 50, 40, 60 };
1263 SkDebugf("rect: (%g, %g, %g, %g) %s (%g, %g, %g, %g)\n",
1264 rect.left(), rect.top(), rect.right(), rect.bottom(),
1265 rect.contains(contained) ? "contains" : "does not contain",
1269 rect: (30, 50, 40, 60) contains (30, 50, 31, 51)
1270 rect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)
1271 rect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)
1287 SkRect rect = { 30, 50, 40, 60 };
1290 SkDebugf("rect: (%g, %g, %g, %g) %s (%d, %d, %d, %d)\n",
1291 rect.left(), rect.top(), rect.right(), rect.bottom(),
1292 rect.contains(contained) ? "contains" : "does not contain",
1296 rect: (30, 50, 40, 60) contains (30, 50, 31, 51)
1297 rect: (30, 50, 40, 60) does not contain (39, 49, 40, 50)
1298 rect: (30, 50, 40, 60) does not contain (29, 59, 30, 60)
1390 SkRect rect = { 10, 40, 50, 80 };
1391 SkDebugf("%s intersection", rect.intersects(30, 60, 70, 90) ? "" : "no ");
1409 SkRect rect = { 10, 40, 50, 80 };
1410 SkDebugf("%s intersection", rect.intersects({30, 60, 70, 90}) ? "" : "no ");
1453 SkRect rect = { 10, 20, 15, 25};
1454 rect.join(50, 60, 55, 65);
1455 SkDebugf("join: %g, %g, %g, %g\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1473 SkRect rect = { 10, 20, 15, 25};
1474 rect.join({50, 60, 55, 65});
1475 SkDebugf("join: %g, %g, %g, %g\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1497 SkRect rect = { 10, 100, 15, 0};
1498 SkRect sorted = rect.makeSorted();
1500 rect.joinNonEmptyArg(toJoin);
1501 SkDebugf("rect: %g, %g, %g, %g\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1505 rect: 50, 60, 55, 65
1526 SkRect rect = { 10, 100, 15, 0};
1527 SkRect sorted = rect.makeSorted();
1529 rect.joinPossiblyEmptyRect(toJoin);
1530 SkDebugf("rect: %g, %g, %g, %g\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1534 rect: 10, 60, 55, 65
1559 SkRect rect = { 30.5f, 50.5f, 40.5f, 60.5f };
1561 rect.round(&round);
1586 SkRect rect = { 30.5f, 50.5f, 40.5f, 60.5f };
1588 rect.roundOut(&round);
1612 SkRect rect = { 30.5f, 50.5f, 40.5f, 60.5f };
1614 rect.roundOut(&round);
1639 SkRect rect = { 30.5f, 50.5f, 40.5f, 60.5f };
1641 rect.roundIn(&round);
1664 SkRect rect = { 30.5f, 50.5f, 40.5f, 60.5f };
1665 SkIRect round = rect.round();
1689 SkRect rect = { 30.5f, 50.5f, 40.5f, 60.5f };
1690 SkIRect round = rect.roundOut();
1715 SkRect rect = { 30.5f, 50.5f, 20.5f, 10.5f };
1716 SkDebugf("rect: %g, %g, %g, %g\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1717 rect.sort();
1718 SkDebugf("sorted: %g, %g, %g, %g\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1720 rect: 30.5, 50.5, 20.5, 10.5
1739 SkRect rect = { 30.5f, 50.5f, 20.5f, 10.5f };
1740 SkDebugf("rect: %g, %g, %g, %g\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
1741 SkRect sort = rect.makeSorted();
1744 rect: 30.5, 50.5, 20.5, 10.5
1763 SkRect rect = {7, 11, 13, 17};
1764 SkDebugf("rect.asScalars() %c= &rect.fLeft\n", rect.asScalars() == &rect.fLeft? '=' : '!');
1766 rect.asScalars() == &rect.fLeft
1782 SkRect rect = {20, 30, 40, 50};
1784 rect.dump(dumpAsHex);
1807 SkRect rect = {6.f / 7, 2.f / 3, 26.f / 10, 42.f / 6};
1808 rect.dump();
1810 SkDebugf("rect is " "%s" "equal to copy\n", rect == copy ? "" : "not ");
1813 rect is not equal to copy
1836 SkRect rect = {6.f / 7, 2.f / 3, 26.f / 10, 42.f / 6};
1837 rect.dumpHex();
1842 SkDebugf("rect is " "%s" "equal to copy\n", rect == copy ? "" : "not ");
1848 rect is equal to copy