Lines Matching defs:width
313 return attr.roundRectStyle.color != 0 && attr.rect.width() > 0;
356 maxRoundRectRadius = std::fmin(std::fmin(attr.rect.width(), attr.rect.height()), maxRoundRectRadius);
401 if (fBlockRange.width() == 1 &&
405 if (fClusterRange.width() == 0) {
428 /*size=*/glyphs.width(),
534 const Run* run, SkScalar runOffset, TextRange textRange, SkScalar* width) {
535 *width = this->iterateThroughSingleRunByStyles(
769 // Take leading whitespaces width but do not increment a whitespace patch number
794 textLen += cluster->width();
955 SkScalar width = fAdvance.fX;
981 if (width + ellipsisRun->advance().fX > maxWidth) {
983 width -= cluster.width();
987 if (std::floor(width) > 0) {
993 width -= cluster.width();
994 if (std::floor(width) > 0) {
1004 fAdvance.fX = width;
1023 if (SkScalarNearlyZero(width)) {
1030 fWidthWithSpaces = width;
1040 SkScalar width = fAdvance.fX;
1052 if (width + ellipsisRun->advance().fX > maxWidth) {
1053 width -= cluster.width();
1055 if (std::floor(width) > 0) {
1065 fAdvance.fX = width + ellipsisRun->advance().fX;
1078 fWidthWithSpaces = width;
1299 Cluster* end = &fOwner->cluster(fOwner->clusterIndex(textRange.end - (textRange.width() == 0 ? 0 : 1)));
1323 // Anything else (when we want the cluster width contain all the spaces -
1331 // Correct the width in case the text edges don't match clusters
1372 if (result.clip.width() < 0) {
1435 context.size = curGlyphRange.width();
1467 if (intersect.width() > 0) {
1490 return clipContext.clip.width();
1514 if (intersect.width() == 0) {
1528 size += intersect.width();
1535 size = intersect.width();
1549 textOffsetInRun += clipContext.clip.width();
1577 size = intersect.width();
1612 SkScalar width = 0;
1625 if (!processEllipsisRun(isAlreadyUseEllipsis, runOffset, ellipsisReadStrategy, visitor, width)) {
1628 totalWidth += width;
1635 if (!processEllipsisRun(isAlreadyUseEllipsis, runOffset, ellipsisReadStrategy, visitor, width)) {
1638 runOffset += width;
1639 totalWidth += width;
1644 if (lineIntersection.width() == 0 && this->width() != 0) {
1654 if (whitespaces.width() > 0) {
1656 TextAdjustment::GlyphCluster).clip.width();
1661 if (!visitor(run, runOffset, lineIntersection, &width)) {
1665 runOffset += width;
1666 totalWidth += width;
1670 if (!processEllipsisRun(isAlreadyUseEllipsis, runOffset, ellipsisReadStrategy, visitor, width)) {
1673 runOffset += width;
1674 totalWidth += width;
1678 if (!includingGhostSpaces && compareRound(totalWidth, this->width(), fOwner->getApplyRoundingHack()) != 0) {
1681 SkDebugf("ASSERT: %f != %f\n", totalWidth, this->width());
1689 SkScalar width = 0;
1697 if (lineIntersection.width() == 0 && this->width() != 0) {
1707 if (whitespaces.width() > 0) {
1708 auto whitespacesLen = measureTextInsideOneRun(whitespaces, run, runOffset, 0, true, false).clip.width();
1712 runOffset += width;
1713 totalWidth += width;
1714 if (!visitor(run, runOffset, lineIntersection, &width)) {
1719 runOffset += width;
1720 totalWidth += width;
1723 if (visitor(ellipsis(), runOffset, ellipsis()->textRange(), &width)) {
1724 totalWidth += width;
1730 if (!includingGhostSpaces && compareRound(totalWidth, this->width()) != 0) {
1731 SkDebugf("ASSERT: %f != %f\n", totalWidth, this->width());
1814 return (fGhostClusterRange.width() > 0 && fOwner->cluster(fGhostClusterRange.end - 1).isHardBreak()) ||
1930 trailingSpaces.fLeft = this->width();
1931 clip.fRight = this->width();
1949 trailingSpaces.fLeft = this->width();
1956 if (trailingSpaces.width() > 0) {
1994 if (!nearlyZero(trailingSpaces.width()) && !merge(trailingSpaces)) {
2001 auto lineEnd = this->offset().fX + this->width();
2034 if (SkScalarNearlyZero(this->width()) && SkScalarNearlyZero(this->spacesWidth())) {
2194 SkScalar* width) {
2197 *width = context.clip.width();
2199 if (textRange.width() == 0) {
2244 trailSpaces = fGhostClusterRange.width() - fClusterRange.width();
2292 std::unique_ptr<TextLineBase> TextLine::createTruncatedLine(double width, EllipsisModal ellipsisMode,
2295 if (width > 0 && (ellipsisMode == EllipsisModal::HEAD || ellipsisMode == EllipsisModal::TAIL)) {
2297 if (width < widthWithEllipsisSpaces() && !ellipsisStr.empty()) {
2301 textLine.createHeadEllipsis(width, SkString(ellipsisStr), true);
2307 textLine.createTailEllipsis(width, SkString(ellipsisStr), true, fOwner->getWordBreakType());
2417 SkScalar endAdvance = fOwner->cluster(fGhostClusterRange.end - endWhitespaceCount - 1).width();
2419 // The first space width of the line needs to be added to the x value.
2424 startWhitespaceAdvance += fOwner->cluster(clusterIndex).width();
2439 SkScalar lineWidth = width();
2444 SkScalar width = lineWidth - (endAdvance - endRect.x() - endRect.width()) - x;
2449 SkScalar width = lineWidth - (endAdvance - endRect.GetLeft() - endRect.GetWidth()) - x;
2453 rect.setXYWH(x, y, width, height);
2471 double characterWidth = fOwner->cluster(clusterIndex).width();
2495 offset += fOwner->cluster(clusterIndex).width();
2511 offset += cluster.width();
2522 double lineWidth = width();