# HG changeset patch # User Chris Cannam # Date 1244198905 0 # Node ID 0cc658fe14239586a3dfd02c43736a33d005a033 # Parent aca01b3af29fbdb50a0491dc56bbb05a9460ec98 * Fix colour 3d plot's habit of repeating column 0 in column -1's position diff -r aca01b3af29f -r 0cc658fe1423 layer/Colour3DPlotLayer.cpp --- a/layer/Colour3DPlotLayer.cpp Fri May 22 15:50:10 2009 +0000 +++ b/layer/Colour3DPlotLayer.cpp Fri Jun 05 10:48:25 2009 +0000 @@ -1410,9 +1410,9 @@ targetLine[x] = 0; float sx0 = sxa[x*2]; + if (sx0 < 0) continue; int sx0i = int(sx0 + epsilon); if (sx0i >= sw) break; - if (sx0i < 0) continue; float a, b, value; @@ -1488,10 +1488,13 @@ for (int x = 0; x < w; ++x) { - int sx1i = int(sxa[x*2 + 1]); - if (sx1i < 0) continue; + float sx1 = sxa[x*2 + 1]; + if (sx1 < 0) continue; + int sx1i = int(sx1); - int sx0i = int(sxa[x*2] + epsilon); + float sx0 = sxa[x*2]; + if (sx0 < 0) continue; + int sx0i = int(sx0 + epsilon); if (sx0i >= sw) break; uchar peak = 0;