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), start (0), end (0), image (0) {}
- CacheEntry(int chan, Coord hght, float amp, framepos_t strt, framepos_t ed, Cairo::RefPtr<Cairo::ImageSurface> img) :
- channel (chan), height (hght), amplitude (amp), start (strt), end (ed), image (img) {}
+ 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) {}
};
/* Displays a single channel of waveform data for the given Region.
for (uint32_t i = 0; i < caches.size (); ++i) {
- if (_channel != caches[i].channel || _height != caches[i].height || _region_amplitude != caches[i].amplitude) {
+ if (_channel != caches[i].channel
+ || _height != caches[i].height
+ || _region_amplitude != caches[i].amplitude
+ || _fill_color != caches[i].fill_color
+ || _outline_color != caches[i].outline_color) {
+
continue;
}
for (uint32_t i = 0; i < caches.size (); ++i) {
- if (_channel != caches[i].channel || _height != caches[i].height || _region_amplitude != caches[i].amplitude) {
+ if (_channel != caches[i].channel
+ || _height != caches[i].height
+ || _region_amplitude != caches[i].amplitude
+ || _fill_color != caches[i].fill_color
+ || _outline_color != caches[i].outline_color) {
+
other_entries++;
continue;
}
for (uint32_t j = i; j < caches.size (); ++j) {
- if (i == j || _channel != caches[j].channel || _height != caches[i].height || _region_amplitude != caches[i].amplitude) {
+ if (i == j || _channel != caches[j].channel
+ || _height != caches[i].height
+ || _region_amplitude != caches[i].amplitude
+ || _fill_color != caches[i].fill_color
+ || _outline_color != caches[i].outline_color) {
+
continue;
}
*/
for (uint32_t i = 0; i < caches.size (); ++i) {
- if (_channel != caches[i].channel || _height != caches[i].height || _region_amplitude != caches[i].amplitude) {
+ if (_channel != caches[i].channel
+ || _height != caches[i].height
+ || _region_amplitude != caches[i].amplitude
+ || _fill_color != caches[i].fill_color
+ || _outline_color != caches[i].outline_color) {
+
continue;
}
draw_image (image, peaks.get(), n_peaks);
- _image_cache[_region->audio_source ()].push_back (CacheEntry (_channel, _height, _region_amplitude, sample_start, sample_end, image));
+ _image_cache[_region->audio_source ()].push_back (CacheEntry (_channel, _height, _region_amplitude, _fill_color, _outline_color, sample_start, sample_end, image));
image_offset = (sample_start - _region->start()) / _samples_per_pixel;