remove contains(x,y) for rects and rrects ... not well defined, and unused
BUG=
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/51953003
git-svn-id: http://skia.googlecode.com/svn/trunk/include@12022 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/core/SkRRect.h b/core/SkRRect.h
index 32d6285..402e6c6 100644
--- a/core/SkRRect.h
+++ b/core/SkRRect.h
@@ -199,30 +199,6 @@
}
/**
- * Returns true if (p.fX,p.fY) is inside the RR, and the RR
- * is not empty.
- *
- * Contains treats the left and top differently from the right and bottom.
- * The left and top coordinates of the RR are themselves considered
- * to be inside, while the right and bottom are not. All the points on the
- * edges of the corners are considered to be inside.
- */
- bool contains(const SkPoint& p) const {
- return contains(p.fX, p.fY);
- }
-
- /**
- * Returns true if (x,y) is inside the RR, and the RR
- * is not empty.
- *
- * Contains treats the left and top differently from the right and bottom.
- * The left and top coordinates of the RR are themselves considered
- * to be inside, while the right and bottom are not. All the points on the
- * edges of the corners are considered to be inside.
- */
- bool contains(SkScalar x, SkScalar y) const;
-
- /**
* Call inset on the bounds, and adjust the radii to reflect what happens
* in stroking: If the corner is sharp (no curvature), leave it alone,
* otherwise we grow/shrink the radii by the amount of the inset. If a
diff --git a/core/SkRect.h b/core/SkRect.h
index c615603..d9ac3a6 100644
--- a/core/SkRect.h
+++ b/core/SkRect.h
@@ -718,38 +718,11 @@
}
/**
- * Returns true if (p.fX,p.fY) is inside the rectangle, and the rectangle
- * is not empty.
- *
- * Contains treats the left and top differently from the right and bottom.
- * The left and top coordinates of the rectangle are themselves considered
- * to be inside, while the right and bottom are not. Thus for the rectangle
- * {0, 0, 5, 10}, (0,0) is contained, but (0,10), (5,0) and (5,10) are not.
- */
- bool contains(const SkPoint& p) const {
- return !this->isEmpty() &&
- fLeft <= p.fX && p.fX < fRight && fTop <= p.fY && p.fY < fBottom;
- }
-
- /**
- * Returns true if (x,y) is inside the rectangle, and the rectangle
- * is not empty.
- *
- * Contains treats the left and top differently from the right and bottom.
- * The left and top coordinates of the rectangle are themselves considered
- * to be inside, while the right and bottom are not. Thus for the rectangle
- * {0, 0, 5, 10}, (0,0) is contained, but (0,10), (5,0) and (5,10) are not.
- */
- bool contains(SkScalar x, SkScalar y) const {
- return !this->isEmpty() &&
- fLeft <= x && x < fRight && fTop <= y && y < fBottom;
- }
-
- /**
* Return true if this rectangle contains r, and if both rectangles are
* not empty.
*/
bool contains(const SkRect& r) const {
+ // todo: can we eliminate the this->isEmpty check?
return !r.isEmpty() && !this->isEmpty() &&
fLeft <= r.fLeft && fTop <= r.fTop &&
fRight >= r.fRight && fBottom >= r.fBottom;