Lines Matching full:rect
12 void SkRRect::setRectXY(const SkRect& rect, SkScalar xRad, SkScalar yRad) {
13 if (rect.isEmpty()) {
20 this->setRect(rect);
24 if (rect.width() < xRad+xRad || rect.height() < yRad+yRad) {
25 SkScalar scale = SkMinScalar(SkScalarDiv(rect.width(), xRad + xRad),
26 SkScalarDiv(rect.height(), yRad + yRad));
32 fRect = rect;
45 void SkRRect::setRectRadii(const SkRect& rect, const SkVector radii[4]) {
46 if (rect.isEmpty()) {
51 fRect = rect;
71 this->setRect(rect);
87 if (fRadii[0].fX + fRadii[1].fX > rect.width()) {
89 SkScalarDiv(rect.width(), fRadii[0].fX + fRadii[1].fX));
91 if (fRadii[1].fY + fRadii[2].fY > rect.height()) {
93 SkScalarDiv(rect.height(), fRadii[1].fY + fRadii[2].fY));
95 if (fRadii[2].fX + fRadii[3].fX > rect.width()) {
97 SkScalarDiv(rect.width(), fRadii[2].fX + fRadii[3].fX));
99 if (fRadii[3].fY + fRadii[0].fY > rect.height()) {
101 SkScalarDiv(rect.height(), fRadii[3].fY + fRadii[0].fY));
111 // At this point we're either oval, simple, or complex (not empty or rect)
195 bool SkRRect::contains(const SkRect& rect) const {
196 if (!this->getBounds().contains(rect)) {
197 // If 'rect' isn't contained by the RR's bounds then the
207 // At this point we know all four corners of 'rect' are inside the
210 return this->checkCornerContainment(rect.fLeft, rect.fTop) &&
211 this->checkCornerContainment(rect.fRight, rect.fTop) &&
212 this->checkCornerContainment(rect.fRight, rect.fBottom) &&
213 this->checkCornerContainment(rect.fLeft, rect.fBottom);