Paint.GetTextWidths 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| GetTextWidths(String, Single[]) |
返回字符串中字符的前进宽度。 |
| GetTextWidths(ICharSequence, Int32, Int32, Single[]) |
返回字符串中字符的前进宽度。 |
| GetTextWidths(Char[], Int32, Int32, Single[]) |
返回字符串中字符的前进宽度。 |
| GetTextWidths(String, Int32, Int32, Single[]) |
返回字符串中字符的前进宽度。 |
GetTextWidths(String, Single[])
返回字符串中字符的前进宽度。
[Android.Runtime.Register("getTextWidths", "(Ljava/lang/String;[F)I", "GetGetTextWidths_Ljava_lang_String_arrayFHandler")]
public virtual int GetTextWidths(string? text, float[]? widths);
[<Android.Runtime.Register("getTextWidths", "(Ljava/lang/String;[F)I", "GetGetTextWidths_Ljava_lang_String_arrayFHandler")>]
abstract member GetTextWidths : string * single[] -> int
override this.GetTextWidths : string * single[] -> int
参数
- text
- String
要度量的文本
- widths
- Single[]
要接收字符的前进宽度的数组。 必须至少是文本的大小。
返回
指定文本中的代码单元数。
- 属性
注解
返回字符串中字符的前进宽度。
Java文档android.graphics.Paint.getTextWidths(java.lang.String, float[])。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
GetTextWidths(ICharSequence, Int32, Int32, Single[])
返回字符串中字符的前进宽度。
[Android.Runtime.Register("getTextWidths", "(Ljava/lang/CharSequence;II[F)I", "GetGetTextWidths_Ljava_lang_CharSequence_IIarrayFHandler")]
public virtual int GetTextWidths(Java.Lang.ICharSequence? text, int start, int end, float[]? widths);
[<Android.Runtime.Register("getTextWidths", "(Ljava/lang/CharSequence;II[F)I", "GetGetTextWidths_Ljava_lang_CharSequence_IIarrayFHandler")>]
abstract member GetTextWidths : Java.Lang.ICharSequence * int * int * single[] -> int
override this.GetTextWidths : Java.Lang.ICharSequence * int * int * single[] -> int
参数
- text
- ICharSequence
要度量的文本。 不能为 null。
- start
- Int32
要度量的第一个字符的索引
- end
- Int32
要度量的文本切片的末尾
- widths
- Single[]
要接收字符的前进宽度的数组。 必须至少是一个大的 (结束 - 开始)。
返回
返回的实际宽度数。
- 属性
注解
返回字符串中字符的前进宽度。
Java文档android.graphics.Paint.getTextWidths(java.lang.CharSequence, int, int, float[])。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
GetTextWidths(Char[], Int32, Int32, Single[])
返回字符串中字符的前进宽度。
[Android.Runtime.Register("getTextWidths", "([CII[F)I", "GetGetTextWidths_arrayCIIarrayFHandler")]
public virtual int GetTextWidths(char[]? text, int index, int count, float[]? widths);
[<Android.Runtime.Register("getTextWidths", "([CII[F)I", "GetGetTextWidths_arrayCIIarrayFHandler")>]
abstract member GetTextWidths : char[] * int * int * single[] -> int
override this.GetTextWidths : char[] * int * int * single[] -> int
参数
- text
- Char[]
要度量的文本。 不能为 null。
- index
- Int32
要度量的第一个字符的索引
- count
- Int32
要度量的索引开头的字符数
- widths
- Single[]
要接收字符的前进宽度的数组。 必须至少是一个大的计数。
返回
返回的实际宽度数。
- 属性
注解
返回字符串中字符的前进宽度。
Java文档android.graphics.Paint.getTextWidths(char[], int, int, float[])。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
GetTextWidths(String, Int32, Int32, Single[])
返回字符串中字符的前进宽度。
[Android.Runtime.Register("getTextWidths", "(Ljava/lang/String;II[F)I", "GetGetTextWidths_Ljava_lang_String_IIarrayFHandler")]
public virtual int GetTextWidths(string? text, int start, int end, float[]? widths);
[<Android.Runtime.Register("getTextWidths", "(Ljava/lang/String;II[F)I", "GetGetTextWidths_Ljava_lang_String_IIarrayFHandler")>]
abstract member GetTextWidths : string * int * int * single[] -> int
override this.GetTextWidths : string * int * int * single[] -> int
参数
- text
- String
要度量的文本。 不能为 null。
- start
- Int32
要度量的第一个字符的索引
- end
- Int32
要度量的文本切片的末尾
- widths
- Single[]
要接收字符的前进宽度的数组。 必须至少是文本的大小。
返回
指定文本中的代码单元数。
- 属性
注解
返回字符串中字符的前进宽度。
Java文档android.graphics.Paint.getTextWidths(java.lang.String, int, int, float[])。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。