Flutter Engine
The Flutter Engine
|
Represents a collection of shaped text runs. More...
#include <text_frame.h>
Public Member Functions | |
TextFrame () | |
TextFrame (std::vector< TextRun > &runs, Rect bounds, bool has_color) | |
~TextFrame () | |
void | CollectUniqueFontGlyphPairs (FontGlyphMap &glyph_map, Scalar scale) const |
Rect | GetBounds () const |
The conservative bounding box for this text frame. | |
size_t | GetRunCount () const |
The number of runs in this text frame. | |
const std::vector< TextRun > & | GetRuns () const |
Returns a reference to all the text runs in this frame. | |
bool | MaybeHasOverlapping () const |
Whether any of the glyphs of this run are potentially overlapping. | |
GlyphAtlas::Type | GetAtlasType () const |
The type of atlas this run should be emplaced in. | |
TextFrame & | operator= (TextFrame &&other)=default |
TextFrame (const TextFrame &other)=default | |
Static Public Member Functions | |
static Scalar | RoundScaledFontSize (Scalar scale, Scalar point_size) |
Represents a collection of shaped text runs.
This object is typically the entrypoint in the Impeller type rendering subsystem.
Definition at line 20 of file text_frame.h.
|
default |
Definition at line 11 of file text_frame.cc.
|
default |
|
default |
void impeller::TextFrame::CollectUniqueFontGlyphPairs | ( | FontGlyphMap & | glyph_map, |
Scalar | scale | ||
) | const |
Definition at line 70 of file text_frame.cc.
GlyphAtlas::Type impeller::TextFrame::GetAtlasType | ( | ) | const |
The type of atlas this run should be emplaced in.
Definition at line 28 of file text_frame.cc.
Rect impeller::TextFrame::GetBounds | ( | ) | const |
The conservative bounding box for this text frame.
Definition at line 16 of file text_frame.cc.
size_t impeller::TextFrame::GetRunCount | ( | ) | const |
The number of runs in this text frame.
Definition at line 20 of file text_frame.cc.
const std::vector< TextRun > & impeller::TextFrame::GetRuns | ( | ) | const |
Returns a reference to all the text runs in this frame.
Definition at line 24 of file text_frame.cc.
bool impeller::TextFrame::MaybeHasOverlapping | ( | ) | const |
Whether any of the glyphs of this run are potentially overlapping.
It is always safe to return true from this method. Generally, any large blobs of text should return true to avoid computationally complex calculations. This information is used to apply opacity peephole optimizations to text blobs.
Definition at line 33 of file text_frame.cc.
Definition at line 66 of file text_frame.cc.