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

◆ make()

std::shared_ptr< TextSlice > MayaFlux::Portal::Forma::internal::TextSlice::make ( FormaTarget  target,
Kinesis::AABB2D  bounds,
Text::PressParams  params,
std::string_view  text 
)
static

Draw text in bounds on target.

Parameters
targetWhere the vertices go.
boundsNDC region the run's render_bounds are fitted onto.
paramsColour, spans, background, render_bounds and atlas.
textUTF-8 text.

Definition at line 49 of file TextSlice.cpp.

54{
55 auto slice = std::shared_ptr<TextSlice>(new TextSlice(std::move(target), bounds, std::move(params)));
56 live_slices().push_back(slice);
57 slice->set(text);
58 return slice;
59}
TextSlice(FormaTarget target, Kinesis::AABB2D bounds, Text::PressParams params)
Definition TextSlice.cpp:42
Kinesis::AABB2D bounds() const noexcept
Definition TextSlice.hpp:57
std::vector< double > slice(std::span< const double > data, double start_ratio, double end_ratio)
Extract a contiguous slice by ratio, returning a new vector.

References bounds().

Referenced by MayaFlux::Portal::Forma::Element::with_text().

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