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

◆ send_to_back()

bool MayaFlux::Portal::Forma::Layer::send_to_back ( uint32_t  id)

Move element to the bottom of the hit-test order (drawn first).

Definition at line 98 of file Layer.cpp.

99{
100 if (auto rit = m_relations.find(id); rit != m_relations.end()) {
101 for (uint32_t rel_id : rit->second)
102 send_to_back(rel_id);
103 }
104
105 auto it = std::ranges::find_if(m_elements,
106 [id](const Element& e) { return e.id == id; });
107 if (it == m_elements.end())
108 return false;
109 std::rotate(m_elements.begin(), it, it + 1);
110 return true;
111}
std::vector< Element > m_elements
Definition Layer.hpp:280
bool send_to_back(uint32_t id)
Move element to the bottom of the hit-test order (drawn first).
Definition Layer.cpp:98
std::unordered_map< uint32_t, std::vector< uint32_t > > m_relations
Definition Layer.hpp:283

References MayaFlux::Portal::Forma::Element::id, m_elements, m_relations, and send_to_back().

Referenced by send_to_back().

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