Lines Matching defs:end

53     if (a.start == b.start && a.end == b.end) return a;
55 auto end = std::min(a.end, b.end);
56 return end >= begin ? TextRange(begin, end) : EMPTY_TEXT;
65 if (a.start == b.start && a.end == b.end) return a;
67 auto end = std::min(a.end, b.end);
68 return end > begin ? TextRange(begin, end) : EMPTY_TEXT;
147 auto& end = owner->cluster(fGhostClusterRange.end - 1);
148 size_t numRuns = end.runIndex() - start.runIndex() + 1;
150 for (BlockIndex index = fBlockRange.start; index < fBlockRange.end; ++index) {
179 for (auto runIndex = start.runIndex(); runIndex <= end.runIndex(); ++runIndex) {
338 groupRuns.erase(groupRuns.begin(), groupRuns.end());
365 groupRuns.erase(groupRuns.begin(), groupRuns.end());
416 auto& end = fOwner->cluster(fClusterRange.end - 1);
417 SkASSERT(start.runIndex() == end.runIndex());
421 end.isHardBreak() ? end.startPos() : end.endPos());
423 glyphs = GlyphRange(end.startPos(),
510 for (auto clusterIndex = fClusterRange.start + 1; clusterIndex < fClusterRange.end; ++clusterIndex) {
875 auto end = cluster->endPos();
877 if (end == run.size()) {
879 ++end;
887 for (size_t pos = start; pos < end; ++pos) {
895 auto end = cluster->endPos();
896 if (end == run.size()) {
898 ++end;
906 for (size_t pos = start; pos < end; ++pos) {
912 for (auto clusterIndex = fGhostClusterRange.start; clusterIndex < fGhostClusterRange.end; ++clusterIndex) {
931 fClusterRange.end = fClusterRange.start;
932 fGhostClusterRange.end = fClusterRange.start;
933 fText.end = fText.start;
934 fTextIncludingNewlines.end = fTextIncludingNewlines.start;
935 fTextExcludingSpaces.end = fTextExcludingSpaces.start;
939 fClusterRange.start = fClusterRange.end;
940 fGhostClusterRange.start = fClusterRange.end;
941 fText.start = fText.end;
942 fTextIncludingNewlines.start = fTextIncludingNewlines.end;
943 fTextExcludingSpaces.start = fTextExcludingSpaces.end;
965 for (auto clusterIndex = fGhostClusterRange.end; clusterIndex > fGhostClusterRange.start; --clusterIndex) {
1007 fTextRangeReplacedByEllipsis = TextRange(cluster.textRange().end, fOwner->text().size());
1010 fClusterRange.end = clusterIndex;
1011 fGhostClusterRange.end = fClusterRange.end;
1014 TextRange(cluster.textRange().end, cluster.textRange().end + ellipsis.size());
1015 fEllipsis->fClusterStart = cluster.textRange().end;
1019 fText.end = cluster.textRange().end;
1020 fTextIncludingNewlines.end = cluster.textRange().end;
1021 fTextExcludingSpaces.end = cluster.textRange().end;
1043 for (auto clusterIndex = fGhostClusterRange.start; clusterIndex < fGhostClusterRange.end; ++clusterIndex) {
1084 static inline SkUnichar nextUtf8Unit(const char** ptr, const char* end) {
1085 SkUnichar val = SkUTF::NextUTF8(ptr, end);
1128 for (auto i = fBlockRange.start; i < fBlockRange.end; ++i) {
1130 if (run.leftToRight() && cluster->textRange().end <= block.fRange.end) {
1133 } else if (!run.leftToRight() && cluster->textRange().start <= block.fRange.end) {
1224 // The most important one: we measure the text with spaces at the end (or at the beginning in RTL)
1268 // Find [start:end] clusters for the text
1274 std::tie(found, updatedTextRange.start, updatedTextRange.end) =
1286 std::tie(found, updatedTextRange.start, updatedTextRange.end) =
1293 //SkDebugf("Correct range: [%d:%d) -> [%d:%d)\n", textRange.start, textRange.end, startIndex, endIndex);
1299 Cluster* end = &fOwner->cluster(fOwner->clusterIndex(textRange.end - (textRange.width() == 0 ? 0 : 1)));
1302 std::swap(start, end);
1305 result.size = (end->isHardBreak() ? end->startPos() : end->endPos()) - start->startPos();
1309 std::swap(start, end);
1313 SkDebugf("Justification for [%d:%d)\n", textRange.start, textRange.end);
1336 auto rightCorrection = end->sizeFromChar(originalTextRange.end - 1);
1339 originalTextRange.start, originalTextRange.end, textRange.start, textRange.end,
1362 // The most important one: we measure the text with spaces at the end (or at the beginning in RTL)
1403 bool ghost = &cluster >= trimmed.end();
1425 if (intersect == EMPTY_TEXT || (intersect.start != curGlyphRange.start && intersect.end != curGlyphRange.end)) {
1429 curGlyphRange = TextRange(intersect.end, curGlyphRange.end);
1430 } else if (intersect.end == curGlyphRange.end) {
1462 for (BlockIndex index = fBlockRange.start; index < fBlockRange.end; ++index) {
1466 TextRange(fEllipsis->textRange().start - 1, fEllipsis->textRange().end));
1472 if (block->fRange.start >= run->fClusterStart && block->fRange.end < run->fClusterStart) {
1503 const BlockIndex blockRangeSize = fBlockRange.end - fBlockRange.start;
1510 (run->leftToRight() ? fBlockRange.start + index : fBlockRange.end - index - 1);
1522 index = fBlockRange.end;
1653 TextRange(fTextExcludingSpaces.end, fTextIncludingNewlines.end), run->fTextRange);
1706 TextRange(fTextExcludingSpaces.end, fTextIncludingNewlines.end), run->fTextRange);
1747 result.fEndExcludingWhitespaces = fOwner->getUTF16Index(fTextExcludingSpaces.end);
1748 result.fEndIndex = fOwner->getUTF16Index(fText.end);
1749 result.fEndIncludingNewline = fOwner->getUTF16Index(fTextIncludingNewlines.end);
1812 // TODO: For some reason Flutter imagines a hard line break at the end of the last line.
1814 return (fGhostClusterRange.width() > 0 && fOwner->cluster(fGhostClusterRange.end - 1).isHardBreak()) ||
1816 fGhostClusterRange.end == fOwner->clusters().size() - 1;
1918 if (this->trimmedText().end <this->textWithNewlines().end && // Line has trailing space
1919 this->textWithNewlines().end == intersect.end && // Range is at the end of the line
1920 this->trimmedText().end > intersect.start) // Range has more than just spaces
2037 auto utf16Index = fOwner->getUTF16Index(this->fTextExcludingSpaces.end);
2082 if ((glyphCnt != 0) && (context.run->fUtf8Range.end() - context.run->fUtf8Range.begin()) /
2089 // If we haven't reached the end of the run we need to keep looking
2114 auto end = context.run->positionX(index) + context.fTextShift + offsetX;
2116 end = littleRound(end);
2118 if (end > dx) {
2120 } else if (end == dx && !context.run->leftToRight()) {
2121 // When we move RTL variable end points to the beginning of the code point which is included
2162 if ((glyphCnt != 0) && !context.run->leftToRight() && (context.run->fUtf8Range.end() -
2243 // Counts how many tabs have been removed from the end of the current line
2278 for (auto clusterIndex = range.end - 1; clusterIndex >= range.start; clusterIndex--) {
2306 textLine.fGhostClusterRange.end -= endWhitespaceCount;
2380 for (auto clusterIndex = range.start; clusterIndex < range.end; clusterIndex++) {
2409 // Look for the first non-space character from the end and get its advance and index
2413 if (endWhitespaceCount == (fGhostClusterRange.end - fGhostClusterRange.start)) {
2417 SkScalar endAdvance = fOwner->cluster(fGhostClusterRange.end - endWhitespaceCount - 1).width();
2422 for (auto clusterIndex = fGhostClusterRange.start; clusterIndex < fGhostClusterRange.end; clusterIndex++) {
2467 index = fGhostClusterRange.end;
2470 for (auto clusterIndex = fGhostClusterRange.start; clusterIndex < fGhostClusterRange.end; ++clusterIndex) {
2490 if (index >= fGhostClusterRange.end) {
2494 while (clusterIndex < fGhostClusterRange.end) {
2509 for (auto clusterIndex = fGhostClusterRange.start; clusterIndex < fGhostClusterRange.end; ++clusterIndex) {