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

◆ get_region_data()

std::vector< CompositeArray > MayaFlux::Kakshya::CompositeContainer::get_region_data ( const Region &  region) const
overridevirtual

Copy a one-dimensional Region into an owning CompositeArray.

Parameters
regionInclusive element range.
Returns
One array containing the selected elements, or empty on failure.

Implements MayaFlux::Kakshya::NDDataContainer< CompositeArray >.

Definition at line 71 of file CompositeContainer.cpp.

72{
73 const auto selected = m_data.slice(region);
74 if (!selected)
75 return {};
76
77 auto copy = copy_slice(*selected);
78 if (!copy)
79 return {};
80
81 std::vector<CompositeArray> result;
82 result.push_back(std::move(*copy));
83 return result;
84}
std::optional< CompositeSlice > slice(size_t start, size_t count) const
Borrow consecutive elements without copying.
CopiedText copy(std::string_view text, const LayoutResult &layout, size_t a, size_t b)
Copy a byte range: the text it spans, and the quads that render it.

References m_data, and MayaFlux::Kakshya::CompositeArray::slice().

Referenced by get_region_group_data(), and get_segments_data().

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