Add SkRect::contains(SkScalar x, SkScalar y)

Similar to its SkIRect counterpart.

Change-Id: I6872694d8602ed4181a1a15b4cd1c2c32aeab3f9
Reviewed-on: https://skia-review.googlesource.com/108506
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
diff --git a/docs/SkRect_Reference.bmh b/docs/SkRect_Reference.bmh
index 2a8275c..3b9f119 100644
--- a/docs/SkRect_Reference.bmh
+++ b/docs/SkRect_Reference.bmh
@@ -1494,6 +1494,39 @@
 
 # ------------------------------------------------------------------------------
 
+#Method    bool contains(SkScalar x, SkScalar y) const
+
+#In Intersection
+Returns true if: fLeft <= x < fRight && fTop <= y < fBottom.
+Returns false if SkRect is empty.
+
+#Param x  test SkPoint x-coordinate ##
+#Param y  test SkPoint y-coordinate ##
+
+#Return true if (x, y) is inside SkRect ##
+
+#Example
+    SkRect rect = { 30, 50, 40, 60 };
+    SkPoint tests[] = { { 30, 50 }, { 39, 49 }, { 29, 59 } };
+    for (auto contained : tests) {
+        SkDebugf("rect: (%g, %g, %g, %g) %s (%g, %g)\n",
+                 rect.left(), rect.top(), rect.right(), rect.bottom(),
+                 rect.contains(contained.x(), contained.y()) ? "contains" : "does not contain",
+                 contained.x(), contained.y());
+    }
+#StdOut
+rect: (30, 50, 40, 60) contains (30, 50)
+rect: (30, 50, 40, 60) does not contain (39, 49)
+rect: (30, 50, 40, 60) does not contain (29, 59)
+##
+##
+
+#SeeAlso SkIRect::contains
+
+##
+
+# ------------------------------------------------------------------------------
+
 #Method    bool contains(const SkRect& r) const
 
 #In Intersection