# HG changeset patch # User Chris Cannam # Date 1201185267 0 # Node ID b548a36f763320cf5a801911f944ed15d9a50bb5 # Parent 3a55cd5763343da012bec1b8bd74815f37adce71 * Fix duplication of zero'th column in the minus-one'th column position diff -r 3a55cd576334 -r b548a36f7633 layer/Colour3DPlotLayer.cpp --- a/layer/Colour3DPlotLayer.cpp Thu Jan 24 11:03:59 2008 +0000 +++ b/layer/Colour3DPlotLayer.cpp Thu Jan 24 14:34:27 2008 +0000 @@ -29,7 +29,7 @@ #include -//#define DEBUG_COLOUR_3D_PLOT_LAYER_PAINT 1 +#define DEBUG_COLOUR_3D_PLOT_LAYER_PAINT 1 Colour3DPlotLayer::Colour3DPlotLayer() : @@ -582,10 +582,14 @@ fillCache(sx0 < 0 ? 0 : sx0, sx1 < 0 ? 0 : sx1); +#ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT + std::cerr << "Colour3DPlotLayer::paint: height = "<< m_model->getHeight() << ", modelStart = " << modelStart << ", resolution = " << modelResolution << ", model rate = " << m_model->getSampleRate() << std::endl; +#endif + if (int(m_model->getHeight()) >= v->height() || int(modelResolution * m_model->getSampleRate()) < v->getZoomLevel() / 2) { #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT - std::cerr << "Colour3DPlotLayer::paint: height = "<< m_model->getHeight() << ", resolution = " << modelResolution << ", model rate = " << m_model->getSampleRate() << ", calling paintDense" << std::endl; + std::cerr << "calling paintDense" << std::endl; #endif paintDense(v, paint, rect); return; @@ -607,7 +611,7 @@ int fx = sx * int(modelResolution); - if (fx + int(modelResolution) < int(modelStart) || + if (fx + int(modelResolution) <= int(modelStart) || fx > int(modelEnd)) continue; int rx0 = v->getXForFrame(int((fx + int(modelStart)) * srRatio));