語言

RecordingCanvas.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", "", ApiSince=29)]
public override sealed void DrawText(string text, float x, float y, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawText", "(Ljava/lang/String;FFLandroid/graphics/Paint;)V", "", ApiSince=29)>]
override this.DrawText : string * single * single * Android.Graphics.Paint -> unit

參數

text
String
x
Single

繪製文本原點的 x 座標

y
Single

所繪文字基線的 y 座標

paint
Paint
屬性

備註

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

Android 參考資料。android.graphics.RecordingCanvas.drawText

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

適用於

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

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

[Android.Runtime.Register("drawText", "(Ljava/lang/CharSequence;IIFFLandroid/graphics/Paint;)V", "", ApiSince=29)]
public override sealed 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", "", ApiSince=29)>]
override this.DrawText : Java.Lang.ICharSequence * int * int * single * single * Android.Graphics.Paint -> unit

參數

start
Int32

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

end
Int32

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

x
Single

繪製文字的原點座標

y
Single

繪製文本的原點 y 座標

paint
Paint
屬性

備註

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

Android 參考資料。android.graphics.RecordingCanvas.drawText

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

適用於

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

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

[Android.Runtime.Register("drawText", "([CIIFFLandroid/graphics/Paint;)V", "", ApiSince=29)]
public override sealed void DrawText(char[] text, int index, int count, float x, float y, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawText", "([CIIFFLandroid/graphics/Paint;)V", "", ApiSince=29)>]
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) 的文字。 原點是根據塗裝中的對齊設定來解讀的。

Android 參考資料。android.graphics.RecordingCanvas.drawText

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

適用於

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

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

[Android.Runtime.Register("drawText", "(Ljava/lang/String;IIFFLandroid/graphics/Paint;)V", "", ApiSince=29)]
public override sealed 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", "", ApiSince=29)>]
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) 的文字。 原點是根據塗裝中的對齊設定來解讀的。

Android 參考資料。android.graphics.RecordingCanvas.drawText

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

適用於