Lines Matching defs:levels

113  * <h3>Basic concept: levels</h3>
115 * Levels in this API represent embedding levels according to the Unicode
828 byte[] levels;
842 ImpTabPair impTabPair; /* reference to levels state table pair */
854 /* implicitly at the paraLevel (rule (L1)) - levels may not reflect that */
1328 * Resolve the explicit levels as specified by explicit embedding codes.
1333 * levels are externally specified (from "styled text", supposedly the preferred
1362 * Handling the stack of explicit levels (Xn):
1364 * With the Bidi stack of explicit levels,
1374 * Popping levels with PDF must work in the opposite order so that level 61
1390 /* we may not need to resolve any explicit levels, but for multiple
1393 /* not mixed directionality: levels don't matter - trailingWSStart will be 0 */
1399 /* set all levels to the paragraph level */
1401 levels[i] = level;
1414 int countOver61 = 0; /* count overflows of explicit levels */
1495 /* they will get their levels set correctly in adjustWSLevels() */
1515 * We need to set reasonable levels even on BN codes and
1518 levels[i] = level;
1537 * Use a pre-specified embedding levels array:
1541 * and check all the preset levels.
1554 if (levels[i] == 0) {
1555 levels[i] = paraLevel;
1557 if (MAX_EXPLICIT_LEVEL < (levels[i]&0x7f)) {
1558 if ((levels[i] & INTERNAL_LEVEL_OVERRIDE) != 0) {
1559 levels[i] = (byte)(paraLevel|INTERNAL_LEVEL_OVERRIDE);
1561 levels[i] = paraLevel;
1564 level = levels[i];
1567 /* keep the override flag in levels[i] but adjust the flags */
1692 /* The levels state machine tables */
1707 /* Definitions and type for levels state tables */
1729 /* In all levels state tables, */
1751 /* (levels are assigned). */
1809 /* In this table, EN/AN+ON sequences receive levels as if associated with R
1821 /* In this table, EN/AN+ON sequences receive levels as if associated with R
2030 levels[k] = (byte)((levels[k] - 2) & ~1);
2081 for (k = start0-1; k >= 0 && ((levels[k] & 1) == 0); k--) {
2109 if (levels[k] < level) {
2110 levels[k] = level;
2120 if (levels[k] == level+3) {
2121 while (levels[k] == level+3) {
2122 levels[k--] -= 2;
2124 while (levels[k] == level) {
2128 if (levels[k] == level+2) {
2129 levels[k] = level;
2132 levels[k] = (byte)(level+1);
2139 if (levels[k] > level) {
2140 levels[k] -= 2;
2152 levels[k] = level;
2171 * actions) and different levels state tables (maybe very similar to the
2174 /* initialize for levels state table */
2178 levState.runLevel = levels[start];
2239 * Reset the embedding levels for some non-graphic characters (L1).
2240 * This method also sets appropriate levels for BN, and
2254 levels[i] = 0;
2256 levels[i] = GetParaLevelAt(i);
2265 levels[i] = levels[i + 1];
2267 levels[i] = 0;
2270 levels[i] = GetParaLevelAt(i);
2293 * with or without externally specified embedding levels from <i>styled</i>
2298 * i.e., some levels may not be the same as if all steps were performed.
2302 * the algorithm. This implementation may set all resolved levels to
2331 * is also valid, with odd levels indicating RTL.
2333 * @param embeddingLevels (in) may be used to preset the embedding and override levels,
2344 * of the levels, will be stored in the <code>Bidi</code> object;
2349 * levels.<br><br>
2378 * with or without externally specified embedding levels from <i>styled</i>
2383 * i.e., some levels may not be the same as if all steps were performed.
2387 * the algorithm. This implementation may set all resolved levels to
2415 * is also valid, with odd levels indicating RTL.
2418 * override levels, ignoring characters like LRE and PDF in the text.
2428 * of the levels, will be stored in the <code>Bidi</code> object;
2433 * levels.<br><br>
2468 levels = new byte[0];
2519 trailingWSStart = length; /* the levels[] will reflect the WS run */
2532 /* are explicit levels specified? */
2534 /* no: determine explicit levels according to the (Xn) rules */
2536 levels = levelsMemory;
2539 /* set BN for all explicit codes, check that all levels are 0 or paraLevel..MAX_EXPLICIT_LEVEL */
2540 levels = embeddingLevels;
2553 /* all levels are implicitly at paraLevel (important for getLevels()) */
2560 /* all levels are implicitly at paraLevel (important for getLevels()) */
2567 * If there are no external levels specified and there
2571 * the text with the same embedding levels. (X10)
2590 nextLevel = levels[0];
2611 while (++limit < length && levels[limit] == level) {}
2615 nextLevel = levels[limit];
2634 levels[start++] &= ~INTERNAL_LEVEL_OVERRIDE;
2640 /* reset the embedding levels for some non-graphic characters (L1), (X9) */
2679 * i.e., some levels may not be the same as if all steps were performed.
2683 * the algorithm. This implementation may set all resolved levels to
2850 * contain the reordering information, especially the resolved levels,
2922 * Get an array of levels for each character.<p>
2927 * @return The levels array for the text,
2947 * may have resolved only the levels of the text. Therefore,
3008 * It is intended to be used for when an application has determined the levels
3013 * @param levels is an array of levels that have been determined by
3016 * @return an array of <code>levels.length</code>
3024 private static int[] reorderVisual(byte[] levels)
3026 return BidiLine.reorderVisual(levels);
3362 * Reorder the objects in the array into visual order based on their levels.
3369 * the levels array (at <code>index - objectStart + levelStart</code>).
3371 * @param levels an array representing the bidi level of each object
3372 * @param levelStart the start position in the levels array
3378 public static void reorderVisually(byte[] levels,
3384 if (0 > levelStart || levels.length <= levelStart) {
3387 (levels.length-1));
3400 System.arraycopy(levels, levelStart, reorderLevels, 0, count);
3422 if (levels == null) {
3426 buf.append(levels[0]);
3427 for (int i = 1; i < levels.length; i++) {
3429 buf.append(levels[i]);