Lines Matching refs:clip

381                 roundRectAttrs.push_back({style.getStyleId(), style.getBackgroundRect(), context.clip});
411 auto clip = SkRect::MakeXYWH(0.0f, this->sizes().runTop(&run, this->fAscentStyle),
430 /*clip=*/clip, // entire line
551 SkRect result = context.clip;
598 record.fClipRect = context.clip.makeOffset(this->offset());
671 painter->drawRect(context.clip.makeOffset(this->offset() + SkPoint::Make(x, y)),
729 SkRect clip = extendHeight(context);
730 clip.offset(x, y);
731 clip.offset(this->offset());
732 painter->clipRect(clip);
1221 if (compareRound(context.clip.fRight, fAdvance.fX, fOwner->getApplyRoundingHack()) > 0 && !includeGhostSpaces &&
1228 context.fExcludedTrailingSpaces = std::max(context.clip.fRight - fAdvance.fX, 0.0f);
1230 context.clip.fRight = fAdvance.fX;
1247 result.clip = SkRect::MakeXYWH(runOffsetInLine,
1255 result.clip = SkRect::MakeXYWH(runOffsetInLine,
1260 result.clip = SkRect::MakeXYWH(runOffsetInLine, run->fFontMetrics.fAscent, run->advance().fX, 0);
1325 result.clip =
1341 result.clip.fLeft, result.clip.fRight, leftCorrection, rightCorrection);
1345 result.clip.fLeft += leftCorrection;
1346 result.clip.fRight -= rightCorrection;
1349 result.clip.fRight -= leftCorrection;
1350 result.clip.fLeft += rightCorrection;
1354 result.clip.offset(textStartInLine, 0);
1355 //SkDebugf("@%f[%f:%f)\n", textStartInLine, result.clip.fLeft, result.clip.fRight);
1360 if (compareRound(result.clip.fRight, fAdvance.fX, fOwner->getApplyRoundingHack()) > 0 && !includeGhostSpaces) {
1366 result.fExcludedTrailingSpaces = std::max(result.clip.fRight - fAdvance.fX, 0.0f);
1368 result.clip.fRight = fAdvance.fX;
1372 if (result.clip.width() < 0) {
1375 result.clip.fRight = result.clip.fLeft;
1452 result.clip.fTop = this->sizes().runTop(run, LineMetricStyle::CSS) - run->baselineShift();
1453 result.clip.fBottom = result.clip.fTop +
1484 if (clipContext.clip.height() > 0 ||
1485 (run->isPlaceholder() && SkScalarNearlyZero(clipContext.clip.height()))) {
1487 if (clipContext.clip.height() > 0) {
1490 return clipContext.clip.width();
1549 textOffsetInRun += clipContext.clip.width();
1550 if (clipContext.clip.height() == 0) {
1559 clipContext.clip.fTop = run->fFontMetrics.fAscent + this->baseline();
1561 clipContext.clip.fTop = run->fFontMetrics.fAscent - run->fCorrectAscent;
1563 clipContext.clip.fBottom = clipContext.clip.fTop + run->fFontMetrics.fDescent -
1656 TextAdjustment::GlyphCluster).clip.width();
1708 auto whitespacesLen = measureTextInsideOneRun(whitespaces, run, runOffset, 0, true, false).clip.width();
1848 SkRect clip = context.clip;
1849 clip.offset(lineContext.fTextShift - context.fTextShift, 0);
1855 clip.fBottom = this->height();
1856 clip.fTop = this->sizes().delta();
1859 clip.fBottom = this->height();
1860 clip.fTop = this->sizes().delta();
1863 clip.fTop += verticalShift;
1868 clip.fBottom = this->height();
1869 clip.fTop = this->sizes().delta();
1871 clip.offset(0, verticalShift / 2.0);
1873 clip.fTop += verticalShift / 2.0;
1876 clip.fBottom -= verticalShift / 2.0;
1881 clip.fBottom = this->height();
1882 clip.fTop = this->sizes().delta();
1884 clip.offset(0, verticalShift);
1886 clip.fBottom -= verticalShift;
1896 clip.fTop = top + strutMetrics.ascent();
1897 clip.fBottom = top + strutMetrics.descent();
1906 clip.fTop = effectiveBaseline + run->ascent();
1907 clip.fBottom = effectiveBaseline + run->descent();
1928 trailingSpaces = clip;
1931 clip.fRight = this->width();
1934 clip.fLeft = 0;
1940 trailingSpaces = clip;
1943 clip.fLeft += delta;
1948 trailingSpaces = clip;
1951 clip.fRight -= delta;
1955 clip.offset(this->offset());
1961 auto merge = [&lastRun, &context, &boxes](SkRect clip) {
1977 if (nearlyEqual(lastBox.rect.fTop, clip.fTop) &&
1978 nearlyEqual(lastBox.rect.fBottom, clip.fBottom) &&
1979 (nearlyEqual(lastBox.rect.fLeft, clip.fRight) ||
1980 nearlyEqual(lastBox.rect.fRight, clip.fLeft)))
1982 lastBox.rect.fLeft = std::min(lastBox.rect.fLeft, clip.fLeft);
1983 lastBox.rect.fRight = std::max(lastBox.rect.fRight, clip.fRight);
1991 if (!merge(clip)) {
1992 boxes.emplace_back(clip, context.run->getTextDirection());
2058 // Correct the clip size because libtxt counts trailing spaces
2060 context.clip.fRight += context.fExcludedTrailingSpaces; // extending clip to the right
2064 // However, we need to offset the clip
2065 context.clip.offset(offsetX, 0.0f);
2068 if (SkScalarNearlyEqual(context.clip.fRight, dx, 0.01f)) {
2069 context.clip.fRight = dx;
2072 if (dx <= context.clip.fLeft) {
2096 if (dx >= context.clip.fRight) {
2136 SkScalar center = (context.clip.right() + context.clip.left()) / 2;
2197 *width = context.clip.width();
2206 SkRect clip = context.clip;
2207 clip.offset(this->offset());
2210 clip.fLeft = littleRound(clip.fLeft);
2211 clip.fRight = littleRound(clip.fRight);
2212 clip.fTop = littleRound(clip.fTop);
2213 clip.fBottom = littleRound(clip.fBottom);
2215 boxes.emplace_back(clip, run->getTextDirection());