|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
| Element & MayaFlux::Portal::Forma::Element::with_text | ( | std::string_view | text, |
| std::optional< Portal::Text::PressParams > | params, | ||
| Kinesis::AABB2D | region = { .min = glm::vec2(-1.F), .max = glm::vec2(1.F) } |
||
| ) |
Draw text as glyph quads into the attached buffer.
The glyphs are sampled from the glyph atlas, which is bound at texture slot 0, so buffer must already be set and created with an additional_textures slot at index 0. The text is retained for subsequent set_text() and retarget() calls.
| text | UTF-8 string to draw. |
| params | PressParams (color, spans, background, render_bounds, atlas). render_bounds is the layout size in pixels, fitted onto region. Defaults apply when omitted. |
| region | NDC extent. Defaults to fullscreen. |
Definition at line 41 of file Element.cpp.
References buffer, MayaFlux::Portal::Forma::internal::TextSlice::make(), and text_slice.
Referenced by MayaFlux::Portal::Forma::TextField::place(), and MayaFlux::Portal::Forma::Plot::place_label().
Here is the call graph for this function:
Here is the caller graph for this function: