diff layer/WaveformLayer.h @ 718:e5f4385615ac tony_integration

Merge from tonioni branch
author Chris Cannam
date Tue, 28 Jan 2014 15:02:09 +0000
parents def489f5ce92
children 1d526ba11a24
line wrap: on
line diff
--- a/layer/WaveformLayer.h	Wed Dec 04 14:00:27 2013 +0000
+++ b/layer/WaveformLayer.h	Tue Jan 28 15:02:09 2014 +0000
@@ -147,6 +147,19 @@
     Scale getScale() const { return m_scale; }
 
     /**
+     * Specify the height of the middle of the waveform track or
+     * tracks within the layer, from 0.0 to 1.0.
+     *
+     * A value of 0.0 would indicate that the waveform occupies
+     * effectively no space at the very top of the layer; 1.0 would
+     * indicate that the waveform occupies no space at the very
+     * bottom; the default value of 0.5 indicates that it occupies the
+     * whole layer, centred at the middle.
+     */
+    void setMiddleLineHeight(float height);
+    float getMiddleLineHeight() const { return m_middleLineHeight; }
+
+    /**
      * Enable or disable aggressive pixmap cacheing.  If enabled,
      * waveforms will be rendered to an off-screen pixmap and
      * refreshed from there instead of being redrawn from the peak
@@ -216,6 +229,7 @@
     ChannelMode  m_channelMode;
     int          m_channel;
     Scale        m_scale;
+    float        m_middleLineHeight;
     bool         m_aggressive;
 
     mutable std::vector<float> m_effectiveGains;