Paint.GetRunAdvance 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
GetRunAdvance(ICharSequence, Int32, Int32, Int32, Int32, Boolean, Int32)
[Android.Runtime.Register("getRunAdvance", "(Ljava/lang/CharSequence;IIIIZI)F", "GetGetRunAdvance_Ljava_lang_CharSequence_IIIIZIHandler", ApiSince=23)]
public virtual float GetRunAdvance(Java.Lang.ICharSequence? text, int start, int end, int contextStart, int contextEnd, bool isRtl, int offset);
[<Android.Runtime.Register("getRunAdvance", "(Ljava/lang/CharSequence;IIIIZI)F", "GetGetRunAdvance_Ljava_lang_CharSequence_IIIIZIHandler", ApiSince=23)>]
abstract member GetRunAdvance : Java.Lang.ICharSequence * int * int * int * int * bool * int -> single
override this.GetRunAdvance : Java.Lang.ICharSequence * int * int * int * int * bool * int -> single
參數
- text
- ICharSequence
要衡量的文本。 不可為空值。
- start
- Int32
測量範圍起點的指數
- end
- Int32
測量範圍末端的指數 + 1
- contextStart
- Int32
形成上下文起始點的索引
- contextEnd
- Int32
整形上下文末端的指數 + 1
- isRtl
- Boolean
跑道是否朝 RTL 方向
- offset
- Int32
Caret 位置指數
傳回
起始與偏移之間的寬度測量
- 屬性
備註
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
GetRunAdvance(Char[], Int32, Int32, Int32, Int32, Boolean, Int32)
測量一串文字中的游標位置。
[Android.Runtime.Register("getRunAdvance", "([CIIIIZI)F", "GetGetRunAdvance_arrayCIIIIZIHandler", ApiSince=23)]
public virtual float GetRunAdvance(char[]? text, int start, int end, int contextStart, int contextEnd, bool isRtl, int offset);
[<Android.Runtime.Register("getRunAdvance", "([CIIIIZI)F", "GetGetRunAdvance_arrayCIIIIZIHandler", ApiSince=23)>]
abstract member GetRunAdvance : char[] * int * int * int * int * bool * int -> single
override this.GetRunAdvance : char[] * int * int * int * int * bool * int -> single
參數
- text
- Char[]
要衡量的文本。 不可為空值。
- start
- Int32
測量範圍起點的指數
- end
- Int32
測量範圍末端的指數 + 1
- contextStart
- Int32
形成上下文起始點的索引
- contextEnd
- Int32
整形上下文末端的指數 + 1
- isRtl
- Boolean
跑道是否朝 RTL 方向
- offset
- Int32
Caret 位置指數
傳回
起始與偏移之間的寬度測量
- 屬性
備註
測量一串文字中的游標位置。
文字串包含了從 start 到的 end 字元。 此外, contextStart 範圍 也 contextEnd 用作複雜文本形狀的上下文,例如阿拉伯文文本可能因旁邊文字而有不同形狀。
範圍外 contextStart..contextEnd 的所有文字都會被忽略。 與start之間的文字end將被排版以便測量。
回傳寬度測量是從 start 前進到 offset的前進。 無論跑向何方,通常都是正值。 若 offset == end,則返回值即為從 start 到 end的整個行程寬度。
連字會為該範圍 start..end 的字元形成(但不適用於 start..contextStart 或 end..contextEnd)。 如果 offset 指向該連字中間的字元,但位於字素群邊界,回傳值也會反映連字中間的前進。 關於字素簇邊界的更多討論,請參見 #getOffsetForAdvance 。
跑道方向由 明確指定 isRtl。 因此,此方法僅適用於單向的連續。
所有指標均相對於 的 text起始點。 此外, 0 <= contextStart <= start <= offset <= end <= contextEnd <= text.length 必須在進入時保留。
Java 文件 android.graphics.Paint.getRunAdvance(char[], int, int, int, int, boolean, int)。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
GetRunAdvance(String, Int32, Int32, Int32, Int32, Boolean, Int32)
回傳起始與偏移之間的寬度測量值。
public float GetRunAdvance(string? text, int start, int end, int contextStart, int contextEnd, bool isRtl, int offset);
member this.GetRunAdvance : string * int * int * int * int * bool * int -> single
參數
- text
- String
要衡量的文本。 不可為空值。
- start
- Int32
測量範圍起點的指數
- end
- Int32
測量範圍末端的指數 + 1
- contextStart
- Int32
形成上下文起始點的索引
- contextEnd
- Int32
整形上下文末端的指數 + 1
- isRtl
- Boolean
跑道是否朝 RTL 方向
- offset
- Int32
Caret 位置指數
傳回
起始與偏移之間的寬度測量
備註
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。