68 const std::vector<TextRun>&
GetRuns()
const;
104 std::optional<GlyphProperties> properties);
126 std::optional<GlyphProperties> GetProperties()
const;
128 void AppendFrameBounds(
const FrameBounds& frame_bounds);
130 void ClearFrameBounds();
132 void SetAtlasGeneration(
size_t value, intptr_t atlas_id);
134 std::vector<TextRun> runs_;
141 std::vector<FrameBounds> bound_values_;
143 size_t generation_ = 0;
144 intptr_t atlas_id_ = 0;
146 std::optional<GlyphProperties> properties_;
Represents a collection of shaped text runs.
static Rational RoundScaledFontSize(Scalar scale)
Rect GetBounds() const
The conservative bounding box for this text frame.
bool IsFrameComplete() const
Verifies that all glyphs in this text frame have computed bounds information.
GlyphAtlas::Type GetAtlasType() const
The type of atlas this run should be place in.
std::optional< Glyph > AsSingleGlyph() const
If this text frame contains a single glyph (such as for an Icon), then return it, otherwise std::null...
bool HasColor() const
Returns the paint color this text frame was recorded with.
Rational GetScale() const
const Matrix & GetTransform() const
const FrameBounds & GetFrameBounds(size_t index) const
Retrieve the frame bounds for the glyph at [index].
const Font & GetFont() const
Return the font of the first glyph run.
std::pair< size_t, intptr_t > GetAtlasGenerationAndID() const
size_t GetRunCount() const
The number of runs in this text frame.
void SetPerFrameData(Rational scale, Point offset, const Matrix &transform, std::optional< GlyphProperties > properties)
Store text frame scale, offset, and properties for hashing in th glyph atlas.
Matrix GetOffsetTransform() const
fml::StatusOr< flutter::DlPath > GetPath() const
static SubpixelPosition ComputeSubpixelPosition(const TextRun::GlyphPosition &glyph_position, AxisAlignment alignment, const Matrix &transform)
const std::vector< TextRun > & GetRuns() const
Returns a reference to all the text runs in this frame.