Lines Matching defs:width

24     bool breakLine(SkScalar width) const {
25 if (width < fLower) {
27 } else if (width > fUpper) {
31 auto val = std::fabs(width);
35 roundedWidth = SkScalarRoundToScalar(width * 100) * (1.0f/100);
37 roundedWidth = SkScalarRoundToScalar(width * 10) * (1.0f/10);
39 roundedWidth = SkScalarFloorToScalar(width);
43 roundedWidth = SkScalarFloorToScalar(width * 100) * (1.0f/100);
45 roundedWidth = SkScalarFloorToScalar(width * 10) * (1.0f/10);
47 roundedWidth = SkScalarFloorToScalar(width);
106 SkScalar width = fWords.width() + fClusters.width() + cluster->width() + totalFakeSpacing;
108 breaker.breakLine(width)) {
134 if (cluster->width() > maxWidth && fWords.empty()) {
149 SkScalar nextWordLength = fClusters.width();
167 // This is a tricky flutter case: layout(width:0) places 1 cluster on each line
168 nextWordLength = std::max(nextWordLength, further->width());
170 nextWordLength += further->width();
177 if (SkScalar shortLength = fWords.width() + nextShortWordLength;
201 if (fWords.empty() && breaker.breakLine(cluster->width())) {
220 // Placeholder is separate word and its width now is counted in minIntrinsicWidth
221 fMinIntrinsicWidth = std::max(fMinIntrinsicWidth, cluster->width());
305 SkScalar width = 0;
313 width += cluster->trimmedWidth(cluster->endPos());
318 width += cluster->width();
320 return width;
328 auto width = fEndLine.width();
331 width += cluster->width();
334 return std::make_tuple(fEndLine.breakCluster() + 1, 0, width);
339 auto width = fEndLine.widthWithGhostSpaces();
342 width += cluster->width();
353 return std::make_tuple(cluster, 0, width);
386 // calculate cumulative length & target width before breakes
388 auto len = cluster.width();
401 auto len = cluster.width();
418 cumulativeLen_ -= cluster.width();
471 param.remainingTextWidth += (param.begin - breaks_[++lastBreakPos_].width);
472 param.begin = breaks_[lastBreakPos_].width;
480 while (param.breakPos < breaks_.size() && breaks_[param.breakPos].width < (param.begin + param.currentMax)) {
517 if (param.breakPos > 0 && param.begin < breaks_[param.breakPos - 1].width) {
518 newWidth = std::min(breaks_[--param.breakPos].width - param.begin, param.currentMax);
620 SkScalar width { 0 };
624 fabs(width - other.width) < WIDTH_TOLERANCE);
631 other.width - width > WIDTH_TOLERANCE);
659 Break(SkScalar w, BreakType t, bool ssws) : width(w), type(t), subsequentWhitespace(ssws) {}
661 SkScalar width { 0.f };
681 auto width = scorer->GetResult().back();
682 widthOut.push_back(width);
683 LOGD("width %{public}f", width);
816 // placeholderA(width: 100, height: 100, align: bottom) placeholderB(width: 200, height: 200, align: top)
874 SkVector::Make(fEndLine.width(), lineHeight),
896 // after a line break when width is infinite
924 softLineMaxIntrinsicWidth += cluster->width();
930 // Placeholder width now counts in fMinIntrinsicWidth
931 softLineMaxIntrinsicWidth += cluster->width();
932 fMinIntrinsicWidth = std::max(fMinIntrinsicWidth, cluster->width());
936 softLineMaxIntrinsicWidth += cluster->width();
937 lastWordLength += cluster->width();
1011 SkScalar width = fWords.width() + fClusters.width() + cluster->width();
1012 breaker.breakLine(width)) {
1025 if (cluster->width() > maxWidth && fWords.empty()) {
1037 SkScalar nextWordLength = fClusters.width();
1053 // This is a tricky flutter case: layout(width:0) places 1 cluster on each line
1054 nextWordLength = std::max(nextWordLength, further->width());
1056 nextWordLength += further->width();
1063 if (SkScalar shortLength = fWords.width() + nextShortWordLength;
1087 if (cluster->width() > maxWidth) {
1100 // Placeholder is separate word and its width now is counted in minIntrinsicWidth
1101 fMinIntrinsicWidth = std::max(fMinIntrinsicWidth, cluster->width());
1157 SkScalar width = 0;
1165 width += cluster->trimmedWidth(cluster->endPos());
1170 width += cluster->width();
1172 return width;
1178 auto width = fEndLine.width();
1181 width += cluster->width();
1184 return std::make_tuple(fEndLine.breakCluster() + 1, 0, width);
1188 auto width = fEndLine.widthWithGhostSpaces();
1191 width += cluster->width();
1200 return std::make_tuple(cluster, 0, width);
1301 SkVector::Make(fEndLine.width(), lineHeight),
1318 // after a line break when width is infinite
1343 softLineMaxIntrinsicWidth += cluster->width();
1349 // Placeholder width now counts in fMinIntrinsicWidth
1350 softLineMaxIntrinsicWidth += cluster->width();
1351 fMinIntrinsicWidth = std::max(fMinIntrinsicWidth, cluster->width());
1355 softLineMaxIntrinsicWidth += cluster->width();
1356 lastWordLength += cluster->width();