comparison layer/RegionLayer.cpp @ 1391:c39f2d439d59 spectrogramparam

Toward highlighting peaks on spectrum
author Chris Cannam
date Tue, 13 Nov 2018 15:16:48 +0000
parents d79e21855aef
children c8a6fd3f9dff 24234307c9b2
comparison
equal deleted inserted replaced
1390:3c99083a4d83 1391:c39f2d439d59
333 frame - long(prevPoints.begin()->frame)) { 333 frame - long(prevPoints.begin()->frame)) {
334 usePoints = nextPoints; 334 usePoints = nextPoints;
335 } 335 }
336 336
337 if (!usePoints.empty()) { 337 if (!usePoints.empty()) {
338 int fuzz = 2; 338 int fuzz = ViewManager::scalePixelSize(2);
339 int px = v->getXForFrame(usePoints.begin()->frame); 339 int px = v->getXForFrame(usePoints.begin()->frame);
340 if ((px > x && px - x > fuzz) || 340 if ((px > x && px - x > fuzz) ||
341 (px < x && x - px > fuzz + 1)) { 341 (px < x && x - px > fuzz + 1)) {
342 usePoints.clear(); 342 usePoints.clear();
343 } 343 }