Paint.MeasureText 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
MeasureText(String, Int32, Int32) |
Return the width of the text. |
MeasureText(Char[], Int32, Int32) |
Return the width of the text. |
MeasureText(String) |
Return the width of the text. |
MeasureText(ICharSequence, Int32, Int32) |
Return the width of the text. |
MeasureText(String, Int32, Int32)
Return the width of the text.
[Android.Runtime.Register("measureText", "(Ljava/lang/String;II)F", "GetMeasureText_Ljava_lang_String_IIHandler")]
public virtual float MeasureText (string? text, int start, int end);
[<Android.Runtime.Register("measureText", "(Ljava/lang/String;II)F", "GetMeasureText_Ljava_lang_String_IIHandler")>]
abstract member MeasureText : string * int * int -> single
override this.MeasureText : string * int * int -> single
Parameters
- text
- String
The text to measure. Cannot be null.
- start
- Int32
The index of the first character to start measuring
- end
- Int32
1 beyond the index of the last character to measure
Returns
The width of the text
- Attributes
Remarks
Return the width of the text.
Java documentation for android.graphics.Paint.measureText(java.lang.String, int, int)
.
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
MeasureText(Char[], Int32, Int32)
Return the width of the text.
[Android.Runtime.Register("measureText", "([CII)F", "GetMeasureText_arrayCIIHandler")]
public virtual float MeasureText (char[]? text, int index, int count);
[<Android.Runtime.Register("measureText", "([CII)F", "GetMeasureText_arrayCIIHandler")>]
abstract member MeasureText : char[] * int * int -> single
override this.MeasureText : char[] * int * int -> single
Parameters
- text
- Char[]
The text to measure. Cannot be null.
- index
- Int32
The index of the first character to start measuring
- count
- Int32
THe number of characters to measure, beginning with start
Returns
The width of the text
- Attributes
Remarks
Return the width of the text.
Java documentation for android.graphics.Paint.measureText(char[], int, int)
.
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
MeasureText(String)
Return the width of the text.
[Android.Runtime.Register("measureText", "(Ljava/lang/String;)F", "GetMeasureText_Ljava_lang_String_Handler")]
public virtual float MeasureText (string? text);
[<Android.Runtime.Register("measureText", "(Ljava/lang/String;)F", "GetMeasureText_Ljava_lang_String_Handler")>]
abstract member MeasureText : string -> single
override this.MeasureText : string -> single
Parameters
- text
- String
The text to measure. Cannot be null.
Returns
The width of the text
- Attributes
Remarks
Return the width of the text.
Java documentation for android.graphics.Paint.measureText(java.lang.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
MeasureText(ICharSequence, Int32, Int32)
Return the width of the text.
[Android.Runtime.Register("measureText", "(Ljava/lang/CharSequence;II)F", "GetMeasureText_Ljava_lang_CharSequence_IIHandler")]
public virtual float MeasureText (Java.Lang.ICharSequence? text, int start, int end);
[<Android.Runtime.Register("measureText", "(Ljava/lang/CharSequence;II)F", "GetMeasureText_Ljava_lang_CharSequence_IIHandler")>]
abstract member MeasureText : Java.Lang.ICharSequence * int * int -> single
override this.MeasureText : Java.Lang.ICharSequence * int * int -> single
Parameters
- text
- ICharSequence
The text to measure
- start
- Int32
The index of the first character to start measuring
- end
- Int32
1 beyond the index of the last character to measure
Returns
The width of the text
- Attributes
Remarks
Return the width of the text.
Java documentation for android.graphics.Paint.measureText(java.lang.CharSequence, int, int)
.
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.