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

◆ set_text()

void MayaFlux::Portal::Forma::Element::set_text ( std::string_view  text,
std::optional< Portal::Text::PressParams >  params 
)

Replace the text drawn by with_text().

No-op when the element was not constructed via with_text().

Parameters
textNew UTF-8 string.
paramsPressParams. Defaults apply when omitted.

Definition at line 54 of file Element.cpp.

55{
56 if (!text_slice)
57 return;
58
59 text_slice->assign(text, params.value_or(Portal::Text::PressParams {}));
60}
std::shared_ptr< internal::TextSlice > text_slice
Text drawn into the attached buffer by with_text().
Definition Element.hpp:89

References text_slice.