diff base/View.h @ 15:47500c27ac26

* Add getXForFrame / getFrameForX in preference to using the zoom level everywhere
author Chris Cannam
date Mon, 30 Jan 2006 13:19:42 +0000
parents f67ddc287bc3
children cc98d496d52b
line wrap: on
line diff
--- a/base/View.h	Fri Jan 27 18:04:07 2006 +0000
+++ b/base/View.h	Mon Jan 30 13:19:42 2006 +0000
@@ -85,6 +85,17 @@
     virtual size_t getEndFrame() const;
 
     /**
+     * Return the pixel x-coordinate corresponding to a given sample
+     * frame (which may be negative).
+     */
+    int getXForFrame(long frame) const;
+
+    /**
+     * Return the closest frame to the given pixel x-coordinate.
+     */
+    long getFrameForX(int x) const;
+
+    /**
      * Return the zoom level, i.e. the number of frames per pixel.
      */
     virtual int getZoomLevel() const { return m_zoomLevel; }