diff options
author | Robin Gareus <robin@gareus.org> | 2013-04-18 10:25:09 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-04-18 10:25:35 +0200 |
commit | b7aeb147f24ae6c5d98d2a2663cfadcb2169ca6f (patch) | |
tree | b19d9c52c5cc9fc6d4ffc85fc5843acc3ad0d3ca /libs | |
parent | 731b2c1ae93bcc266decccaad0675cf8eee54694 (diff) |
display waveform polarity correctly
* cairo's Y axis points downward -> invert phase display
* fix logarithmic view for value.max < 0
Diffstat (limited to 'libs')
-rw-r--r-- | libs/canvas/wave_view.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/canvas/wave_view.cc b/libs/canvas/wave_view.cc index 71f993a579..257901946f 100644 --- a/libs/canvas/wave_view.cc +++ b/libs/canvas/wave_view.cc @@ -444,7 +444,7 @@ WaveView::CacheEntry::image () if (y > 0.0) { context->line_to (i + 0.5, position (alt_log_meter (fast_coefficient_to_dB (y)))); } else if (y < 0.0) { - context->line_to (i + 0.5, position (alt_log_meter (fast_coefficient_to_dB (-y)))); + context->line_to (i + 0.5, position (-alt_log_meter (fast_coefficient_to_dB (-y)))); } else { context->line_to (i + 0.5, position (0.0)); } @@ -559,7 +559,7 @@ WaveView::CacheEntry::position (double s) const default: break; } - return (s+1.0) * (_wave_view->_height / 2.0); + return (1.0-s) * (_wave_view->_height / 2.0); } void |