comparison layer/TimeInstantLayer.cpp @ 1391:c39f2d439d59 spectrogramparam

Toward highlighting peaks on spectrum
author Chris Cannam
date Tue, 13 Nov 2018 15:16:48 +0000
parents 61418c112281
children c8a6fd3f9dff
comparison
equal deleted inserted replaced
1390:3c99083a4d83 1391:c39f2d439d59
189 frame - prevPoints.begin()->frame) { 189 frame - prevPoints.begin()->frame) {
190 usePoints = nextPoints; 190 usePoints = nextPoints;
191 } 191 }
192 192
193 if (!usePoints.empty()) { 193 if (!usePoints.empty()) {
194 int fuzz = 2; 194 int fuzz = ViewManager::scalePixelSize(2);
195 int px = v->getXForFrame(usePoints.begin()->frame); 195 int px = v->getXForFrame(usePoints.begin()->frame);
196 if ((px > x && px - x > fuzz) || 196 if ((px > x && px - x > fuzz) ||
197 (px < x && x - px > fuzz + 1)) { 197 (px < x && x - px > fuzz + 1)) {
198 usePoints.clear(); 198 usePoints.clear();
199 } 199 }