diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-06-19 08:14:02 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-06-19 08:14:02 -0400 |
commit | 8491a015e33fd306548c324f32c0225a2bd866e2 (patch) | |
tree | 1d03c20b2ff8f7292e36c4ab88210d103f2baebd /libs/canvas/canvas/wave_view.h | |
parent | 1043357cc969061f503355f234752c8653043286 (diff) |
stop pixel jitter when changing waveview height.
To avoid pixel jitter, the top and bottom of each line in the waveview must be computed together in a single computation,
rather than independently.
Also, remove various height corrections and cairo translations that are not necessary or relevant anymore. A subsequent
commit for the GUI will pick up on this work to get the appearance completely correct
Diffstat (limited to 'libs/canvas/canvas/wave_view.h')
-rw-r--r-- | libs/canvas/canvas/wave_view.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libs/canvas/canvas/wave_view.h b/libs/canvas/canvas/wave_view.h index dda46512a9..bf0a4e8a5b 100644 --- a/libs/canvas/canvas/wave_view.h +++ b/libs/canvas/canvas/wave_view.h @@ -364,7 +364,19 @@ public: boost::shared_ptr<WaveViewCache::Entry> get_image (framepos_t start, framepos_t end, bool& full_image) const; boost::shared_ptr<WaveViewCache::Entry> get_image_from_cache (framepos_t start, framepos_t end, bool& full_image) const; - ArdourCanvas::Coord y_extent (double, bool) const; + struct LineTips { + double top; + double bot; + double spread; + bool clip_max; + bool clip_min; + + LineTips() : top (0.0), bot (0.0), clip_max (false), clip_min (false) {} + }; + + ArdourCanvas::Coord y_extent (double) const; + void compute_tips (ARDOUR::PeakData const & peak, LineTips& tips) const; + void draw_image (Cairo::RefPtr<Cairo::ImageSurface>&, ARDOUR::PeakData*, int n_peaks, boost::shared_ptr<WaveViewThreadRequest>) const; void draw_absent_image (Cairo::RefPtr<Cairo::ImageSurface>&, ARDOUR::PeakData*, int) const; |