Bidi Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Bidi() |
Allocate a |
Bidi(IAttributedCharacterIterator) |
Create Bidi from the given paragraph of text. |
Bidi(Int32, Int32) |
Allocate a |
Bidi(IntPtr, JniHandleOwnership) | |
Bidi(String, BidiOptions) |
Create Bidi from the given paragraph of text and base direction. |
Bidi(Char[], Int32, Byte[], Int32, Int32, BidiOptions) |
Create Bidi from the given text, embedding, and direction information. |
Bidi()
Allocate a Bidi
object.
[Android.Runtime.Register(".ctor", "()V", "", ApiSince=29)]
public Bidi ();
- Attributes
Remarks
Allocate a Bidi
object. Such an object is initially empty. It is assigned the Bidi properties of a piece of text containing one or more paragraphs by setPara()
or the Bidi properties of a line within a paragraph by setLine()
.
This object can be reused.
setPara()
and setLine()
will allocate additional memory for internal structures as necessary.
Java documentation for android.icu.text.Bidi.Bidi()
.
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
Bidi(IAttributedCharacterIterator)
Create Bidi from the given paragraph of text.
[Android.Runtime.Register(".ctor", "(Ljava/text/AttributedCharacterIterator;)V", "", ApiSince=29)]
public Bidi (Java.Text.IAttributedCharacterIterator? paragraph);
[<Android.Runtime.Register(".ctor", "(Ljava/text/AttributedCharacterIterator;)V", "", ApiSince=29)>]
new Android.Icu.Text.Bidi : Java.Text.IAttributedCharacterIterator -> Android.Icu.Text.Bidi
Parameters
- paragraph
- IAttributedCharacterIterator
a paragraph of text with optional character and paragraph attribute information
- Attributes
Remarks
Create Bidi from the given paragraph of text.
The RUN_DIRECTION attribute in the text, if present, determines the base direction (left-to-right or right-to-left). If not present, the base direction is computed using the Unicode Bidirectional Algorithm, defaulting to left-to-right if there are no strong directional characters in the text. This attribute, if present, must be applied to all the text in the paragraph.
The BIDI_EMBEDDING attribute in the text, if present, represents embedding level information. Negative values indicate overrides at the absolute value of the level. Positive values indicate embeddings. (See #MAX_EXPLICIT_LEVEL
.) Where values are zero or not defined, the base embedding level as determined by the base direction is assumed.
The NUMERIC_SHAPING attribute in the text, if present, converts European digits to other decimal digits before running the bidi algorithm. This attribute, if present, must be applied to all the text in the paragraph.
Note: this constructor calls setPara() internally.
Java documentation for android.icu.text.Bidi.Bidi(java.text.AttributedCharacterIterator)
.
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
Bidi(Int32, Int32)
Allocate a Bidi
object with preallocated memory
for internal structures.
[Android.Runtime.Register(".ctor", "(II)V", "", ApiSince=29)]
public Bidi (int maxLength, int maxRunCount);
[<Android.Runtime.Register(".ctor", "(II)V", "", ApiSince=29)>]
new Android.Icu.Text.Bidi : int * int -> Android.Icu.Text.Bidi
Parameters
- maxLength
- Int32
is the maximum text or line length that internal memory will be preallocated for. An attempt to associate this object with a longer text will fail, unless this value is 0, which leaves the allocation up to the implementation.
- maxRunCount
- Int32
is the maximum anticipated number of same-level runs
that internal memory will be preallocated for. An attempt to access
visual runs on an object that was not preallocated for as many runs
as the text was actually resolved to will fail,
unless this value is 0, which leaves the allocation up to the implementation.<br><br>
The number of runs depends on the actual text and maybe anywhere between
1 and maxLength
. It is typically small.
- Attributes
Remarks
Allocate a Bidi
object with preallocated memory for internal structures. This method provides a Bidi
object like the default constructor but it also preallocates memory for internal structures according to the sizings supplied by the caller.
The preallocation can be limited to some of the internal memory by setting some values to 0 here. That means that if, e.g., maxRunCount
cannot be reasonably predetermined and should not be set to maxLength
(the only failproof value) to avoid wasting memory, then maxRunCount
could be set to 0 here and the internal structures that are associated with it will be allocated on demand, just like with the default constructor.
Java documentation for android.icu.text.Bidi.Bidi(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
Bidi(IntPtr, JniHandleOwnership)
protected Bidi (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Android.Icu.Text.Bidi : nativeint * Android.Runtime.JniHandleOwnership -> Android.Icu.Text.Bidi
Parameters
- javaReference
-
IntPtr
nativeint
- transfer
- JniHandleOwnership
Applies to
Bidi(String, BidiOptions)
Create Bidi from the given paragraph of text and base direction.
[Android.Runtime.Register(".ctor", "(Ljava/lang/String;I)V", "", ApiSince=29)]
public Bidi (string? paragraph, Android.Icu.Text.BidiOptions flags);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;I)V", "", ApiSince=29)>]
new Android.Icu.Text.Bidi : string * Android.Icu.Text.BidiOptions -> Android.Icu.Text.Bidi
Parameters
- paragraph
- String
a paragraph of text
- flags
- BidiOptions
a collection of flags that control the algorithm. The algorithm understands the flags DIRECTION_LEFT_TO_RIGHT, DIRECTION_RIGHT_TO_LEFT, DIRECTION_DEFAULT_LEFT_TO_RIGHT, and DIRECTION_DEFAULT_RIGHT_TO_LEFT. Other values are reserved.
- Attributes
Remarks
Create Bidi from the given paragraph of text and base direction.
Java documentation for android.icu.text.Bidi.Bidi(java.lang.String, 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
Bidi(Char[], Int32, Byte[], Int32, Int32, BidiOptions)
Create Bidi from the given text, embedding, and direction information.
[Android.Runtime.Register(".ctor", "([CI[BIII)V", "", ApiSince=29)]
public Bidi (char[]? text, int textStart, byte[]? embeddings, int embStart, int paragraphLength, Android.Icu.Text.BidiOptions flags);
[<Android.Runtime.Register(".ctor", "([CI[BIII)V", "", ApiSince=29)>]
new Android.Icu.Text.Bidi : char[] * int * byte[] * int * int * Android.Icu.Text.BidiOptions -> Android.Icu.Text.Bidi
Parameters
- text
- Char[]
an array containing the paragraph of text to process.
- textStart
- Int32
the index into the text array of the start of the paragraph.
- embeddings
- Byte[]
an array containing embedding values for each character in the paragraph. This can be null, in which case it is assumed that there is no external embedding information.
- embStart
- Int32
the index into the embedding array of the start of the paragraph.
- paragraphLength
- Int32
the length of the paragraph in the text and embeddings arrays.
- flags
- BidiOptions
a collection of flags that control the algorithm. The algorithm understands the flags DIRECTION_LEFT_TO_RIGHT, DIRECTION_RIGHT_TO_LEFT, DIRECTION_DEFAULT_LEFT_TO_RIGHT, and DIRECTION_DEFAULT_RIGHT_TO_LEFT. Other values are reserved.
- Attributes
Remarks
Create Bidi from the given text, embedding, and direction information.
The embeddings array may be null. If present, the values represent embedding level information. Negative values indicate overrides at the absolute value of the level. Positive values indicate embeddings. (See #MAX_EXPLICIT_LEVEL
.) Where values are zero, the base embedding level as determined by the base direction is assumed, except for paragraph separators which remain at 0 to prevent reordering of paragraphs.
Note: This constructor calls setPara() internally, after converting the java.text.Bidi-style embeddings with negative overrides into ICU-style embeddings with bit fields for #LEVEL_OVERRIDE
and the level.
Java documentation for android.icu.text.Bidi.Bidi(char[], int, byte[], int, 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.