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

◆ set_clip()

bool MayaFlux::Portal::Forma::Layer::set_clip ( uint32_t  id,
std::optional< Kinesis::AABB2D >  clip 
)

Confine hit testing of an element to a region, or lift the confinement with std::nullopt.

The clip survives set_bounds, set_contains and Mapped::sync, which rewrite the element's own shape but not where it may be hit.

Returns
True if found.

Definition at line 73 of file Layer.cpp.

74{
75 if (auto* el = get(id)) {
76 el->clip = clip;
77 return true;
78 }
79 return false;
80}
const Element * get(uint32_t id) const
Definition Layer.cpp:272

References get().

Referenced by MayaFlux::Portal::Forma::Scrollable::track().

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