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

◆ apply_scroll() [2/2]

MAYAFLUX_API void MayaFlux::Kinesis::apply_scroll ( ScrollState &  state,
glm::vec2  delta 
)
noexcept

Add a content-space delta to the offset and clamp to content_bounds.

Definition at line 24 of file ScrollState.cpp.

25{
27 state.offset + delta,
28 glm::vec2(state.viewport_bounds.width(), state.viewport_bounds.height()),
29 state.content_bounds);
30}
glm::vec2 clamp_offset_to_content(glm::vec2 offset, glm::vec2 viewport_extent, AABB2D content_bounds) noexcept
Clamp a content-space offset so a viewport of the given extent never scrolls past the edges of a cont...
float height() const noexcept
Definition Bounds.hpp:80
float width() const noexcept
Definition Bounds.hpp:79

References clamp_offset_to_content().

+ Here is the call graph for this function: