Paint.GetTextRunCursor Method

Definition

Overloads

GetTextRunCursor(Char[], Int32, Int32, Boolean, Int32, Int32)

Returns the next cursor position in the run.

GetTextRunCursor(String, Int32, Int32, Boolean, Int32, Int32)

Returns the next cursor position in the run.

GetTextRunCursor(ICharSequence, Int32, Int32, Boolean, Int32, Int32)

Returns the next cursor position in the run.

GetTextRunCursor(Char[], Int32, Int32, Boolean, Int32, Int32)

Returns the next cursor position in the run.

[Android.Runtime.Register("getTextRunCursor", "([CIIZII)I", "GetGetTextRunCursor_arrayCIIZIIHandler", ApiSince=29)]
public virtual int GetTextRunCursor (char[] text, int contextStart, int contextLength, bool isRtl, int offset, int cursorOpt);
[<Android.Runtime.Register("getTextRunCursor", "([CIIZII)I", "GetGetTextRunCursor_arrayCIIZIIHandler", ApiSince=29)>]
abstract member GetTextRunCursor : char[] * int * int * bool * int * int -> int
override this.GetTextRunCursor : char[] * int * int * bool * int * int -> int

Parameters

text
Char[]

the text

contextStart
Int32

the start of the context

contextLength
Int32

the length of the context

isRtl
Boolean

true if the paragraph context is RTL, otherwise false

offset
Int32

the cursor position to move from

cursorOpt
Int32

how to move the cursor

Returns

the offset of the next position, or -1

Attributes

Remarks

Returns the next cursor position in the run.

This avoids placing the cursor between surrogates, between characters that form conjuncts, between base characters and combining marks, or within a reordering cluster.

ContextStart and offset are relative to the start of text. The context is the shaping context for cursor movement, generally the bounds of the metric span enclosing the cursor in the direction of movement.

If cursorOpt is #CURSOR_AT and the offset is not a valid cursor position, this returns -1. Otherwise this will never return a value before contextStart or after contextStart + contextLength.

Java documentation for android.graphics.Paint.getTextRunCursor(char[], int, int, boolean, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

GetTextRunCursor(String, Int32, Int32, Boolean, Int32, Int32)

Returns the next cursor position in the run.

public int GetTextRunCursor (string text, int contextStart, int contextEnd, bool isRtl, int offset, int cursorOpt);
member this.GetTextRunCursor : string * int * int * bool * int * int -> int

Parameters

text
String

the text

contextStart
Int32

the start of the context

contextEnd
Int32

the end of the context

isRtl
Boolean

true if the paragraph context is RTL, otherwise false

offset
Int32

the cursor position to move from

cursorOpt
Int32

how to move the cursor

Returns

the offset of the next position, or -1

Remarks

Returns the next cursor position in the run.

This avoids placing the cursor between surrogates, between characters that form conjuncts, between base characters and combining marks, or within a reordering cluster.

ContextStart, contextEnd, and offset are relative to the start of text. The context is the shaping context for cursor movement, generally the bounds of the metric span enclosing the cursor in the direction of movement.

If cursorOpt is #CURSOR_AT and the offset is not a valid cursor position, this returns -1. Otherwise this will never return a value before contextStart or after contextEnd.

Java documentation for android.graphics.Paint.getTextRunCursor(java.lang.CharSequence, int, int, boolean, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

GetTextRunCursor(ICharSequence, Int32, Int32, Boolean, Int32, Int32)

Returns the next cursor position in the run.

[Android.Runtime.Register("getTextRunCursor", "(Ljava/lang/CharSequence;IIZII)I", "GetGetTextRunCursor_Ljava_lang_CharSequence_IIZIIHandler", ApiSince=29)]
public virtual int GetTextRunCursor (Java.Lang.ICharSequence text, int contextStart, int contextEnd, bool isRtl, int offset, int cursorOpt);
[<Android.Runtime.Register("getTextRunCursor", "(Ljava/lang/CharSequence;IIZII)I", "GetGetTextRunCursor_Ljava_lang_CharSequence_IIZIIHandler", ApiSince=29)>]
abstract member GetTextRunCursor : Java.Lang.ICharSequence * int * int * bool * int * int -> int
override this.GetTextRunCursor : Java.Lang.ICharSequence * int * int * bool * int * int -> int

Parameters

text
ICharSequence

the text

contextStart
Int32

the start of the context

contextEnd
Int32

the end of the context

isRtl
Boolean

true if the paragraph context is RTL, otherwise false

offset
Int32

the cursor position to move from

cursorOpt
Int32

how to move the cursor

Returns

the offset of the next position, or -1

Attributes

Remarks

Returns the next cursor position in the run.

This avoids placing the cursor between surrogates, between characters that form conjuncts, between base characters and combining marks, or within a reordering cluster.

ContextStart, contextEnd, and offset are relative to the start of text. The context is the shaping context for cursor movement, generally the bounds of the metric span enclosing the cursor in the direction of movement.

If cursorOpt is #CURSOR_AT and the offset is not a valid cursor position, this returns -1. Otherwise this will never return a value before contextStart or after contextEnd.

Java documentation for android.graphics.Paint.getTextRunCursor(java.lang.CharSequence, int, int, boolean, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to