46 #ifndef STAGE_MODEL_ZOOM_METRIC_H 47 #define STAGE_MODEL_ZOOM_METRIC_H 90 coveredTime()
const override 92 return zoomWindow_.overallSpan();
96 translateTimeToPixels (
TimeValue startTimePoint)
const override 98 return ZoomMetric::translateScreenDelta (
Offset{zoomWindow_.overallSpan().start(), startTimePoint});
102 translateScreenDelta (
Offset timeOffset)
const override 104 auto pxOffset = rational_cast<int64_t> (zoomWindow_.px_per_sec() *
_FSecs(timeOffset));
106 REQUIRE (abs (pxOffset) <= std::numeric_limits<int>::max());
107 return int(pxOffset);
111 applyScreenDelta(
Time anchor,
double deltaPx)
const override 113 return anchor +
Offset{int64_t(deltaPx) / zoomWindow_.px_per_sec()};
Mix-In to implement the DisplayMetric interface on top of a ZoomWindow component, directly embedded h...
Lumiera's internal time value datatype.
Specialised (abstracted) presentation context with positioning by coordinates.
A component to ensure uniform handling of zoom scale and visible interval on the timeline.
Lumiera GTK UI implementation root.
FSecs _FSecs(TimeValue const &timeVal)
Helpers for type detection, type rewriting and metaprogramming.
Offset measures a distance in time.
Abstraction: the current zoom- and navigation state of a view, possibly in multiple dimensions...
A time interval anchored at a specific point in time.
a family of time value like entities and their relationships.
basic constant internal time value.