Lines Matching defs:index
150 for (BlockIndex index = fBlockRange.start; index < fBlockRange.end; ++index) {
151 auto b = fOwner->styles().begin() + index;
196 for (auto index : logicalOrder) {
197 auto runIndex = firstRunIndex + index;
316 void TextLine::computeRoundRect(int& index, int& preIndex, std::vector<Run*>& groupRuns, Run* run) {
318 if (index >= runCount) {
324 if (hasBackgroundRect(roundRectAttrs[index])) {
325 int styleId = roundRectAttrs[index].styleId;
326 // index - 1 is previous index, -1 is the invalid styleId
327 int preStyleId = index == 0 ? -1 : roundRectAttrs[index - 1].styleId;
328 // runCount - 1 is the last run index, index + 1 is next run index, -1 is the invalid styleId
329 int nextStyleId = index == runCount - 1 ? -1 : roundRectAttrs[index + 1].styleId;
330 // index - preIndex > 1 means the left run has no background rect
331 leftRound = (preIndex < 0 || index - preIndex > 1 || preStyleId != styleId);
332 // runCount - 1 is the last run index
333 rightRound = (index == runCount - 1 || !hasBackgroundRect(roundRectAttrs[index + 1]) ||
335 preIndex = index;
367 index++;
387 int index = 0;
391 run->setIndexInLine(static_cast<size_t>(index));
392 computeRoundRect(index, preIndex, groupRuns, run);
677 size_t index = run->getIndexInLine();
678 if (index >= roundRectAttrs.size()) {
682 const RoundRectAttr& attr = roundRectAttrs[index];
772 [&](const Cluster* cluster, ClusterIndex index, bool ghost) {
774 if (index == 0) {
783 if (!whitespacePatch && index != 0) {
820 this->iterateThroughClustersInGlyphsOrder(false, true, [&](const Cluster* cluster, ClusterIndex index, bool ghost) {
830 if (index == 0) {
838 if (!whitespacePatch && index != 0) {
1391 ClusterIndex index = 0;
1407 if (!visitor(&cluster, index++, ghost)) {
1462 for (BlockIndex index = fBlockRange.start; index < fBlockRange.end; ++index) {
1463 auto block = fOwner->styles().begin() + index;
1504 for (BlockIndex index = 0; index <= blockRangeSize; ++index) {
1508 if (index < blockRangeSize) {
1510 (run->leftToRight() ? fBlockRange.start + index : fBlockRange.end - index - 1);
1522 index = fBlockRange.end;
2112 for (size_t index = context.pos; index < context.pos + context.size; ++index) {
2114 auto end = context.run->positionX(index) + context.fTextShift + offsetX;
2122 found = index;
2125 found = index;
2154 // Keep UTF16 index as is
2409 // Look for the first non-space character from the end and get its advance and index
2464 int32_t index = fGhostClusterRange.start;
2467 index = fGhostClusterRange.end;
2473 return index;
2475 index++;
2480 return index;
2483 double TextLine::getOffsetForStringIndex(int32_t index) const
2486 if (index <= 0) {
2490 if (index >= fGhostClusterRange.end) {
2492 } else if (index > fGhostClusterRange.start) {
2496 if (++clusterIndex == index) {