[Sv1-commits] SF.net SVN: sv1: [929] sonic-visualiser/trunk/layer/Colour3DPlotLayer.cpp
Brought to you by:
cannam
From: <ca...@us...> - 2008-01-24 14:34:29
|
Revision: 929 http://sv1.svn.sourceforge.net/sv1/?rev=929&view=rev Author: cannam Date: 2008-01-24 06:34:27 -0800 (Thu, 24 Jan 2008) Log Message: ----------- * Fix duplication of zero'th column in the minus-one'th column position Modified Paths: -------------- sonic-visualiser/trunk/layer/Colour3DPlotLayer.cpp Modified: sonic-visualiser/trunk/layer/Colour3DPlotLayer.cpp =================================================================== --- sonic-visualiser/trunk/layer/Colour3DPlotLayer.cpp 2008-01-24 11:03:59 UTC (rev 928) +++ sonic-visualiser/trunk/layer/Colour3DPlotLayer.cpp 2008-01-24 14:34:27 UTC (rev 929) @@ -29,7 +29,7 @@ #include <cassert> -//#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)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |