Searched defs:textStyle (Results 1 - 7 of 7) sorted by relevance
| /third_party/skia/modules/skparagraph/src/ |
| H A D | Decorations.cpp | 27 SkScalar Decorations::calculateThickness(const TextStyle& textStyle, const TextLine::ClipContext& context) { in calculateThickness() argument 32 void Decorations::paint(ParagraphPainter* painter, const TextStyle& textStyle, const TextLine::ClipContext& context, SkScalar baseline) { in paint() argument 155 calculateGaps(const TextLine::ClipContext& context, const SkRect& rect, SkScalar baseline, SkScalar halo, const TextStyle& textStyle) calculateGaps() argument 201 calculateAvoidanceWaves(const TextStyle& textStyle, SkRect clip) calculateAvoidanceWaves() argument 234 calculateThickness(TextStyle textStyle, sk_sp<SkTypeface> typeface) calculateThickness() argument [all...] |
| H A D | OneLineShaper.cpp | 438 void OneLineShaper::matchResolvedFonts(const TextStyle& textStyle, argument [all...] |
| H A D | TextLine.cpp | 1127 TextStyle textStyle = fOwner->paragraphStyle().getTextStyle(); local [all...] |
| H A D | ParagraphImpl.cpp | 1458 TextStyle textStyle = paragraphStyle().getTextStyle(); in GetLineFontMetrics() local 1693 SkASSERT(blockIndex < SkToSizeT(fTextStyles.size())); return fTextStyles[blockIndex]; } void ParagraphImpl::setState(InternalState state) { if (fState <= state) { fState = state; return; } fState = state; switch (fState) { case kUnknown: SkASSERT(false); [[fallthrough]]; case kIndexed: fRuns.reset(); fClusters.reset(); [[fallthrough]]; case kShaped: fLines.reset(); [[fallthrough]]; case kLineBroken: fPicture = nullptr; [[fallthrough]]; default: break; } } void ParagraphImpl::computeEmptyMetrics() { bool emptyParagraph = fRuns.empty(); TextStyle textStyle = paragraphStyle().getTextStyle(); if (emptyParagraph && !fTextStyles.empty()) { textStyle = fTextStyles.back().fStyle; } auto typefaces = fontCollection()->findTypefaces( textStyle.getFontFamilies(), textStyle.getFontStyle(), textStyle.getFontArguments()); auto typeface = typefaces.empty() ? nullptr : typefaces.front(); SkFont font(typeface, textStyle.getFontSize()); fEmptyMetrics = InternalLineMetrics(font, paragraphStyle().getStrutStyle().getForceStrutHeight()); if (!paragraphStyle().getStrutStyle().getForceStrutHeight() && textStyle.getHeightOverride()) { const auto intrinsicHeight = fEmptyMetrics.fDescent - fEmptyMetrics.fAscent + fEmptyMetrics.fLeading; const auto strutHeight = textStyle.getHeight() * textStyle.getFontSize(); if (paragraphStyle().getStrutStyle().getHalfLeading()) { fEmptyMetrics.update( fEmptyMetrics.ascent(), fEmptyMetrics.descent(), fEmptyMetrics.leading() + strutHeight - intrinsicHeight); } else { const auto multiplier = strutHeight / intrinsicHeight; fEmptyMetrics.update( fEmptyMetrics.ascent() * multiplier, fEmptyMetrics.descent() * multiplier, fEmptyMetrics.leading() * multiplier); } } if (emptyParagraph) { auto disableFirstAscent = (paragraphStyle().getTextHeightBehavior() & TextHeightBehavior::kDisableFirstAscent) == TextHeightBehavior::kDisableFirstAscent; auto disableLastDescent = (paragraphStyle().getTextHeightBehavior() & TextHeightBehavior::kDisableLastDescent) == TextHeightBehavior::kDisableLastDescent; fEmptyMetrics.update( disableFirstAscent ? fEmptyMetrics.rawAscent() : fEmptyMetrics.ascent(), disableLastDescent ? fEmptyMetrics.rawDescent() : fEmptyMetrics.descent(), fEmptyMetrics.leading()); } if (fParagraphStyle.getStrutStyle().getStrutEnabled()) { fStrutMetrics.updateLineMetrics(fEmptyMetrics); } } SkString ParagraphImpl::getEllipsis() const { auto ellipsis8 = fParagraphStyle.getEllipsis(); auto ellipsis16 = fParagraphStyle.getEllipsisUtf16(); if (!ellipsis8.isEmpty()) { return ellipsis8; } else { return SkUnicode::convertUtf16ToUtf8(fParagraphStyle.getEllipsisUtf16()); } } WordBreakType ParagraphImpl::getWordBreakType() const { return fParagraphStyle.getStrutStyle().getWordBreakType(); } LineBreakStrategy ParagraphImpl::getLineBreakStrategy() const { return fParagraphStyle.getStrutStyle().getLineBreakStrategy(); } void ParagraphImpl::updateFontSize(size_t from, size_t to, SkScalar fontSize) { SkASSERT(from == 0 && to == fText.size()); auto defaultStyle = fParagraphStyle.getTextStyle(); defaultStyle.setFontSize(fontSize); fParagraphStyle.setTextStyle(defaultStyle); for (auto& textStyle : fTextStyles) { textStyle.fStyle.setFontSize(fontSize); } fState = std::min(fState, kIndexed); fOldWidth = 0; fOldHeight = 0; } void ParagraphImpl::updateTextAlign(TextAlign textAlign) { fParagraphStyle.setTextAlign(textAlign); if (fState >= kLineBroken) GetLineFontMetrics() argument 1866 updateTextStyleColorAndForeground(TextStyle& textStyle, SkColor color) GetLineFontMetrics() argument [all...] |
| /third_party/skia/modules/canvaskit/ |
| H A D | paragraph_bindings.cpp | 219 SimpleTextStyle textStyle; member [all...] |
| /third_party/skia/modules/skparagraph/tests/ |
| H A D | SkParagraphTest.cpp | 2581 TextStyle textStyle; in UNIX_ONLY_TEST() local 2645 TextStyle textStyle; in UNIX_ONLY_TEST() local 2748 TextStyle textStyle; UNIX_ONLY_TEST() local 2814 TextStyle textStyle; UNIX_ONLY_TEST() local 2936 TextStyle textStyle; UNIX_ONLY_TEST() local 3058 TextStyle textStyle; UNIX_ONLY_TEST() local 3180 TextStyle textStyle; DEF_TEST_DISABLED() local 3247 TextStyle textStyle; UNIX_ONLY_TEST() local 3341 TextStyle textStyle; UNIX_ONLY_TEST() local 3403 TextStyle textStyle; UNIX_ONLY_TEST() local 3507 TextStyle textStyle; UNIX_ONLY_TEST() local 3552 TextStyle textStyle; UNIX_ONLY_TEST() local 3590 TextStyle textStyle; UNIX_ONLY_TEST() local 5595 TextStyle textStyle; UNIX_ONLY_TEST() local 5626 TextStyle textStyle; UNIX_ONLY_TEST() local 6997 TextStyle textStyle; performGetRectsForRangeConcurrently() local [all...] |
| /third_party/skia/modules/skparagraph/samples/ |
| H A D | SampleParagraph.cpp | 987 TextStyle textStyle; in drawText() local 1057 TextStyle textStyle; in drawText() local 1152 TextStyle textStyle; drawText() local 1964 TextStyle textStyle; global() variable [all...] |
Completed in 19 milliseconds