2#ifndef TextLine_DEFINED
3#define TextLine_DEFINED
74 bool empty()
const {
return fTextExcludingSpaces.
empty(); }
79 return fAdvance.
fX + (fEllipsis !=
nullptr ? fEllipsis->fAdvance.fX : 0);
123 std::vector<TextBox>& boxes)
const;
131 bool includeGhostSpaces,
149 void buildTextBlob(
TextRange textRange,
const TextStyle& style,
const ClipContext& context);
155 const ClipContext& context)
const;
161 const ClipContext& context)
const;
167 const ClipContext& context)
const;
184 std::unique_ptr<Run> fEllipsis;
189 bool fHasDecorations;
194 struct TextBlobRecord {
201 bool fClippingNeeded =
false;
205 const Run* fVisitor_Run;
208 bool fTextBlobCachePopulated;
SkScalar alphabeticBaseline() const
SkScalar ideographicBaseline() const
SkScalar baseline() const
std::variant< SkPaint, PaintID > SkPaintOrID
TextRange textWithNewlines() const
TextLine(const TextLine &)=delete
SkRect extendHeight(const ClipContext &context) const
void getRectsForPlaceholders(std::vector< TextBox > &boxes)
ClipContext measureTextInsideOneRun(TextRange textRange, const Run *run, SkScalar runOffsetInLine, SkScalar textOffsetInRunInLine, bool includeGhostSpaces, TextAdjustment textAdjustment) const
TextRange trimmedText() const
TextLine(TextLine &&)=default
void scanStyles(StyleType style, const RunStyleVisitor &visitor)
std::function< bool(const Cluster *cluster, ClusterIndex index, bool ghost)> ClustersVisitor
bool endsWithHardLineBreak() const
std::function< bool(const Run *run, SkScalar runOffset, TextRange textRange, SkScalar *width)> RunVisitor
SkScalar spacesWidth() const
void setAscentStyle(LineMetricStyle style)
void shiftVertically(SkScalar shift)
TextLine & operator=(const TextLine &)=delete
void format(TextAlign align, SkScalar maxWidth)
SkScalar iterateThroughSingleRunByStyles(TextAdjustment textAdjustment, const Run *run, SkScalar runOffset, TextRange textRange, StyleType styleType, const RunStyleVisitor &visitor) const
void visit(SkScalar x, SkScalar y)
void iterateThroughClustersInGlyphsOrder(bool reverse, bool includeGhosts, const ClustersVisitor &visitor) const
SkScalar widthWithoutEllipsis() const
PositionWithAffinity getGlyphPositionAtCoordinate(SkScalar dx)
ClusterRange clusters() const
void setMaxRunMetrics(const InternalLineMetrics &metrics)
void createEllipsis(SkScalar maxWidth, const SkString &ellipsis, bool ltr)
void getRectsForRange(TextRange textRange, RectHeightStyle rectHeightStyle, RectWidthStyle rectWidthStyle, std::vector< TextBox > &boxes) const
std::function< void(TextRange textRange, const TextStyle &style, const ClipContext &context)> RunStyleVisitor
SkScalar ideographicBaseline() const
InternalLineMetrics getMaxRunMetrics() const
std::vector< TextBlobRecord > fTextBlobCache
SkScalar alphabeticBaseline() const
void paint(ParagraphPainter *painter, SkScalar x, SkScalar y)
SkScalar baseline() const
TextLine & operator=(TextLine &&)=default
void ensureTextBlobCachePopulated()
LineMetrics getMetrics() const
InternalLineMetrics sizes() const
void setDescentStyle(LineMetricStyle style)
ClusterRange clustersWithSpaces() const
void iterateThroughVisualRuns(bool includingGhostSpaces, const RunVisitor &runVisitor) const
Dart_NativeFunction function
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
static constexpr SkPoint Make(float x, float y)
static constexpr SkRect MakeEmpty()
SkScalar fExcludedTrailingSpaces