|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
|
noexcept |
Convert a pixel-space drag delta into a content-space delta.
Scales the fraction of the viewport a pointer moved by the content extent currently visible, so drag speed stays proportionate to scale: more content in view moves the result further per pixel than less. No sign convention is imposed; a caller applies whatever sign its own semantics need (a grabbed canvas moves opposite the drag, a dragged scrollbar thumb moves with it).
Shared by PanZoom2DState::apply_pan_zoom_pan and any CPU-side drag scroll: both are "drag the content by moving the viewport's frame over it," differing only in what consumes the result (a GPU ViewTransform versus a CPU layout offset).
| pixel_delta | Pixel-space delta. |
| visible_extent | Currently visible content extent (width, height), same units as the return value. |
| viewport_size_pixels | Viewport size in pixels the delta was measured against. |
Definition at line 5 of file ScrollState.cpp.
Referenced by apply_pan_zoom_pan().
Here is the caller graph for this function: