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

◆ content_height()

float MayaFlux::Portal::Text::TextRun::content_height ( ) const

Height in pixels the text occupies, from the top of the first line to the bottom of the last.

Definition at line 76 of file TextRun.cpp.

77{
78 const GlyphAtlas* atlas = m_atlas;
79 if (!atlas) {
80 return 0.F;
81 }
82 return m_layout.final_pen_y - static_cast<float>(atlas->ascender())
83 + static_cast<float>(atlas->line_height());
84}
uint32_t line_height() const
Line advance in pixels for this atlas's pixel_size.
uint32_t ascender() const
Ascender in pixels for this atlas's pixel_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

References MayaFlux::Portal::Text::GlyphAtlas::ascender(), atlas(), MayaFlux::Portal::Text::LayoutResult::final_pen_y, MayaFlux::Portal::Text::GlyphAtlas::line_height(), m_atlas, and m_layout.

+ Here is the call graph for this function: