语言

MeasuredText.GetCharWidthAt(Int32) 方法

定义

返回给定偏移量处字符的宽度。

[Android.Runtime.Register("getCharWidthAt", "(I)F", "GetGetCharWidthAt_IHandler", ApiSince=29)]
public virtual float GetCharWidthAt(int offset);
[<Android.Runtime.Register("getCharWidthAt", "(I)F", "GetGetCharWidthAt_IHandler", ApiSince=29)>]
abstract member GetCharWidthAt : int -> single
override this.GetCharWidthAt : int -> single

参数

offset
Int32

字符的偏移量。

返回

给定 UTF-16 代码单位偏移量的前进宽度(以像素为单位)。 偏移量必须是非负值且小于段落的 UTF-16 长度。

特性

注解

返回给定偏移量处字符的宽度。

Java文档android.graphics.text.MeasuredText.getCharWidthAt(int)。

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于