Lines Matching refs:start
2160 @IntRange(from = 0) int start, @IntRange(from = 0) int count, in getFontMetricsInt()
2168 if (start < 0 || start >= text.length()) { in getFontMetricsInt()
2171 if (count < 0 || start + count > text.length()) { in getFontMetricsInt()
2190 nGetFontMetricsIntForText(mNativePaint, (String) text, start, count, contextStart, in getFontMetricsInt()
2196 nGetFontMetricsIntForText(mNativePaint, buf, start - contextStart, count, 0, in getFontMetricsInt()
2223 @IntRange(from = 0) int start, @IntRange(from = 0) int count, in getFontMetricsInt()
2230 if (start < 0 || start >= text.length) { in getFontMetricsInt()
2233 if (count < 0 || start + count > text.length) { in getFontMetricsInt()
2251 nGetFontMetricsIntForText(mNativePaint, text, start, count, contextStart, contextCount, in getFontMetricsInt()
2384 public float measureText(String text, int start, int end) { in measureText() argument
2388 if ((start | end | (end - start) | (text.length() - end)) < 0) { in measureText()
2392 if (text.length() == 0 || start == end) { in measureText()
2397 start, end, start, end, mBidiFlags, null, 0)); in measureText()
2401 final float w = nGetTextAdvances(mNativePaint, text, start, end, start, end, mBidiFlags, in measureText()
2428 public float measureText(CharSequence text, int start, int end) { in measureText() argument
2432 if ((start | end | (end - start) | (text.length() - end)) < 0) { in measureText()
2436 if (text.length() == 0 || start == end) { in measureText()
2440 return measureText((String)text, start, end); in measureText()
2444 return measureText(text.toString(), start, end); in measureText()
2447 return ((GraphicsOperations)text).measureText(start, end, this); in measureText()
2450 char[] buf = TemporaryBuffer.obtain(end - start); in measureText()
2451 TextUtils.getChars(text, start, end, buf, 0); in measureText()
2452 float result = measureText(buf, 0, end - start); in measureText()
2514 public int breakText(CharSequence text, int start, int end, in breakText() argument
2520 if ((start | end | (end - start) | (text.length() - end)) < 0) { in breakText()
2524 if (text.length() == 0 || start == end) { in breakText()
2527 if (start == 0 && text instanceof String && end == text.length()) { in breakText()
2532 char[] buf = TemporaryBuffer.obtain(end - start); in breakText()
2535 TextUtils.getChars(text, start, end, buf, 0); in breakText()
2538 result = breakText(buf, 0, end - start, maxWidth, measuredWidth); in breakText()
2540 result = breakText(buf, 0, -(end - start), maxWidth, measuredWidth); in breakText()
2634 public int getTextWidths(CharSequence text, int start, int end, in getTextWidths() argument
2639 if ((start | end | (end - start) | (text.length() - end)) < 0) { in getTextWidths()
2642 if (end - start > widths.length) { in getTextWidths()
2646 if (text.length() == 0 || start == end) { in getTextWidths()
2650 return getTextWidths((String) text, start, end, widths); in getTextWidths()
2654 return getTextWidths(text.toString(), start, end, widths); in getTextWidths()
2657 return ((GraphicsOperations) text).getTextWidths(start, end, in getTextWidths()
2661 char[] buf = TemporaryBuffer.obtain(end - start); in getTextWidths()
2662 TextUtils.getChars(text, start, end, buf, 0); in getTextWidths()
2663 int result = getTextWidths(buf, 0, end - start, widths); in getTextWidths()
2678 public int getTextWidths(String text, int start, int end, float[] widths) { in getTextWidths() argument
2682 if ((start | end | (end - start) | (text.length() - end)) < 0) { in getTextWidths()
2685 if (end - start > widths.length) { in getTextWidths()
2689 if (text.length() == 0 || start == end) { in getTextWidths()
2693 nGetTextAdvances(mNativePaint, text, start, end, start, end, mBidiFlags, widths, 0); in getTextWidths()
2694 return end - start; in getTextWidths()
2699 nGetTextAdvances(mNativePaint, text, start, end, start, end, mBidiFlags, widths, 0); in getTextWidths()
2701 for (int i = 0; i < end - start; i++) { in getTextWidths()
2704 return end - start; in getTextWidths()
2961 public void getTextPath(String text, int start, int end, in getTextPath() argument
2963 if ((start | end | (end - start) | (text.length() - end)) < 0) { in getTextPath()
2966 nGetTextPath(mNativePaint, mBidiFlags, text, start, end, x, y, path.mutateNI()); in getTextPath()
2980 public void getTextBounds(String text, int start, int end, Rect bounds) { in getTextBounds() argument
2981 if ((start | end | (end - start) | (text.length() - end)) < 0) { in getTextBounds()
2987 nGetStringBounds(mNativePaint, text, start, end, mBidiFlags, bounds); in getTextBounds()
3004 public void getTextBounds(@NonNull CharSequence text, int start, int end, in getTextBounds() argument
3006 if ((start | end | (end - start) | (text.length() - end)) < 0) { in getTextBounds()
3012 char[] buf = TemporaryBuffer.obtain(end - start); in getTextBounds()
3013 TextUtils.getChars(text, start, end, buf, 0); in getTextBounds()
3014 getTextBounds(buf, 0, end - start, bounds); in getTextBounds()
3094 public float getRunAdvance(char[] text, int start, int end, int contextStart, int contextEnd, in getRunAdvance() argument
3099 if ((contextStart | start | offset | end | contextEnd in getRunAdvance()
3100 | start - contextStart | offset - start | end - offset in getRunAdvance()
3104 if (end == start) { in getRunAdvance()
3108 return nGetRunAdvance(mNativePaint, text, start, end, contextStart, contextEnd, isRtl, in getRunAdvance()
3124 public float getRunAdvance(CharSequence text, int start, int end, int contextStart, in getRunAdvance() argument
3129 if ((contextStart | start | offset | end | contextEnd in getRunAdvance()
3130 | start - contextStart | offset - start | end - offset in getRunAdvance()
3134 if (end == start) { in getRunAdvance()
3140 float result = getRunAdvance(buf, start - contextStart, end - contextStart, 0, in getRunAdvance()
3172 public float getRunCharacterAdvance(@NonNull char[] text, int start, int end, int contextStart, in getRunCharacterAdvance() argument
3183 if (start < contextStart || contextEnd < end) { in getRunCharacterAdvance()
3184 throw new IndexOutOfBoundsException("Invalid start/end range: " + start + ", " + end in getRunCharacterAdvance()
3188 if (offset < start || end < offset) { in getRunCharacterAdvance()
3190 + " must be in " + start + ", " + end); in getRunCharacterAdvance()
3193 if (advances != null && advances.length < advancesIndex - start + end) { in getRunCharacterAdvance()
3196 + advancesIndex + " needed space: " + (offset - start)); in getRunCharacterAdvance()
3199 if (end == start) { in getRunCharacterAdvance()
3203 return nGetRunCharacterAdvance(mNativePaint, text, start, end, contextStart, contextEnd, in getRunCharacterAdvance()
3228 public float getRunCharacterAdvance(@NonNull CharSequence text, int start, int end, in getRunCharacterAdvance() argument
3239 if (start < contextStart || contextEnd < end) { in getRunCharacterAdvance()
3240 throw new IndexOutOfBoundsException("Invalid start/end range: " + start + ", " + end in getRunCharacterAdvance()
3244 if (offset < start || end < offset) { in getRunCharacterAdvance()
3246 + " must be in " + start + ", " + end); in getRunCharacterAdvance()
3249 if (advances != null && advances.length < advancesIndex - start + end) { in getRunCharacterAdvance()
3252 + advancesIndex + " needed space: " + (offset - start)); in getRunCharacterAdvance()
3255 if (end == start) { in getRunCharacterAdvance()
3261 final float result = getRunCharacterAdvance(buf, start - contextStart, end - contextStart, in getRunCharacterAdvance()
3296 public int getOffsetForAdvance(char[] text, int start, int end, int contextStart, in getOffsetForAdvance() argument
3301 if ((contextStart | start | end | contextEnd in getOffsetForAdvance()
3302 | start - contextStart | end - start | contextEnd - end in getOffsetForAdvance()
3307 return nGetOffsetForAdvance(mNativePaint, text, start, end, contextStart, contextEnd, in getOffsetForAdvance()
3323 public int getOffsetForAdvance(CharSequence text, int start, int end, int contextStart, in getOffsetForAdvance() argument
3328 if ((contextStart | start | end | contextEnd in getOffsetForAdvance()
3329 | start - contextStart | end - start | contextEnd - end in getOffsetForAdvance()
3336 int result = getOffsetForAdvance(buf, start - contextStart, end - contextStart, 0, in getOffsetForAdvance()
3362 private static native float nGetTextAdvances(long paintPtr, String text, int start, int end, in nGetTextAdvances() argument
3370 private static native void nGetTextPath(long paintPtr, int bidiFlags, String text, int start, in nGetTextPath() argument
3372 private static native void nGetStringBounds(long nativePaint, String text, int start, int end, in nGetStringBounds() argument
3377 private static native float nGetRunAdvance(long paintPtr, char[] text, int start, int end, in nGetRunAdvance() argument
3379 private static native float nGetRunCharacterAdvance(long paintPtr, char[] text, int start, in nGetRunCharacterAdvance() argument
3382 private static native int nGetOffsetForAdvance(long paintPtr, char[] text, int start, int end, in nGetOffsetForAdvance() argument
3385 int start, int count, int ctxStart, int ctxCount, boolean isRtl, in nGetFontMetricsIntForText() argument
3388 int start, int count, int ctxStart, int ctxCount, boolean isRtl, in nGetFontMetricsIntForText() argument