From 71c4964174e6364449128682f62534b31771ffe2 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Mon, 12 May 2008 22:06:07 -0500 Subject: [PATCH] Don't always draw waveforms inverted! --- Timeline/Waveform.C | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Timeline/Waveform.C b/Timeline/Waveform.C index 8610f40..8c470e4 100644 --- a/Timeline/Waveform.C +++ b/Timeline/Waveform.C @@ -83,8 +83,8 @@ Waveform::draw ( int X, int Y, int W, int H, else fl_color( color ); - const int ty = mid + ( halfheight * p.min ); - const int by = mid + ( halfheight * p.max ); + const int ty = mid - ( halfheight * p.min ); + const int by = mid - ( halfheight * p.max ); fl_line( x, ty, x, by ); /* if ( outline ) */ @@ -112,7 +112,7 @@ Waveform::draw ( int X, int Y, int W, int H, j = start; for ( int x = X; x < X + W; ++x, j += skip ) - fl_vertex( x, ty + ( halfheight * pbuf[ j ].min ) ); + fl_vertex( x, ty - ( halfheight * pbuf[ j ].min ) ); fl_end_line(); @@ -121,7 +121,7 @@ Waveform::draw ( int X, int Y, int W, int H, j = start; for ( int x = X; x < X + W; ++x, j += skip ) - fl_vertex( x, ty + ( halfheight * pbuf[ j ].max ) ); + fl_vertex( x, ty - ( halfheight * pbuf[ j ].max ) ); fl_end_line();