Lines Matching refs:levels

57      * This means that there is a Bidi object with a levels
60 * Only if the length of the text is zero, then levels==dirProps==NULL.
73 * Here, the levels array is scanned as soon as necessary, and a vector of
82 * In a further attempt to save memory, the levels array is never changed
87 * which is not reflected in the levels array.
88 * This allows a line Bidi object to use the same levels array as
92 * paragraph's levels and dirProps arrays are reused by way of setting
94 * change the now shared levels for (L1).
102 * the paragraph's levels array that we just point into.
115 byte[] levels = bidiBase.levels;
136 while (start > 0 && levels[start - 1] == paraLevel) {
180 lineBidi.levels = lineBidi.levelsMemory;
181 System.arraycopy(paraBidi.levels, start, lineBidi.levels, 0,
190 * The parent's levels are all either
202 byte[] levels = lineBidi.levels;
211 /* all levels are at paraLevel */
215 level = (byte)(levels[0] & 1);
222 levels[0] */
225 /* see if levels[1..trailingWSStart-1] have the same
226 direction as levels[0] and paraLevel */
232 } else if ((levels[i] & 1) != level) {
246 /* all levels are implicitly at paraLevel (important for
254 /* all levels are implicitly at paraLevel (important for
273 return bidiBase.levels[charIndex];
283 /* the current levels array does not reflect the WS run */
285 * After the previous if(), we know that the levels array
287 * reflect itself all the levels.
289 * we need to create a new levels array.
293 Arrays.fill(bidiBase.levels, start, length, bidiBase.paraLevel);
295 /* this new levels array is set for the line and reflects the WS run */
298 if (length < bidiBase.levels.length) {
299 byte[] levels = new byte[length];
300 System.arraycopy(bidiBase.levels, 0, levels, 0, length);
301 return levels;
303 return bidiBase.levels;
308 /* this is done based on runs rather than on levels since levels have
365 * reflected in levels[] if this is not a paragraph object.
384 byte[] levels;
395 levels = bidiBase.levels;
410 while (firstRun < runCount && levels[runs[firstRun].start] < maxLevel) {
419 levels[runs[limitRun].start]>=maxLevel; ) {}
478 * Compute the runs array from the levels array.
503 byte[] levels = bidiBase.levels;
512 * modify the levels array which a line Bidi object shares
515 * levels[]!=paraLevel but we have to treat it like it were so.
522 if (levels[i] != level) {
524 level = levels[i];
534 getSingleRun(bidiBase, levels[0]);
564 level = levels[i];
573 while (++i < limit && levels[i] == level) {}
600 runs[i].level = levels[runs[i].start];
640 static int[] prepareReorder(byte[] levels, byte[] pMinLevel, byte[] pMaxLevel)
645 if (levels == null || levels.length <= 0) {
652 for (start = levels.length; start>0; ) {
653 level = levels[--start];
668 int[] indexMap = new int[levels.length];
669 for (start = levels.length; start > 0; ) {
677 static int[] reorderVisual(byte[] levels)
684 int[] indexMap = prepareReorder(levels, aMinLevel, aMaxLevel);
704 /* loop for all sequences of levels to reorder at the current maxLevel */
706 /* look for a sequence of levels that are all at >=maxLevel */
708 while (start < levels.length && levels[start] < maxLevel) {
711 if (start >= levels.length) {
716 for (limit = start; ++limit < levels.length && levels[limit] >= maxLevel; ) {}
720 * We don't need to swap the levels for the purpose of this
721 * algorithm: the sequence of levels that we look at does not
734 if (limit == levels.length) {