/** * Return the path (outline) for the specified text. Note: just like Canvas.drawText, this will * respect the Align setting in the paint. * * @param text The text to retrieve the path from * @param start The first character in the text * @param end 1 past the last charcter in the text * @param x The x coordinate of the text's origin * @param y The y coordinate of the text's origin * @param path The path to receive the data describing the text. Must be allocated by the caller. */ public void getTextPath(String text, int start, int end, float x, float y, Path path) { if ((start | end | (end - start) | (text.length() - end)) < 0) { throw new IndexOutOfBoundsException(); } native_getTextPath(mNativePaint, text, start, end, x, y, path.ni()); }
/** * Return the path (outline) for the specified text. Note: just like Canvas.drawText, this will * respect the Align setting in the paint. * * @param text The text to retrieve the path from * @param index The index of the first character in text * @param count The number of characterss starting with index * @param x The x coordinate of the text's origin * @param y The y coordinate of the text's origin * @param path The path to receive the data describing the text. Must be allocated by the caller. */ public void getTextPath(char[] text, int index, int count, float x, float y, Path path) { if ((index | count) < 0 || index + count > text.length) { throw new ArrayIndexOutOfBoundsException(); } native_getTextPath(mNativePaint, text, index, count, x, y, path.ni()); }