Represents a collection of shaped text runs.
void SetPerFrameData(Scalar scale, Point offset, const Matrix &transform, std::optional< GlyphProperties > properties)
Store text frame scale, offset, and properties for hashing in th glyph atlas.
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.
bool HasColor() const
Returns the paint color this text frame was recorded with.
const FrameBounds & GetFrameBounds(size_t index) const
Retrieve the frame bounds for the glyph at [index].
const Matrix & GetTransform() const
std::pair< size_t, intptr_t > GetAtlasGenerationAndID() const
static Point ComputeSubpixelPosition(const TextRun::GlyphPosition &glyph_position, AxisAlignment alignment, const Matrix &transform)
TextFrame(const TextFrame &other)=default
size_t GetRunCount() const
The number of runs in this text frame.
Matrix GetOffsetTransform() const
TextFrame & operator=(TextFrame &&other)=default
static Scalar RoundScaledFontSize(Scalar scale)
const std::vector< TextRun > & GetRuns() const
Returns a reference to all the text runs in this frame.