MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ lay_out_text()

void MayaFlux::Portal::Text::TextRun::lay_out_text ( )
private

Definition at line 49 of file TextRun.cpp.

50{
51 GlyphAtlas* current = atlas();
52 if (!current) {
54 "TextRun: no atlas available, call set_default_font first");
55 m_layout = {};
56 m_atlas = nullptr;
57 m_atlas_size = 0;
58 return;
59 }
60
62 m_text, *current, 0.F, static_cast<float>(current->ascender()),
63 m_params.render_bounds.x, k_tab_width);
66}
#define MF_ERROR(comp, ctx,...)
glm::vec2 current
uint32_t atlas_size() const
Atlas texture dimension (width == height == atlas_size).
GlyphAtlas * atlas() const
The atlas the run draws from: params().atlas, else the default.
Definition TextRun.cpp:38
const GlyphAtlas * m_atlas
Definition TextRun.hpp:105
@ API
API calls from external code.
@ Portal
High-level user-facing API layer.
LayoutResult lay_out(std::string_view text, GlyphAtlas &atlas, float pen_x, float pen_y, uint32_t wrap_w, uint32_t tab_width)
Lay out a UTF-8 string into a sequence of screen-space quads.
glm::uvec2 render_bounds
Hard render bounds in pixels.
Definition InkPress.hpp:88

References MayaFlux::Journal::API, atlas(), MayaFlux::Portal::Text::GlyphAtlas::atlas_size(), current, MayaFlux::Portal::Text::lay_out(), m_atlas, m_atlas_size, m_layout, m_params, m_text, MF_ERROR, MayaFlux::Journal::Portal, and MayaFlux::Portal::Text::PressParams::render_bounds.

Referenced by assign(), caret(), index_at(), set(), set_params(), and vertices().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: