android-Paint-getTextBounds参数详解

官网API:

getTextBounds

Added in  API level 1
void getTextBounds (String text, 
                int start, 
                int end, 
                Rect bounds)

Return in bounds (allocated by the caller) the smallest rectangle that encloses all of the characters, with an implied origin at (0,0).由调用者返回在边界(分配)的最小矩形包含所有的字符,以隐含原点(0,0)。

Parameters
text String: String to measure and return its bounds 字符串来衡量并返回它的界限
start int: Index of the first char in the string to measure 索引的第一个字符的字符串来衡量
end int: 1 past the last char in the string measure 1过去的最后一个字符字符串
bounds Rect: Returns the unioned bounds of all the text. Must be allocated by the caller.返回联合边界的所有文本。必须分配给调用者。

getTextBounds

Added in  API level 1
void getTextBounds (char[] text, 
                int index, 
                int count, 
                Rect bounds)

Return in bounds (allocated by the caller) the smallest rectangle that encloses all of the characters, with an implied origin at (0,0).由调用者返回在边界(分配)的最小矩形包含所有的字符,以隐含原点(0,0)。

Parameters
text char: Array of chars to measure and return their unioned bounds数组的字符来衡量并返回他们的联合
index int: Index of the first char in the array to measure第一个字符的索引数组来衡量
count int: The number of chars, beginning at index, to measure字符的数量,从指数来衡量
bounds Rect: Returns the unioned bounds of all the text. Must be allocated by the caller.返回联合边界的所有文本。必须分配给调用者。

你可能感兴趣的:(翻译-android)