Paint.GetTextWidths Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetTextWidths(String, Single[]) |
Return the advance widths for the characters in the string. |
GetTextWidths(ICharSequence, Int32, Int32, Single[]) |
Return the advance widths for the characters in the string. |
GetTextWidths(Char[], Int32, Int32, Single[]) |
Return the advance widths for the characters in the string. |
GetTextWidths(String, Int32, Int32, Single[]) |
Return the advance widths for the characters in the string. |
GetTextWidths(String, Single[])
Return the advance widths for the characters in the string.
[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
Parameters
- text
- String
The text to measure
- widths
- Single[]
array to receive the advance widths of the characters. Must be at least a large as the text.
Returns
the number of code units in the specified text.
- Attributes
Remarks
Return the advance widths for the characters in the string.
Java documentation for android.graphics.Paint.getTextWidths(java.lang.String, float[])
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
GetTextWidths(ICharSequence, Int32, Int32, Single[])
Return the advance widths for the characters in the string.
[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
Parameters
- text
- ICharSequence
The text to measure. Cannot be null.
- start
- Int32
The index of the first char to to measure
- end
- Int32
The end of the text slice to measure
- widths
- Single[]
array to receive the advance widths of the characters. Must be at least a large as (end - start).
Returns
the actual number of widths returned.
- Attributes
Remarks
Return the advance widths for the characters in the string.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
GetTextWidths(Char[], Int32, Int32, Single[])
Return the advance widths for the characters in the string.
[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
Parameters
- text
- Char[]
The text to measure. Cannot be null.
- index
- Int32
The index of the first char to to measure
- count
- Int32
The number of chars starting with index to measure
- widths
- Single[]
array to receive the advance widths of the characters. Must be at least a large as count.
Returns
the actual number of widths returned.
- Attributes
Remarks
Return the advance widths for the characters in the string.
Java documentation for android.graphics.Paint.getTextWidths(char[], int, int, float[])
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
GetTextWidths(String, Int32, Int32, Single[])
Return the advance widths for the characters in the string.
[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
Parameters
- text
- String
The text to measure. Cannot be null.
- start
- Int32
The index of the first char to to measure
- end
- Int32
The end of the text slice to measure
- widths
- Single[]
array to receive the advance widths of the characters. Must be at least a large as the text.
Returns
the number of code units in the specified text.
- Attributes
Remarks
Return the advance widths for the characters in the string.
Java documentation for android.graphics.Paint.getTextWidths(java.lang.String, int, int, float[])
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.