From ccdc3ebb9c9bf67ec8e0e30ab117c82bf8485663 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Tue, 15 Mar 2016 10:57:47 -0700 Subject: [PATCH] Document that Rect right/bottom are exclusive bug:22254401 Change-Id: I891e73404937b4b67210f0ac180f4cef952f8f16 --- graphics/java/android/graphics/Rect.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/graphics/java/android/graphics/Rect.java b/graphics/java/android/graphics/Rect.java index 0cde0b990456f..93ef3f0c5f9be 100644 --- a/graphics/java/android/graphics/Rect.java +++ b/graphics/java/android/graphics/Rect.java @@ -30,6 +30,11 @@ import java.util.regex.Pattern; * These fields can be accessed directly. Use width() and height() to retrieve * the rectangle's width and height. Note: most methods do not check to see that * the coordinates are sorted correctly (i.e. left <= right and top <= bottom). + *

+ * Note that the right and bottom coordinates are exclusive. This means a Rect + * being drawn untransformed onto a {@link android.graphics.Canvas} will draw + * into the column and row described by its left and top coordinates, but not + * those of its bottom and right. */ public final class Rect implements Parcelable { public int left;