語言

Canvas.DrawTextRun 方法

定義

多載

名稱 Description
DrawTextRun(MeasuredText, Int32, Int32, Int32, Int32, Single, Single, Boolean, Paint)

畫出一連串文字,全部朝單一方向,並可選擇為複雜文字形狀提供上下文。

DrawTextRun(ICharSequence, Int32, Int32, Int32, Int32, Single, Single, Boolean, Paint)

畫出一連串文字,全部朝單一方向,並可選擇為複雜文字形狀提供上下文。

DrawTextRun(Char[], Int32, Int32, Int32, Int32, Single, Single, Boolean, Paint)

畫出一連串文字,全部朝單一方向,並可選擇為複雜文字形狀提供上下文。

DrawTextRun(String, Int32, Int32, Int32, Int32, Single, Single, Boolean, Paint)

畫出一連串文字,全部朝單一方向,並可選擇為複雜文字形狀提供上下文。

DrawTextRun(MeasuredText, Int32, Int32, Int32, Int32, Single, Single, Boolean, Paint)

畫出一連串文字,全部朝單一方向,並可選擇為複雜文字形狀提供上下文。

[Android.Runtime.Register("drawTextRun", "(Landroid/graphics/text/MeasuredText;IIIIFFZLandroid/graphics/Paint;)V", "GetDrawTextRun_Landroid_graphics_text_MeasuredText_IIIIFFZLandroid_graphics_Paint_Handler", ApiSince=29)]
public virtual void DrawTextRun(Android.Graphics.Text.MeasuredText text, int start, int end, int contextStart, int contextEnd, float x, float y, bool isRtl, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawTextRun", "(Landroid/graphics/text/MeasuredText;IIIIFFZLandroid/graphics/Paint;)V", "GetDrawTextRun_Landroid_graphics_text_MeasuredText_IIIIFFZLandroid_graphics_Paint_Handler", ApiSince=29)>]
abstract member DrawTextRun : Android.Graphics.Text.MeasuredText * int * int * int * int * single * single * bool * Android.Graphics.Paint -> unit
override this.DrawTextRun : Android.Graphics.Text.MeasuredText * int * int * int * int * single * single * bool * Android.Graphics.Paint -> unit

參數

text
MeasuredText

要渲染的文字

start
Int32

文字開始時要渲染。 在此立場之前的數據可用於塑造背景。

end
Int32

文字的結尾要渲染。 此位置或之後的資料可用於塑造上下文。

contextStart
Int32

形成上下文起始點的索引

contextEnd
Int32

形狀上下文結束的指標

x
Single

繪製文字的 x 位置

y
Single

繪製文字的Y位

isRtl
Boolean

跑道是否朝 RTL 方向

paint
Paint

油漆

屬性

備註

畫出一連串文字,全部朝單一方向,並可選擇為複雜文字形狀提供上下文。

如需詳細資訊,請參閱 #drawTextRun(CharSequence, int, int, int, int, float, float, boolean, Paint)。 此方法使用 CharSequence MeasuredText 而非 CharSequence 來表示字串。

Java 文件 android.graphics.Canvas.drawTextRun(android.graphics.text.MeasuredText, int, int, int, int, float, float, boolean, android.graphics.Paint)。

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

適用於

DrawTextRun(ICharSequence, Int32, Int32, Int32, Int32, Single, Single, Boolean, Paint)

畫出一連串文字,全部朝單一方向,並可選擇為複雜文字形狀提供上下文。

[Android.Runtime.Register("drawTextRun", "(Ljava/lang/CharSequence;IIIIFFZLandroid/graphics/Paint;)V", "GetDrawTextRun_Ljava_lang_CharSequence_IIIIFFZLandroid_graphics_Paint_Handler", ApiSince=23)]
public virtual void DrawTextRun(Java.Lang.ICharSequence text, int start, int end, int contextStart, int contextEnd, float x, float y, bool isRtl, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawTextRun", "(Ljava/lang/CharSequence;IIIIFFZLandroid/graphics/Paint;)V", "GetDrawTextRun_Ljava_lang_CharSequence_IIIIFFZLandroid_graphics_Paint_Handler", ApiSince=23)>]
abstract member DrawTextRun : Java.Lang.ICharSequence * int * int * int * int * single * single * bool * Android.Graphics.Paint -> unit
override this.DrawTextRun : Java.Lang.ICharSequence * int * int * int * int * single * single * bool * Android.Graphics.Paint -> unit

參數

text
ICharSequence

要渲染的文字

start
Int32

文字開始時要渲染。 在此立場之前的數據可用於塑造背景。

end
Int32

文字的結尾要渲染。 此位置或之後的資料可用於塑造上下文。

contextStart
Int32

形成上下文起始點的索引

contextEnd
Int32

形狀上下文結束的指標

x
Single

繪製文字的 x 位置

y
Single

繪製文字的Y位

isRtl
Boolean

跑道是否朝 RTL 方向

paint
Paint

油漆

屬性

備註

畫出一連串文字,全部朝單一方向,並可選擇為複雜文字形狀提供上下文。

文字串包含了從 start 到的 end 字元。 此外, contextStart 範圍 也 contextEnd 用作複雜文本形狀的上下文,例如阿拉伯文文本可能因旁邊文字而有不同形狀。

範圍外 contextStart..contextEnd 的所有文字都會被忽略。 與end之間的start文字會被排版並繪製。 上下文範圍對於上下文塑造非常有用,例如字距調整(Kerning)、阿拉伯語上下文形式。

跑道方向由 明確指定 isRtl。 因此,此方法僅適用於單向的連續。 文字的對齊由 Paint 的 TextAlign 值決定。 此外, 0 <= contextStart <= start <= end <= contextEnd <= text.length 必須在進入時保留。

另請參閱 android.graphics.Paint#getRunAdvance 對應的文字測量方法;繪製文字的前寬與該方法所得值相符。

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

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

適用於

DrawTextRun(Char[], Int32, Int32, Int32, Int32, Single, Single, Boolean, Paint)

畫出一連串文字,全部朝單一方向,並可選擇為複雜文字形狀提供上下文。

[Android.Runtime.Register("drawTextRun", "([CIIIIFFZLandroid/graphics/Paint;)V", "GetDrawTextRun_arrayCIIIIFFZLandroid_graphics_Paint_Handler", ApiSince=23)]
public virtual void DrawTextRun(char[] text, int index, int count, int contextIndex, int contextCount, float x, float y, bool isRtl, Android.Graphics.Paint paint);
[<Android.Runtime.Register("drawTextRun", "([CIIIIFFZLandroid/graphics/Paint;)V", "GetDrawTextRun_arrayCIIIIFFZLandroid_graphics_Paint_Handler", ApiSince=23)>]
abstract member DrawTextRun : char[] * int * int * int * int * single * single * bool * Android.Graphics.Paint -> unit
override this.DrawTextRun : char[] * int * int * int * int * single * single * bool * Android.Graphics.Paint -> unit

參數

text
Char[]

要渲染的文字

index
Int32

要渲染的文字起始

count
Int32

查爾斯伯爵要交代

contextIndex
Int32

塑造的脈絡起點。 不能超過指數。

contextCount
Int32

在塑造語境中字元數量。 contexIndex + contextCount 必須不小於 index + count。

x
Single

繪製文字的 x 位置

y
Single

繪製文字的Y位

isRtl
Boolean

跑道是否朝 RTL 方向

paint
Paint

油漆

屬性

備註

畫出一連串文字,全部朝單一方向,並可選擇為複雜文字形狀提供上下文。

如需詳細資訊,請參閱 #drawTextRun(CharSequence, int, int, int, int, float, float, boolean, Paint)。 此方法使用字元陣列而非 CharSequence 來表示字串。 此外,為了與 中#drawText建立的模式一致,在此方法count中 和 contextCount 使用 ,取代了端位置的偏移; count = end - start, contextCount = contextEnd - contextStart

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

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

適用於

DrawTextRun(String, Int32, Int32, Int32, Int32, Single, Single, Boolean, Paint)

畫出一連串文字,全部朝單一方向,並可選擇為複雜文字形狀提供上下文。

public void DrawTextRun(string text, int start, int end, int contextStart, int contextEnd, float x, float y, bool isRtl, Android.Graphics.Paint paint);
member this.DrawTextRun : string * int * int * int * int * single * single * bool * Android.Graphics.Paint -> unit

參數

text
String

要渲染的文字

start
Int32

文字開始時要渲染。 在此立場之前的數據可用於塑造背景。

end
Int32

文字的結尾要渲染。 此位置或之後的資料可用於塑造上下文。

contextStart
Int32

形成上下文起始點的索引

contextEnd
Int32

形狀上下文結束的指標

x
Single

繪製文字的 x 位置

y
Single

繪製文字的Y位

isRtl
Boolean

跑道是否朝 RTL 方向

paint
Paint

油漆

備註

畫出一連串文字,全部朝單一方向,並可選擇為複雜文字形狀提供上下文。

文字串包含了從 start 到的 end 字元。 此外, contextStart 範圍 也 contextEnd 用作複雜文本形狀的上下文,例如阿拉伯文文本可能因旁邊文字而有不同形狀。

範圍外 contextStart..contextEnd 的所有文字都會被忽略。 與end之間的start文字會被排版並繪製。 上下文範圍對於上下文塑造非常有用,例如字距調整(Kerning)、阿拉伯語上下文形式。

跑道方向由 明確指定 isRtl。 因此,此方法僅適用於單向的連續。 文字的對齊由 Paint 的 TextAlign 值決定。 此外, 0 <= contextStart <= start <= end <= contextEnd <= text.length 必須在進入時保留。

另請參閱 android.graphics.Paint#getRunAdvance 對應的文字測量方法;繪製文字的前寬與該方法所得值相符。

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

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

適用於