Bidi.GetLogicalMap Method
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.
Get a logical-to-visual index map (array) for the characters in the
Bidi
(paragraph or line) object.
[Android.Runtime.Register("getLogicalMap", "()[I", "GetGetLogicalMapHandler", ApiSince=29)]
public virtual int[]? GetLogicalMap ();
[<Android.Runtime.Register("getLogicalMap", "()[I", "GetGetLogicalMapHandler", ApiSince=29)>]
abstract member GetLogicalMap : unit -> int[]
override this.GetLogicalMap : unit -> int[]
Returns
an array of getProcessedLength()
indexes which will reflect the reordering of the characters.<br><br>
The index map will result in
indexMap[logicalIndex]==visualIndex
, where
indexMap
represents the returned array.
- Attributes
Remarks
Get a logical-to-visual index map (array) for the characters in the Bidi
(paragraph or line) object.
Some values in the map may be MAP_NOWHERE
if the corresponding text characters are Bidi controls removed from the visual output by the option OPTION_REMOVE_CONTROLS
.
When the visual output is altered by using options of writeReordered()
such as INSERT_LRM_FOR_NUMERIC
, KEEP_BASE_COMBINING
, OUTPUT_REVERSE
, REMOVE_BIDI_CONTROLS
, the visual positions returned may not be correct. It is advised to use, when possible, reordering options such as #OPTION_INSERT_MARKS
and #OPTION_REMOVE_CONTROLS
.
Note that in right-to-left runs, this mapping places second surrogates before first ones (which is generally a bad idea) and combining characters before base characters. Use of {@link #writeReordered}
, optionally with the {@link #KEEP_BASE_COMBINING}
option can be considered instead of using the mapping, in order to avoid these issues.
Java documentation for android.icu.text.Bidi.getLogicalMap()
.
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.