Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d968994 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Unhide getTextBounds for CharSequence"

parents 1eb58880 93890b2e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -14015,6 +14015,7 @@ package android.graphics {
    method public android.graphics.Paint.Style getStyle();
    method public android.graphics.Paint.Align getTextAlign();
    method public void getTextBounds(java.lang.String, int, int, android.graphics.Rect);
    method public void getTextBounds(java.lang.CharSequence, int, int, android.graphics.Rect);
    method public void getTextBounds(char[], int, int, android.graphics.Rect);
    method public java.util.Locale getTextLocale();
    method public android.os.LocaleList getTextLocales();
+3 −1
Original line number Diff line number Diff line
@@ -2599,11 +2599,13 @@ public class Paint {
     * Return in bounds (allocated by the caller) the smallest rectangle that
     * encloses all of the characters, with an implied origin at (0,0).
     *
     * Note that styles are ignored even if you pass {@link android.text.Spanned} instance.
     * Use {@link android.text.StaticLayout} for measuring bounds of {@link android.text.Spanned}.
     *
     * @param text text to measure and return its bounds
     * @param start index of the first char in the text to measure
     * @param end 1 past the last char in the text to measure
     * @param bounds returns the unioned bounds of all the text. Must be allocated by the caller
     * @hide
     */
    public void getTextBounds(CharSequence text, int start, int end, Rect bounds) {
        if ((start | end | (end - start) | (text.length() - end)) < 0) {