Lines Matching defs:rect

77         REPORTER_ASSERT(reporter, r.rect() == oooRects[i].makeSorted());
81 REPORTER_ASSERT(reporter, r.rect() == oooRects[i].makeSorted());
85 REPORTER_ASSERT(reporter, r.rect() == oooRects[i].makeSorted());
89 REPORTER_ASSERT(reporter, r.rect() == oooRects[i].makeSorted());
93 REPORTER_ASSERT(reporter, r.rect() == oooRects[i].makeSorted());
99 REPORTER_ASSERT(reporter, r.rect() == emptyRects[i]);
103 REPORTER_ASSERT(reporter, r.rect() == emptyRects[i]);
107 REPORTER_ASSERT(reporter, r.rect() == emptyRects[i]);
111 REPORTER_ASSERT(reporter, r.rect() == emptyRects[i]);
115 REPORTER_ASSERT(reporter, r.rect() == emptyRects[i]);
150 const SkRect& rect,
154 rr.setNinePatch(rect, l, t, r, b);
157 REPORTER_ASSERT(reporter, rr.rect() == rect);
170 rr2.setRectRadii(rect, radii);
183 REPORTER_ASSERT(reporter, empty.rect().isEmpty());
190 SkRect rect = SkRect::MakeLTRB(0, 0, kWidth, kHeight);
193 rr1.setRect(rect);
196 REPORTER_ASSERT(reporter, rr1.rect() == rect);
203 rr1_2.setRectRadii(rect, rr1_2_radii);
206 rr1_3.setNinePatch(rect, 0, 0, 0, 0);
212 rr2.setOval(rect);
215 REPORTER_ASSERT(reporter, rr2.rect() == rect);
225 rr2_2.setRectRadii(rect, rr2_2_radii);
228 rr2_3.setNinePatch(rect, halfPoint.fX, halfPoint.fY, halfPoint.fX, halfPoint.fY);
234 rr3.setRectXY(rect, p.fX, p.fY);
237 REPORTER_ASSERT(reporter, rr3.rect() == rect);
244 rr3_2.setRectRadii(rect, rr3_2_radii);
247 rr3_3.setNinePatch(rect, 5, 5, 5, 5);
251 test_9patch_rrect(reporter, rect, 10, 9, 8, 7, true);
267 rr5.setRectRadii(rect, radii2);
270 REPORTER_ASSERT(reporter, rr5.rect() == rect);
281 // Test out the cases when the RR degenerates to a rect
291 r = empty.rect();
295 SkRect rect = SkRect::MakeLTRB(0, 0, kWidth, kHeight);
297 rr1.setRectXY(rect, 0, 0);
300 r = rr1.rect();
301 REPORTER_ASSERT(reporter, rect == r);
307 rr2.setRectRadii(rect, radii);
310 r = rr2.rect();
311 REPORTER_ASSERT(reporter, rect == r);
317 rr3.setRectRadii(rect, radii2);
325 SkRect rect = SkRect::MakeLTRB(0, 0, kWidth, kHeight);
327 rr1.setRectXY(rect, SkScalarHalf(kWidth), SkScalarHalf(kHeight));
330 oval = rr1.rect();
331 REPORTER_ASSERT(reporter, oval == rect);
337 SkRect rect = SkRect::MakeLTRB(0, 0, kWidth, kHeight);
339 rr1.setRectXY(rect, 20, 20);
347 rr2.setRectRadii(rect, radii);
355 // When the radii exceed the base rect they are proportionally scaled down
357 SkRect rect = SkRect::MakeLTRB(0, 0, kWidth, kHeight);
361 rr1.setRectRadii(rect, radii);
372 rr2.setRectXY(rect, -10, -20);
401 // Exercise the RR's contains rect method
406 { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, // rect
437 // point walk a 1x1 rect in from the edge of the bounding
438 // rect
443 // rect
468 // for the simple round rect we expect 3 out on
485 // all in for NW (rect) corner (same as rect case)
579 // Translate will keep the rect moved, but otherwise the same.
592 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().width());
593 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().height());
594 REPORTER_ASSERT(reporter, dst.rect().left() == orig.rect().left() + translateX);
595 REPORTER_ASSERT(reporter, dst.rect().top() == orig.rect().top() + translateY);
601 // Scaling in -x will flip the round rect horizontally.
616 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().width());
617 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().height());
619 REPORTER_ASSERT(reporter, orig.rect().right() == -dst.rect().left());
621 REPORTER_ASSERT(reporter, orig.rect().top() == dst.rect().top());
627 // Scaling in -y will flip the round rect vertically.
642 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().width());
643 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().height());
645 REPORTER_ASSERT(reporter, orig.rect().top() == -dst.rect().bottom());
647 REPORTER_ASSERT(reporter, orig.rect().left() == dst.rect().left());
664 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().width());
665 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().height());
666 REPORTER_ASSERT(reporter, orig.rect().top() == -dst.rect().bottom());
667 REPORTER_ASSERT(reporter, orig.rect().right() == -dst.rect().left());
685 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(dst.rect().width(),
686 orig.rect().width() * xScale));
687 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(dst.rect().height(),
688 orig.rect().height() * yScale));
689 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(dst.rect().left(),
690 orig.rect().left() * xScale));
691 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(dst.rect().top(),
692 orig.rect().top() * yScale));
717 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().height());
718 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().width());
742 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().height());
743 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().width());
806 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().height());
807 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().width());
872 REPORTER_ASSERT(reporter, orig.rect().width() == dst.rect().height());
873 REPORTER_ASSERT(reporter, orig.rect().height() == dst.rect().width());
928 // further off into space - yielding numerical issues when the rect & radii
1026 // Test that a rect rrect reports itself as the inner bounds
1059 // Test a variety of complex round rects produce a non-empty rect that is at least contained,
1107 // Helper to test expected intersection, relying on the fact that all round rect intersections
1118 // Compute expected round rect intersection given bounds of A and B, and the specified
1121 SkAssertResult(expectedBounds.intersect(a.rect(), b.rect()));
1140 // Bounds of intersection round rect should equal intersection of bounds of a and b
1141 REPORTER_ASSERT(reporter, actual.rect() == expectedBounds);
1143 // Use PathOps to confirm that the explicit round rect is correct.
1170 // Helper to inline making an inset round rect
1177 // A is a wide, short round rect
1179 // B is a narrow, tall round rect
1189 // - the expected bounds of the round rect intersection is calculated automatically
1235 // approximations to construct a valid round rect intersection.