+ struct CacheEntry {
+ int channel;
+ Coord height;
+ float amplitude;
+ Color fill_color;
+ framepos_t start;
+ framepos_t end;
+ Cairo::RefPtr<Cairo::ImageSurface> image;
+
+ CacheEntry(int chan, Coord hght, float amp, Color fcl, framepos_t strt, framepos_t ed, Cairo::RefPtr<Cairo::ImageSurface> img) :
+
+ channel (chan), height (hght), amplitude (amp), fill_color (fcl),
+ start (strt), end (ed), image (img) {}
+ };
+
+ /* final ImageSurface rendered with colours */
+ Cairo::RefPtr<Cairo::ImageSurface> _image;
+
+ /* Displays a single channel of waveform data for the given Region.
+
+ x = 0 in the waveview corresponds to the first waveform datum taken
+ from region->start() samples into the source data.
+
+ x = N in the waveview corresponds to the (N * spp)'th sample
+ measured from region->start() into the source data.
+
+ when drawing, we will map the zeroth-pixel of the waveview
+ into a window.
+
+ The waveview itself contains a set of pre-rendered Cairo::ImageSurfaces
+ that cache sections of the display. This is filled on-demand and
+ never cleared until something explicitly marks the cache invalid
+ (such as a change in samples_per_pixel, the log scaling, rectified or
+ other view parameters).
+ */
+
+
+ WaveView (Canvas *, boost::shared_ptr<ARDOUR::AudioRegion>);
+ WaveView (Item*, boost::shared_ptr<ARDOUR::AudioRegion>);
+ ~WaveView ();