語言

Canvas.DrawText 方法

定義

多載

名稱 Description
DrawText(String, Single, Single, Paint)

用指定的顏料繪製原點為 (x,y) 的文字。

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

在指定的 Paint 中繪製指定的文字範圍,以開始/結束為起點,起點為 (x,y)。

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

用指定的顏料繪製原點為 (x,y) 的文字。

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

用指定的顏料繪製原點為 (x,y) 的文字。

DrawText(String, Single, Single, Paint)

用指定的顏料繪製原點為 (x,y) 的文字。

[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

參數

text
String

要繪製的文字

x
Single

繪製文本原點的 x 座標

y
Single

所繪文字基線的 y 座標

paint
Paint

文字所用的顏料(例如顏色、大小、風格)

屬性

備註

用指定的顏料繪製原點為 (x,y) 的文字。 原點是根據塗裝中的對齊設定來解讀的。

Java 文件 android.graphics.Canvas.drawText(java.lang.String, float, float, android.graphics.Paint)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

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

在指定的 Paint 中繪製指定的文字範圍,以開始/結束為起點,起點為 (x,y)。

[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

參數

text
ICharSequence

要繪製的文字

start
Int32

文字中第一個要繪製字元的索引

end
Int32

(end - 1) 是文字中最後一個要繪製字元的索引

x
Single

繪製文字的原點座標

y
Single

繪製文本的原點 y 座標

paint
Paint

文字所用的顏料(例如顏色、大小、風格)

屬性

備註

在指定的 Paint 中繪製指定的文字範圍,以開始/結束為起點,起點為 (x,y)。 原點是根據 Paint 裡的 Align 設定來解讀的。

Java 文件 android.graphics.Canvas.drawText(java.lang.CharSequence, int, int, float, float, android.graphics.Paint)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

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

用指定的顏料繪製原點為 (x,y) 的文字。

[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

參數

text
Char[]

要繪製的文字

index
Int32
count
Int32
x
Single

繪製文本原點的 x 座標

y
Single

所繪文字基線的 y 座標

paint
Paint

文字所用的顏料(例如顏色、大小、風格)

屬性

備註

用指定的顏料繪製原點為 (x,y) 的文字。 原點是根據塗裝中的對齊設定來解讀的。

Java 文件 android.graphics.Canvas.drawText(char[], int, int, float, float, android.graphics.Paint)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於

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

用指定的顏料繪製原點為 (x,y) 的文字。

[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

參數

text
String

要繪製的文字

start
Int32

文字中第一個要繪製字元的索引

end
Int32

(end - 1) 是文字中最後一個要繪製字元的索引

x
Single

繪製文本原點的 x 座標

y
Single

所繪文字基線的 y 座標

paint
Paint

文字所用的顏料(例如顏色、大小、風格)

屬性

備註

用指定的顏料繪製原點為 (x,y) 的文字。 原點是根據塗裝中的對齊設定來解讀的。

Java 文件 android.graphics.Canvas.drawText(java.lang.String, int, int, float, float, android.graphics.Paint)。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於