Sdílet prostřednictvím


Canvas.DrawText Method

Definition

Overloads

DrawText(String, Single, Single, Paint)

Draw the text, with origin at (x,y), using the specified paint.

DrawText(ICharSequence, Int32, Int32, Single, Single, Paint)

Draw the specified range of text, specified by start/end, with its origin at (x,y), in the specified Paint.

DrawText(Char[], Int32, Int32, Single, Single, Paint)

Draw the text, with origin at (x,y), using the specified paint.

DrawText(String, Int32, Int32, Single, Single, Paint)

Draw the text, with origin at (x,y), using the specified paint.

DrawText(String, Single, Single, Paint)

Draw the text, with origin at (x,y), using the specified paint.

[Android.Runtime.Register("drawText", "(Ljava/lang/String;FFLandroid/graphics/Paint;)V", "GetDrawText_Ljava_lang_String_FFLandroid_graphics_Paint_Handler")]
public virtual void DrawText (string text, float x, float y, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawText", "(Ljava/lang/String;FFLandroid/graphics/Paint;)V", "GetDrawText_Ljava_lang_String_FFLandroid_graphics_Paint_Handler")>]
abstract member DrawText : string * single * single * Android.Graphics.Paint -> unit
override this.DrawText : string * single * single * Android.Graphics.Paint -> unit

Parameters

text
String

The text to be drawn

x
Single

The x-coordinate of the origin of the text being drawn

y
Single

The y-coordinate of the baseline of the text being drawn

paint
Paint

The paint used for the text (e.g. color, size, style)

Attributes

Remarks

Draw the text, with origin at (x,y), using the specified paint. The origin is interpreted based on the Align setting in the paint.

Java documentation for android.graphics.Canvas.drawText(java.lang.String, float, float, android.graphics.Paint).

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

DrawText(ICharSequence, Int32, Int32, Single, Single, Paint)

Draw the specified range of text, specified by start/end, with its origin at (x,y), in the specified Paint.

[Android.Runtime.Register("drawText", "(Ljava/lang/CharSequence;IIFFLandroid/graphics/Paint;)V", "GetDrawText_Ljava_lang_CharSequence_IIFFLandroid_graphics_Paint_Handler")]
public virtual void DrawText (Java.Lang.ICharSequence text, int start, int end, float x, float y, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawText", "(Ljava/lang/CharSequence;IIFFLandroid/graphics/Paint;)V", "GetDrawText_Ljava_lang_CharSequence_IIFFLandroid_graphics_Paint_Handler")>]
abstract member DrawText : Java.Lang.ICharSequence * int * int * single * single * Android.Graphics.Paint -> unit
override this.DrawText : Java.Lang.ICharSequence * int * int * single * single * Android.Graphics.Paint -> unit

Parameters

text
ICharSequence

The text to be drawn

start
Int32

The index of the first character in text to draw

end
Int32

(end - 1) is the index of the last character in text to draw

x
Single

The x-coordinate of origin for where to draw the text

y
Single

The y-coordinate of origin for where to draw the text

paint
Paint

The paint used for the text (e.g. color, size, style)

Attributes

Remarks

Draw the specified range of text, specified by start/end, with its origin at (x,y), in the specified Paint. The origin is interpreted based on the Align setting in the Paint.

Java documentation for android.graphics.Canvas.drawText(java.lang.CharSequence, int, int, float, float, android.graphics.Paint).

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

DrawText(Char[], Int32, Int32, Single, Single, Paint)

Draw the text, with origin at (x,y), using the specified paint.

[Android.Runtime.Register("drawText", "([CIIFFLandroid/graphics/Paint;)V", "GetDrawText_arrayCIIFFLandroid_graphics_Paint_Handler")]
public virtual void DrawText (char[] text, int index, int count, float x, float y, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawText", "([CIIFFLandroid/graphics/Paint;)V", "GetDrawText_arrayCIIFFLandroid_graphics_Paint_Handler")>]
abstract member DrawText : char[] * int * int * single * single * Android.Graphics.Paint -> unit
override this.DrawText : char[] * int * int * single * single * Android.Graphics.Paint -> unit

Parameters

text
Char[]

The text to be drawn

index
Int32
count
Int32
x
Single

The x-coordinate of the origin of the text being drawn

y
Single

The y-coordinate of the baseline of the text being drawn

paint
Paint

The paint used for the text (e.g. color, size, style)

Attributes

Remarks

Draw the text, with origin at (x,y), using the specified paint. The origin is interpreted based on the Align setting in the paint.

Java documentation for android.graphics.Canvas.drawText(char[], int, int, float, float, android.graphics.Paint).

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

DrawText(String, Int32, Int32, Single, Single, Paint)

Draw the text, with origin at (x,y), using the specified paint.

[Android.Runtime.Register("drawText", "(Ljava/lang/String;IIFFLandroid/graphics/Paint;)V", "GetDrawText_Ljava_lang_String_IIFFLandroid_graphics_Paint_Handler")]
public virtual void DrawText (string text, int start, int end, float x, float y, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawText", "(Ljava/lang/String;IIFFLandroid/graphics/Paint;)V", "GetDrawText_Ljava_lang_String_IIFFLandroid_graphics_Paint_Handler")>]
abstract member DrawText : string * int * int * single * single * Android.Graphics.Paint -> unit
override this.DrawText : string * int * int * single * single * Android.Graphics.Paint -> unit

Parameters

text
String

The text to be drawn

start
Int32

The index of the first character in text to draw

end
Int32

(end - 1) is the index of the last character in text to draw

x
Single

The x-coordinate of the origin of the text being drawn

y
Single

The y-coordinate of the baseline of the text being drawn

paint
Paint

The paint used for the text (e.g. color, size, style)

Attributes

Remarks

Draw the text, with origin at (x,y), using the specified paint. The origin is interpreted based on the Align setting in the paint.

Java documentation for android.graphics.Canvas.drawText(java.lang.String, int, int, float, float, android.graphics.Paint).

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