Mercurial > hg > svcore
diff base/Layer.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 | 1fa7cc0d008b |
children | 4563a72c1d8b |
line wrap: on
line diff
--- a/base/Layer.h Fri Jan 27 18:04:07 2006 +0000 +++ b/base/Layer.h Mon Jan 30 13:19:42 2006 +0000 @@ -149,6 +149,17 @@ virtual void setObjectName(const QString &name); /** + * 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; + + /** * Convert the layer's data (though not those of the model it * refers to) into an XML string for file output. This class * implements the basic name/type/model-id output; subclasses will