summaryrefslogtreecommitdiff
path: root/gtk2_ardour/canvas-waveview.c
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-12-12 14:43:24 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-12-12 14:43:24 +0000
commitbc89fe0147c04b67141936d109c00dfd4d69cc4b (patch)
tree544ff450c40fe1f43853a8420228a26f27f1eafb /gtk2_ardour/canvas-waveview.c
parent30daaebaa2d90d6b0e8673143ccc3cacd7bd1753 (diff)
most of the 2.X->3.0 commit (up to rev 4299) except for gtk2_ardour/editor_canvas.cc; builds and runs and does a few specific things but expect it to be buggy for a while yet
git-svn-id: svn://localhost/ardour2/branches/3.0@4313 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/canvas-waveview.c')
-rw-r--r--gtk2_ardour/canvas-waveview.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk2_ardour/canvas-waveview.c b/gtk2_ardour/canvas-waveview.c
index dee5706c51..f929b31197 100644
--- a/gtk2_ardour/canvas-waveview.c
+++ b/gtk2_ardour/canvas-waveview.c
@@ -1359,8 +1359,9 @@ gnome_canvas_waveview_render (GnomeCanvasItem *item,
prev_pymax = pymax;
prev_pymin = pymin;
}
- }
- else if(waveview->filled && rectify) {
+
+ } else if (waveview->filled && rectify) {
+
int prev_pymax = -1;
int last_pymax = -1;
int next_pymax;
@@ -1611,11 +1612,10 @@ gnome_canvas_waveview_draw (GnomeCanvasItem *item,
int cache_index;
double zbegin, zend;
gboolean rectify;
- double n;
double origin;
double clip_length;
double xoff;
- double yoff;
+ double yoff = 0.0;
double ulx;
double uly;
double lrx;
@@ -1748,7 +1748,8 @@ gnome_canvas_waveview_draw (GnomeCanvasItem *item,
yoff = origin - (waveview->half_height * max) + 0.5;
- if (n == ulx) {
+ if (xoff == ulx) {
+ /* first point */
cairo_move_to (cr, xoff+0.5, yoff);
} else {
cairo_line_to (cr, xoff+0.5, yoff);