Lines Matching defs:levels

35  * This means that there is a UBiDi object with a levels
38 * Only if the length of the text is zero, then levels==dirProps==NULL.
51 * Here, the levels array is scanned as soon as necessary, and a vector of
60 * In a further attempt to save memory, the levels array is never changed
65 * which is not reflected in the levels array.
66 * This allows a line UBiDi object to use the same levels array as
70 * paragraph's levels and dirProps arrays are reused by way of setting
72 * change the now shared levels for (L1).
80 * the paragraph's levels array that we just point into.
94 UBiDiLevel *levels=pBiDi->levels;
114 while(start>0 && levels[start-1]==paraLevel) {
169 pLineBiDi->levels=pParaBiDi->levels+start;
177 * The parent's levels are all either
189 const UBiDiLevel *levels=pLineBiDi->levels;
198 /* all levels are at paraLevel */
202 level=(UBiDiLevel)(levels[0]&1);
206 /* the trailing WS is at paraLevel, which differs from levels[0] */
209 /* see if levels[1..trailingWSStart-1] have the same direction as levels[0] and paraLevel */
216 } else if((levels[i]&1)!=level) {
230 /* all levels are implicitly at paraLevel (important for ubidi_getLevels()) */
237 /* all levels are implicitly at paraLevel (important for ubidi_getLevels()) */
256 return pBiDi->levels[charIndex];
271 /* the current levels array reflects the WS run */
272 return pBiDi->levels;
276 * After the previous if(), we know that the levels array
278 * reflect itself all the levels.
280 * we need to create a new levels array.
283 UBiDiLevel *levels=pBiDi->levelsMemory;
285 if(start>0 && levels!=pBiDi->levels) {
286 uprv_memcpy(levels, pBiDi->levels, start);
290 uprv_memset(levels+start, pBiDi->paraLevel, length-start);
292 /* this new levels array is set for the line and reflects the WS run */
294 return pBiDi->levels=levels;
316 /* this is done based on runs rather than on levels since levels have
342 *pLevel=pBiDi->levels[logicalPosition];
424 * reflected in levels[] if this is not a paragraph object.
437 UBiDiLevel *levels;
453 levels=pBiDi->levels;
468 while(firstRun<runCount && levels[runs[firstRun].logicalStart]<maxLevel) {
476 for(limitRun=firstRun; ++limitRun<runCount && levels[runs[limitRun].logicalStart]>=maxLevel;) {}
537 * Compute the runs array from the levels array.
564 UBiDiLevel *levels=pBiDi->levels;
573 * modify the levels array which a line UBiDi object shares
576 * levels[]!=paraLevel but we have to treat it like it were so.
583 if(levels[i]!=level) {
585 level=levels[i];
595 getSingleRun(pBiDi, levels[0]);
627 level=levels[i];
636 while(++i<limit && levels[i]==level) {}
666 ADD_ODD_BIT_FROM_LEVEL(runs[i].logicalStart, levels[runs[i].logicalStart]);
710 prepareReorder(const UBiDiLevel *levels, int32_t length,
716 if(levels==NULL || length<=0) {
724 level=levels[--start];
747 /* reorder a line based on a levels array (L2) ------------------------------ */
750 ubidi_reorderLogical(const UBiDiLevel *levels, int32_t length, int32_t *indexMap) {
754 if(indexMap==NULL || !prepareReorder(levels, length, indexMap, &minLevel, &maxLevel)) {
770 /* loop for all sequences of levels to reorder at the current maxLevel */
772 /* look for a sequence of levels that are all at >=maxLevel */
774 while(start<length && levels[start]<maxLevel) {
782 for(limit=start; ++limit<length && levels[limit]>=maxLevel;) {}
813 ubidi_reorderVisual(const UBiDiLevel *levels, int32_t length, int32_t *indexMap) {
817 if(indexMap==NULL || !prepareReorder(levels, length, indexMap, &minLevel, &maxLevel)) {
833 /* loop for all sequences of levels to reorder at the current maxLevel */
835 /* look for a sequence of levels that are all at >=maxLevel */
837 while(start<length && levels[start]<maxLevel) {
845 for(limit=start; ++limit<length && levels[limit]>=maxLevel;) {}
849 * We don't need to swap the levels for the purpose of this
850 * algorithm: the sequence of levels that we look at does not