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

◆ extent()

glm::vec2 MayaFlux::Portal::Text::TextRun::extent ( ) const

Size in pixels the run is drawn at.

render_bounds.x wide and at least one line high, so a region shorter than a line shows its text squeezed to fit rather than spilling past it. Fit the region onto this, not onto render_bounds.

Definition at line 68 of file TextRun.cpp.

69{
70 const GlyphAtlas* current = atlas();
71 const float line = current ? static_cast<float>(current->line_height()) : 0.F;
72 return { static_cast<float>(m_params.render_bounds.x),
73 std::max(static_cast<float>(m_params.render_bounds.y), line) };
74}
glm::vec2 current
GlyphAtlas * atlas() const
The atlas the run draws from: params().atlas, else the default.
Definition TextRun.cpp:38
Vruta::SoundRoutine line(float start_value, float end_value, float duration_seconds, uint32_t step_duration, bool restartable)
Creates a continuous interpolation generator between two values over time.
Definition Tasks.cpp:66
glm::uvec2 render_bounds
Hard render bounds in pixels.
Definition InkPress.hpp:88

References atlas(), current, m_params, and MayaFlux::Portal::Text::PressParams::render_bounds.

Referenced by MayaFlux::Portal::Forma::internal::TextSlice::map(), and vertices().

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