android-Paint-getTextBounds参数详解
16lz
2021-01-26
官网API:
getTextBounds
Added in API level 1void 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 1void 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.返回联合边界的所有文本。必须分配给调用者。 |
更多相关文章
- Tasks and Back Stack任务与返回堆
- Android自定义ViewGroup神器-ViewDragHelper
- Android(安卓)APP修改全局字体
- Android输入法弹出流程
- Android过滤特殊字符和emoji表情
- ContentProvider使用详解
- android 精确定位
- android音乐播放器开发 SweetMusicPlayer 加载歌曲列表
- android 事件模型