diff layer/LayerGeometryProvider.h @ 1085:179ea8a2f650 spectrogram-minor-refactor

Add VerticalBinLayer to SpectrogramLayer
author Chris Cannam
date Fri, 01 Jul 2016 17:54:31 +0100
parents 5b4fe7bb9430
children c8c747783110
line wrap: on
line diff
--- a/layer/LayerGeometryProvider.h	Fri Jul 01 11:37:46 2016 +0100
+++ b/layer/LayerGeometryProvider.h	Fri Jul 01 17:54:31 2016 +0100
@@ -103,23 +103,26 @@
     virtual int getViewXForX(int x) const = 0;
     
     /**
-     * Return the pixel y-coordinate corresponding to a given
-     * frequency, if the frequency range is as specified.  This does
-     * not imply any policy about layer frequency ranges, but it might
-     * be useful for layers to match theirs up if desired.
+     * Return the (maybe fractional) pixel y-coordinate corresponding
+     * to a given frequency, if the frequency range is as specified.
+     * This does not imply any policy about layer frequency ranges,
+     * but it might be useful for layers to match theirs up if
+     * desired.
      *
      * Not thread-safe in logarithmic mode.  Call only from GUI thread.
      */
-    virtual double getYForFrequency(double frequency, double minFreq, double maxFreq, 
+    virtual double getYForFrequency(double frequency,
+                                    double minFreq, double maxFreq, 
                                     bool logarithmic) const = 0;
 
     /**
-     * Return the closest frequency to the given pixel y-coordinate,
-     * if the frequency range is as specified.
+     * Return the closest frequency to the given (maybe fractional)
+     * pixel y-coordinate, if the frequency range is as specified.
      *
      * Not thread-safe in logarithmic mode.  Call only from GUI thread.
      */
-    virtual double getFrequencyForY(int y, double minFreq, double maxFreq,
+    virtual double getFrequencyForY(double y,
+                                    double minFreq, double maxFreq,
                                     bool logarithmic) const = 0;
 
     virtual int getTextLabelHeight(const Layer *layer, QPainter &) const = 0;