OSDN Git Service

Fix Paint#breakText(char[]..) JavaDoc
authorBrian Muramatsu <btmura@google.com>
Wed, 16 Feb 2011 19:40:06 +0000 (11:40 -0800)
committerBrian Muramatsu <btmura@google.com>
Wed, 16 Feb 2011 22:58:45 +0000 (14:58 -0800)
commit8a9f9d880da83877206d0a52d03c784e936d3814
tree9c393d02215765ec59f4d192c593e0ffd09d68c4
parentd33a4ccb5c3b58406cee45a4d933d40219177f8c
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
graphics/java/android/graphics/Paint.java