Lines Matching refs:levels

39  * This means that there is a UBiDi object with a levels
42 * Only if the length of the text is zero, then levels==dirProps==NULL.
55 * Here, the levels array is scanned as soon as necessary, and a vector of
64 * In a further attempt to save memory, the levels array is never changed
69 * which is not reflected in the levels array.
70 * This allows a line UBiDi object to use the same levels array as
74 * paragraph's levels and dirProps arrays are reused by way of setting
76 * change the now shared levels for (L1).
84 * the paragraph's levels array that we just point into.
98 UBiDiLevel *levels=pBiDi->levels;
118 while(start>0 && levels[start-1]==paraLevel) {
173 pLineBiDi->levels=pParaBiDi->levels+start;
181 * The parent's levels are all either
193 const UBiDiLevel *levels=pLineBiDi->levels;
202 /* all levels are at paraLevel */
206 level=(UBiDiLevel)(levels[0]&1);
210 /* the trailing WS is at paraLevel, which differs from levels[0] */
213 /* see if levels[1..trailingWSStart-1] have the same direction as levels[0] and paraLevel */
220 } else if((levels[i]&1)!=level) {
234 /* all levels are implicitly at paraLevel (important for ubidi_getLevels()) */
241 /* all levels are implicitly at paraLevel (important for ubidi_getLevels()) */
260 return pBiDi->levels[charIndex];
275 /* the current levels array reflects the WS run */
276 return pBiDi->levels;
280 * After the previous if(), we know that the levels array
282 * reflect itself all the levels.
284 * we need to create a new levels array.
287 UBiDiLevel *levels=pBiDi->levelsMemory;
289 if(start>0 && levels!=pBiDi->levels) {
290 uprv_memcpy(levels, pBiDi->levels, start);
294 uprv_memset(levels+start, pBiDi->paraLevel, length-start);
296 /* this new levels array is set for the line and reflects the WS run */
298 return pBiDi->levels=levels;
320 /* this is done based on runs rather than on levels since levels have
346 *pLevel=pBiDi->levels[logicalPosition];
428 * reflected in levels[] if this is not a paragraph object.
441 UBiDiLevel *levels;
457 levels=pBiDi->levels;
472 while(firstRun<runCount && levels[runs[firstRun].logicalStart]<maxLevel) {
480 for(limitRun=firstRun; ++limitRun<runCount && levels[runs[limitRun].logicalStart]>=maxLevel;) {}
541 * Compute the runs array from the levels array.
568 UBiDiLevel *levels=pBiDi->levels;
577 * modify the levels array which a line UBiDi object shares
580 * levels[]!=paraLevel but we have to treat it like it were so.
587 if(levels[i]!=level) {
589 level=levels[i];
599 getSingleRun(pBiDi, levels[0]);
631 level=levels[i];
640 while(++i<limit && levels[i]==level) {}
670 ADD_ODD_BIT_FROM_LEVEL(runs[i].logicalStart, levels[runs[i].logicalStart]);
714 prepareReorder(const UBiDiLevel *levels, int32_t length,
720 if(levels==NULL || length<=0) {
728 level=levels[--start];
751 /* reorder a line based on a levels array (L2) ------------------------------ */
754 ubidi_reorderLogical(const UBiDiLevel *levels, int32_t length, int32_t *indexMap) {
758 if(indexMap==NULL || !prepareReorder(levels, length, indexMap, &minLevel, &maxLevel)) {
774 /* loop for all sequences of levels to reorder at the current maxLevel */
776 /* look for a sequence of levels that are all at >=maxLevel */
778 while(start<length && levels[start]<maxLevel) {
786 for(limit=start; ++limit<length && levels[limit]>=maxLevel;) {}
817 ubidi_reorderVisual(const UBiDiLevel *levels, int32_t length, int32_t *indexMap) {
821 if(indexMap==NULL || !prepareReorder(levels, length, indexMap, &minLevel, &maxLevel)) {
837 /* loop for all sequences of levels to reorder at the current maxLevel */
839 /* look for a sequence of levels that are all at >=maxLevel */
841 while(start<length && levels[start]<maxLevel) {
849 for(limit=start; ++limit<length && levels[limit]>=maxLevel;) {}
853 * We don't need to swap the levels for the purpose of this
854 * algorithm: the sequence of levels that we look at does not