Lines Matching refs:levels
37 * This means that there is a UBiDi object with a levels
40 * Only if the length of the text is zero, then levels==dirProps==NULL.
53 * Here, the levels array is scanned as soon as necessary, and a vector of
62 * In a further attempt to save memory, the levels array is never changed
67 * which is not reflected in the levels array.
68 * This allows a line UBiDi object to use the same levels array as
72 * paragraph's levels and dirProps arrays are reused by way of setting
74 * change the now shared levels for (L1).
82 * the paragraph's levels array that we just point into.
96 UBiDiLevel *levels=pBiDi->levels;
116 while(start>0 && levels[start-1]==paraLevel) {
171 pLineBiDi->levels=pParaBiDi->levels+start;
179 * The parent's levels are all either
191 const UBiDiLevel *levels=pLineBiDi->levels;
200 /* all levels are at paraLevel */
204 level=(UBiDiLevel)(levels[0]&1);
208 /* the trailing WS is at paraLevel, which differs from levels[0] */
211 /* see if levels[1..trailingWSStart-1] have the same direction as levels[0] and paraLevel */
218 } else if((levels[i]&1)!=level) {
232 /* all levels are implicitly at paraLevel (important for ubidi_getLevels()) */
239 /* all levels are implicitly at paraLevel (important for ubidi_getLevels()) */
258 return pBiDi->levels[charIndex];
273 /* the current levels array reflects the WS run */
274 return pBiDi->levels;
278 * After the previous if(), we know that the levels array
280 * reflect itself all the levels.
282 * we need to create a new levels array.
285 UBiDiLevel *levels=pBiDi->levelsMemory;
287 if(start>0 && levels!=pBiDi->levels) {
288 uprv_memcpy(levels, pBiDi->levels, start);
292 uprv_memset(levels+start, pBiDi->paraLevel, length-start);
294 /* this new levels array is set for the line and reflects the WS run */
296 return pBiDi->levels=levels;
318 /* this is done based on runs rather than on levels since levels have
344 *pLevel=pBiDi->levels[logicalPosition];
426 * reflected in levels[] if this is not a paragraph object.
439 UBiDiLevel *levels;
455 levels=pBiDi->levels;
470 while(firstRun<runCount && levels[runs[firstRun].logicalStart]<maxLevel) {
478 for(limitRun=firstRun; ++limitRun<runCount && levels[runs[limitRun].logicalStart]>=maxLevel;) {}
539 * Compute the runs array from the levels array.
566 UBiDiLevel *levels=pBiDi->levels;
575 * modify the levels array which a line UBiDi object shares
578 * levels[]!=paraLevel but we have to treat it like it were so.
585 if(levels[i]!=level) {
587 level=levels[i];
597 getSingleRun(pBiDi, levels[0]);
629 level=levels[i];
638 while(++i<limit && levels[i]==level) {}
668 ADD_ODD_BIT_FROM_LEVEL(runs[i].logicalStart, levels[runs[i].logicalStart]);
712 prepareReorder(const UBiDiLevel *levels, int32_t length,
718 if(levels==NULL || length<=0) {
726 level=levels[--start];
749 /* reorder a line based on a levels array (L2) ------------------------------ */
752 ubidi_reorderLogical(const UBiDiLevel *levels, int32_t length, int32_t *indexMap) {
756 if(indexMap==NULL || !prepareReorder(levels, length, indexMap, &minLevel, &maxLevel)) {
772 /* loop for all sequences of levels to reorder at the current maxLevel */
774 /* look for a sequence of levels that are all at >=maxLevel */
776 while(start<length && levels[start]<maxLevel) {
784 for(limit=start; ++limit<length && levels[limit]>=maxLevel;) {}
815 ubidi_reorderVisual(const UBiDiLevel *levels, int32_t length, int32_t *indexMap) {
819 if(indexMap==NULL || !prepareReorder(levels, length, indexMap, &minLevel, &maxLevel)) {
835 /* loop for all sequences of levels to reorder at the current maxLevel */
837 /* look for a sequence of levels that are all at >=maxLevel */
839 while(start<length && levels[start]<maxLevel) {
847 for(limit=start; ++limit<length && levels[limit]>=maxLevel;) {}
851 * We don't need to swap the levels for the purpose of this
852 * algorithm: the sequence of levels that we look at does not