Fix broken logic and possible NULL pointer dereference for Bundle XML.
[ardour.git] / libs / canvas / canvas / wave_view.h
index 042414e1e259d2463633f182584807bdc2857e7e..f26c3a5c104dfeb8c1ee6d31d973406b303943ad 100644 (file)
@@ -53,24 +53,24 @@ public:
                Normal,
                Rectified
         };
-       
+
        struct CacheEntry {
                int channel;
                Coord height;
                float amplitude;
                Color fill_color;
-               Color outline_color;
                framepos_t start;
                framepos_t end;
                Cairo::RefPtr<Cairo::ImageSurface> image;
-       CacheEntry() : 
-               channel (0), height (0), amplitude(0), fill_color (0), 
-                       outline_color (0), start (0), end (0), image (0) {} 
-       CacheEntry(int chan, Coord hght, float amp, Color fcol, Color ocol, 
-                  framepos_t strt, framepos_t ed, Cairo::RefPtr<Cairo::ImageSurface> img) :
-               channel (chan), height (hght), amplitude (amp), fill_color (fcol),
-                       outline_color (ocol), start (strt), end (ed), image (img) {} 
+
+       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.
 
@@ -192,7 +192,7 @@ private:
 
        void get_image (Cairo::RefPtr<Cairo::ImageSurface>& image, framepos_t start, framepos_t end, double& image_offset) const;
 
-        ArdourCanvas::Coord y_extent (double) const;
+        ArdourCanvas::Coord y_extent (double, bool) const;
        void draw_image (Cairo::RefPtr<Cairo::ImageSurface>&, ARDOUR::PeakData*, int) const;
 };