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, Point offset, const GlyphProperties &properties) const |
Rect | GetBounds () const |
The conservative bounding box for this text frame. More... | |
size_t | GetRunCount () const |
The number of runs in this text frame. More... | |
const std::vector< TextRun > & | GetRuns () const |
Returns a reference to all the text runs in this frame. More... | |
bool | HasColor () const |
Returns the paint color this text frame was recorded with. More... | |
GlyphAtlas::Type | GetAtlasType () const |
The type of atlas this run should be emplaced in. More... | |
TextFrame & | operator= (TextFrame &&other)=default |
TextFrame (const TextFrame &other)=default | |
Static Public Member Functions | |
static Point | ComputeSubpixelPosition (const TextRun::GlyphPosition &glyph_position, AxisAlignment alignment, Point offset, Scalar scale) |
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 19 of file text_frame.h.
|
default |
Definition at line 13 of file text_frame.cc.
|
default |
|
default |
void impeller::TextFrame::CollectUniqueFontGlyphPairs | ( | FontGlyphMap & | glyph_map, |
Scalar | scale, | ||
Point | offset, | ||
const GlyphProperties & | properties | ||
) | const |
Definition at line 87 of file text_frame.cc.
|
static |
Definition at line 68 of file text_frame.cc.
GlyphAtlas::Type impeller::TextFrame::GetAtlasType | ( | ) | const |
The type of atlas this run should be emplaced in.
Definition at line 30 of file text_frame.cc.
Rect impeller::TextFrame::GetBounds | ( | ) | const |
The conservative bounding box for this text frame.
Definition at line 18 of file text_frame.cc.
size_t impeller::TextFrame::GetRunCount | ( | ) | const |
The number of runs in this text frame.
Definition at line 22 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 26 of file text_frame.cc.
bool impeller::TextFrame::HasColor | ( | ) | const |
Returns the paint color this text frame was recorded with.
Non-bitmap/COLR fonts always use a black text color here, but COLR fonts can potentially use the paint color in the glyph atlas, so this color must be considered as part of the cache key.
Definition at line 35 of file text_frame.cc.
Definition at line 40 of file text_frame.cc.