Lines Matching defs:rect
43 void SkRRect::setRectXY(const SkRect& rect, SkScalar xRad, SkScalar yRad) {
44 if (!this->initializeRect(rect)) {
49 xRad = yRad = 0; // devolve into a simple rect
63 this->setRect(rect);
79 void SkRRect::setNinePatch(const SkRect& rect, SkScalar leftRad, SkScalar topRad,
81 if (!this->initializeRect(rect)) {
87 this->setRect(rect); // devolve into a simple rect
115 // If the left and (by equality check above) right radii are zero then it is a rect.
167 void SkRRect::setRectRadii(const SkRect& rect, const SkVector radii[4]) {
168 if (!this->initializeRect(rect)) {
173 this->setRect(rect); // devolve into a simple rect
180 this->setRect(rect);
187 this->setRect(rect);
192 bool SkRRect::initializeRect(const SkRect& rect) {
194 if (!rect.isFinite()) {
198 fRect = rect.makeSorted();
256 // May be simple, oval, or complex, or become a rect/empty if the radii adjustment made them 0
338 bool SkRRect::contains(const SkRect& rect) const {
339 if (!this->getBounds().contains(rect)) {
340 // If 'rect' isn't contained by the RR's bounds then the
350 // At this point we know all four corners of 'rect' are inside the
353 return this->checkCornerContainment(rect.fLeft, rect.fTop) &&
354 this->checkCornerContainment(rect.fRight, rect.fTop) &&
355 this->checkCornerContainment(rect.fRight, rect.fBottom) &&
356 this->checkCornerContainment(rect.fLeft, rect.fBottom);
416 this->setRect(this->rect());
446 // some dimension of the rect, so we need to check for that. Note that matrix must be
447 // scale and translate and mapRect() produces a sorted rect. So an empty rect indicates
585 // Serialize only the rect and corners, but not the derived type tag.
591 // Serialize only the rect and corners, but not the derived type tag.
738 bool SkRRect::AreRectAndRadiiValid(const SkRect& rect, const SkVector radii[4]) {
739 if (!rect.isFinite() || !rect.isSorted()) {
743 if (!are_radius_check_predicates_valid(radii[i].fX, rect.fLeft, rect.fRight) ||
744 !are_radius_check_predicates_valid(radii[i].fY, rect.fTop, rect.fBottom)) {
754 return rr.rect();
757 // We start with the outer bounds of the round rect and consider three subsets and take the
759 // corners, the third is the rect inscribed at the corner curves' maximal point. This forms
769 // rectangle off of the rounded-rect path, but that is acceptable given that the general
783 // And by shifting all edges: just considering a corner ellipse, the maximum inscribed rect has
815 // Returns the coordinate of the rect matching the corner enum.
840 SkPoint aCorner = getCorner(a.rect(), corner);
841 SkPoint bCorner = getCorner(b.rect(), corner);
878 // contained in both (if not, then the intersection can't be a round rect).
885 // We fill in the SkRRect directly. Since the rect and radii are either 0s or determined by
888 if (!intersection.fRect.intersect(a.rect(), b.rect())) {
912 // one-sided corner check. If they aren't valid, a corner's radii doesn't fit within the rect.
915 // the intersection shape is definitively not a round rect.