Projects a visible musical-time range onto a horizontal pixel span. More...
#include <viewport_projection.hpp>
Public Member Functions | |
| float | x_at (timebase::TickPosition tick) const noexcept |
| timebase::TickPosition | tick_at (float x) const noexcept |
| constexpr timebase::TickPosition | visible_start () const noexcept |
| constexpr timebase::TickDuration | visible_duration () const noexcept |
| constexpr timebase::TickPosition | visible_end () const noexcept |
| constexpr PixelSpan | pixels () const noexcept |
Static Public Member Functions | |
| static runtime::Result< TickProjection, ViewportProjectionError > | create (timebase::TickPosition visible_start, timebase::TickDuration visible_duration, PixelSpan pixels) noexcept |
Projects a visible musical-time range onto a horizontal pixel span.
Forward projection is intentionally not clipped: renderers need offscreen points to preserve the slope of lines crossing a viewport edge. The inverse is a pointer lookup and clamps to the visible range before rounding to the nearest canonical tick.
|
staticnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
nodiscardnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
inlinenodiscardconstexprnoexcept |
|
nodiscardnoexcept |