Mercurial > hg > svgui
comparison layer/SpectrogramLayer.cpp @ 180:29f01de27db4
* Add vertical zooming and snap-to-selection for OSC control;
add a demo script
author | Chris Cannam |
---|---|
date | Wed, 15 Nov 2006 18:22:26 +0000 |
parents | 05015e717a0d |
children | 42118892f428 |
comparison
equal
deleted
inserted
replaced
179:6a0d54f3f21a | 180:29f01de27db4 |
---|---|
2186 QPoint localPos; | 2186 QPoint localPos; |
2187 if (!v->shouldIlluminateLocalFeatures(this, localPos) || !m_model) { | 2187 if (!v->shouldIlluminateLocalFeatures(this, localPos) || !m_model) { |
2188 return; | 2188 return; |
2189 } | 2189 } |
2190 | 2190 |
2191 std::cerr << "SpectrogramLayer: illuminateLocalFeatures(" | 2191 // std::cerr << "SpectrogramLayer: illuminateLocalFeatures(" |
2192 << localPos.x() << "," << localPos.y() << ")" << std::endl; | 2192 // << localPos.x() << "," << localPos.y() << ")" << std::endl; |
2193 | 2193 |
2194 float s0, s1; | 2194 float s0, s1; |
2195 float f0, f1; | 2195 float f0, f1; |
2196 | 2196 |
2197 if (getXBinRange(v, localPos.x(), s0, s1) && | 2197 if (getXBinRange(v, localPos.x(), s0, s1) && |
2204 int x1 = v->getXForFrame((s1i + 1) * getWindowIncrement()); | 2204 int x1 = v->getXForFrame((s1i + 1) * getWindowIncrement()); |
2205 | 2205 |
2206 int y1 = getYForFrequency(v, f1); | 2206 int y1 = getYForFrequency(v, f1); |
2207 int y0 = getYForFrequency(v, f0); | 2207 int y0 = getYForFrequency(v, f0); |
2208 | 2208 |
2209 std::cerr << "SpectrogramLayer: illuminate " | 2209 // std::cerr << "SpectrogramLayer: illuminate " |
2210 << x0 << "," << y1 << " -> " << x1 << "," << y0 << std::endl; | 2210 // << x0 << "," << y1 << " -> " << x1 << "," << y0 << std::endl; |
2211 | 2211 |
2212 paint.setPen(Qt::white); | 2212 paint.setPen(Qt::white); |
2213 | 2213 |
2214 //!!! should we be using paintCrosshairs for this? | 2214 //!!! should we be using paintCrosshairs for this? |
2215 | 2215 |