summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorBrian Muramatsu <btmura@google.com>2011-02-16 11:40:06 -0800
committerBrian Muramatsu <btmura@google.com>2011-02-16 14:58:45 -0800
commit8a9f9d880da83877206d0a52d03c784e936d3814 (patch)
tree9c393d02215765ec59f4d192c593e0ffd09d68c4 /graphics
parentd33a4ccb5c3b58406cee45a4d933d40219177f8c (diff)
downloadframeworks_base-8a9f9d880da83877206d0a52d03c784e936d3814.zip
frameworks_base-8a9f9d880da83877206d0a52d03c784e936d3814.tar.gz
frameworks_base-8a9f9d880da83877206d0a52d03c784e936d3814.tar.bz2
Fix Paint#breakText(char[]..) JavaDoc
The JavaDoc says that if the "...count is negative then the characters before index are measured in reverse order. This allows for measuring the end of string." However, the native code doesn't work its way backwards from the given index when the count is negative. It always passes Skia the substring starting from index and the absolute value of count. Its better to fix the JavaDoc rather than the behavior, since this API is public and has been this way for some time. It is also used by TextUtils.ellipsize indirectly, so its best to avoid breaking that sensitive code. Change-Id: I8bd51def6ec98251e355370710eb44f58fb737c4
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/graphics/Paint.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java
index d8a7f9d..0a23bae 100644
--- a/graphics/java/android/graphics/Paint.java
+++ b/graphics/java/android/graphics/Paint.java
@@ -1254,9 +1254,7 @@ public class Paint {
* @param text The text to measure
* @param index The offset into text to begin measuring at
* @param count The number of maximum number of entries to measure. If count
- * is negative, then the characters before index are measured
- * in reverse order. This allows for measuring the end of
- * string.
+ * is negative, then the characters are measured in reverse order.
* @param maxWidth The maximum width to accumulate.
* @param measuredWidth Optional. If not null, returns the actual width
* measured.