summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2013-05-09 09:49:41 -0400
committerDerek Sollenberger <djsollen@google.com>2013-05-09 14:00:29 -0400
commit708144e828b1a549567ce50cd8ed3cda62930501 (patch)
treeb7a645dece3a736d2964622f3b03f682d2dc952f /graphics
parent2c76016cbc1e426ab30d322745dfb6d4e6784138 (diff)
downloadframeworks_base-708144e828b1a549567ce50cd8ed3cda62930501.zip
frameworks_base-708144e828b1a549567ce50cd8ed3cda62930501.tar.gz
frameworks_base-708144e828b1a549567ce50cd8ed3cda62930501.tar.bz2
Fix bug where we incorrectly clipped the bounds to the device size.
This CL also updates the documenation to make it clear that the API returns in local space, not clipped to the size of the bitmap/device. bug: 8747526 Change-Id: I389844672ce955341863f9940c3b401ab00dc1dc
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/Canvas.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/graphics/java/android/graphics/Canvas.java b/graphics/java/android/graphics/Canvas.java
index 79bf54b..c851844 100644
--- a/graphics/java/android/graphics/Canvas.java
+++ b/graphics/java/android/graphics/Canvas.java
@@ -781,7 +781,10 @@ public class Canvas {
}
/**
- * Retrieve the clip bounds, returning true if they are non-empty.
+ * Return the bounds of the current clip (in local coordinates) in the
+ * bounds parameter, and return true if it is non-empty. This can be useful
+ * in a way similar to quickReject, in that it tells you that drawing
+ * outside of these bounds will be clipped out.
*
* @param bounds Return the clip bounds here. If it is null, ignore it but
* still return true if the current clip is non-empty.
@@ -792,7 +795,7 @@ public class Canvas {
}
/**
- * Retrieve the clip bounds.
+ * Retrieve the bounds of the current clip (in local coordinates).
*
* @return the clip bounds, or [0, 0, 0, 0] if the clip is empty.
*/