void set_outline_color (Color);
void region_resized ();
+ void gain_changed ();
void set_show_zero_line (bool);
bool show_zero_line() const { return _show_zero; }
void set_zero_color (Color);
void set_clip_color (Color);
- void set_amplitude (double);
void set_logscaled (bool);
void set_gradient_depth (double);
double gradient_depth() const { return _gradient_depth; }
void set_shape (Shape);
- double amplitude() const { return _amplitude; }
+
/* currently missing because we don't need them (yet):
set_shape_independent();
static bool global_logscaled() { return _global_logscaled; }
static Shape global_shape() { return _global_shape; }
+ void set_amplitude_above_axis (double v);
+ double amplitude_above_axis () const { return _amplitude_above_axis; }
+
#ifdef CANVAS_COMPATIBILITY
void*& property_gain_src () {
return _foo_void;
void*& property_gain_function () {
return _foo_void;
}
- double& property_amplitude_above_axis () {
- return _foo_double;
- }
private:
void* _foo_void;
- bool _foo_bool;
- int _foo_int;
- Color _foo_uint;
- double _foo_double;
+
#endif
+ /** A cached, pre-rendered image of some section of a waveform.
+
+ It spans a range given relative to the start of the source
+ of the waveform data, so a range from N..M corresponds
+ to the sample range N..M within the source.
+
+ Invalidated by a changes to:
+
+ samples_per_pixel
+ colors
+ height
+
+ */
+
class CacheEntry
{
- public:
- CacheEntry (WaveView const *, int, int);
+ public:
+ CacheEntry (WaveView const *, double, double, int);
~CacheEntry ();
- int start () const {
+ double start () const {
return _start;
}
- int end () const {
+ double end () const {
return _end;
}
Coord position (Coord) const;
WaveView const * _wave_view;
- int _start;
- int _end;
- int _n_peaks;
+
+ double _start;
+ double _end;
+ int _n_peaks;
+
boost::shared_array<ARDOUR::PeakData> _peaks;
Cairo::RefPtr<Cairo::ImageSurface> _image;
};
bool _logscaled;
Shape _shape;
double _gradient_depth;
- double _amplitude;
bool _shape_independent;
bool _logscaled_independent;
bool _gradient_depth_independent;
+ double _amplitude_above_axis;
/** The `start' value to use for the region; we can't use the region's
* value as the crossfade editor needs to alter it.
*/
ARDOUR::frameoffset_t _region_start;
-
+
mutable std::list<CacheEntry*> _cache;
PBD::ScopedConnection invalidation_connection;