SpannableStringBuilder.GetTextRunCursor 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
deprecated
回傳該行程中的下一個游標位置。
[Android.Runtime.Register("getTextRunCursor", "(IIIIILandroid/graphics/Paint;)I", "GetGetTextRunCursor_IIIIILandroid_graphics_Paint_Handler")]
[System.Obsolete("deprecated")]
public virtual int GetTextRunCursor(int contextStart, int contextEnd, int dir, int offset, int cursorOpt, Android.Graphics.Paint? p);
[<Android.Runtime.Register("getTextRunCursor", "(IIIIILandroid/graphics/Paint;)I", "GetGetTextRunCursor_IIIIILandroid_graphics_Paint_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member GetTextRunCursor : int * int * int * int * int * Android.Graphics.Paint -> int
override this.GetTextRunCursor : int * int * int * int * int * Android.Graphics.Paint -> int
參數
- contextStart
- Int32
上下文的起始索引
- contextEnd
- Int32
上下文的(非包含)端點索引
- dir
- Int32
如果是 RTL 則為 1,否則為 0
- offset
- Int32
游標位置
- cursorOpt
- Int32
如何移動游標,無論是CURSOR_AFTER、CURSOR_AT_OR_AFTER、CURSOR_BEFORE、CURSOR_AT_OR_BEFORE或CURSOR_AT
- p
- Paint
請求此資訊的 Paint 物件
傳回
下一個位置的偏移量,或 -1
- 屬性
備註
回傳該行程中的下一個游標位置。 這避免將游標置於代理節點之間、形成合詞的字元之間、基底字元與合併標記之間,或是重新排序的叢集中。
情境是游標移動的塑形情境,通常是包圍游標在移動方向上的度量跨度的邊界。
contextStart, contextEnd 和 offset 相對於字串的起始點。
若 cursorOpt CURSOR_AT且偏移量不是有效的游標位置,則回傳 -1。 否則,這永遠不會在 contextStart 之前或 contextEnd 之後回傳一個值。
此會員已被棄用。 這是內部方法,請避免在程式碼中使用
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。