Mercurial > hg > svgui
diff layer/Colour3DPlotRenderer.cpp @ 1219:c06861dec245
Fix incorrect call to getColumn() that broke the peak-frequency spectrogram and close zoom levels of the colour 3d plot
author | Chris Cannam |
---|---|
date | Mon, 16 Jan 2017 10:00:19 +0000 |
parents | 4f1f3e1a4f63 |
children | eaab8bab3522 |
line wrap: on
line diff
--- a/layer/Colour3DPlotRenderer.cpp Fri Jan 13 15:44:39 2017 +0000 +++ b/layer/Colour3DPlotRenderer.cpp Mon Jan 16 10:00:19 2017 +0000 @@ -402,7 +402,7 @@ // peak pick -> distribute/interpolate -> apply display gain // this does the first three: - preparedColumn = getColumn(sx, minbin, nbins, false); + preparedColumn = getColumn(sx, minbin, nbins, -1); magRange.sample(preparedColumn); @@ -1078,7 +1078,7 @@ } if (sx != psx) { - preparedColumn = getColumn(sx, minbin, nbins, false); + preparedColumn = getColumn(sx, minbin, nbins, -1); magRange.sample(preparedColumn); psx = sx; } @@ -1119,10 +1119,15 @@ int iy = int(y + 0.5); if (iy < 0 || iy >= h) continue; - m_drawBuffer.setPixel - (x, - iy, - m_params.colourScale.getPixel(value)); + auto pixel = m_params.colourScale.getPixel(value); + +#ifdef DEBUG_COLOUR_PLOT_REPAINT +// SVDEBUG << "frequency " << freq << " for bin " << bin +// << " -> y = " << y << ", iy = " << iy << ", value = " +// << value << ", pixel " << pixel << "\n"; +#endif + + m_drawBuffer.setPixel(x, iy, pixel); } m_magRanges.push_back(magRange);