diff layer/SpectrogramLayer.h @ 477:92f4d88241b8

* some preparatory reorganisation
author Chris Cannam
date Tue, 03 Feb 2009 11:19:39 +0000
parents 2ed4e572d0d4
children 0990b95140e3
line wrap: on
line diff
--- a/layer/SpectrogramLayer.h	Mon Feb 02 17:07:47 2009 +0000
+++ b/layer/SpectrogramLayer.h	Tue Feb 03 11:19:39 2009 +0000
@@ -283,6 +283,11 @@
 
     Palette m_palette;
 
+    /**
+     * PixmapCache covers the area of the view, at view resolution.
+     * Not all of it is necessarily valid at once (it is refreshed
+     * in parts when scrolling, for example).
+     */
     struct PixmapCache
     {
         QPixmap pixmap;
@@ -294,6 +299,13 @@
     void invalidatePixmapCaches();
     void invalidatePixmapCaches(size_t startFrame, size_t endFrame);
     mutable ViewPixmapCache m_pixmapCaches;
+
+    /**
+     * When painting, we draw directly onto the draw buffer and then
+     * copy this to the part of the pixmap cache that needed refreshing
+     * before copying the pixmap cache onto the window.  (Remind me why
+     * we don't draw directly onto the cache?)
+     */
     mutable QImage m_drawBuffer;
 
     mutable QTimer *m_updateTimer;
@@ -401,6 +413,11 @@
     mutable std::vector<MagnitudeRange> m_columnMags;
     void invalidateMagnitudes();
     bool updateViewMagnitudes(View *v) const;
+    bool getColumnValues(View *v, FFTModel *fft, int x0, int x,
+                         int minbin, int maxbin,
+                         float displayMinFreq, float displayMaxFreq,
+                         const int h,
+                         const float *yforbin, float *yval) const;
 
     virtual void updateMeasureRectYCoords(View *v, const MeasureRect &r) const;
     virtual void setMeasureRectYCoord(View *v, MeasureRect &r, bool start, int y) const;