comparison layer/TimeValueLayer.cpp @ 1402:b0eeec95ab5b

Handle integer pixel scaling as well
author Chris Cannam
date Thu, 15 Nov 2018 14:18:26 +0000
parents 28075cc658c9
children c8a6fd3f9dff
comparison
equal deleted inserted replaced
1401:28075cc658c9 1402:b0eeec95ab5b
563 frame - prevPoints.begin()->frame) { 563 frame - prevPoints.begin()->frame) {
564 usePoints = nextPoints; 564 usePoints = nextPoints;
565 } 565 }
566 566
567 if (!usePoints.empty()) { 567 if (!usePoints.empty()) {
568 int fuzz = v->scaleSize(2); 568 double fuzz = v->scaleSize(2);
569 int px = v->getXForFrame(usePoints.begin()->frame); 569 int px = v->getXForFrame(usePoints.begin()->frame);
570 if ((px > x && px - x > fuzz) || 570 if ((px > x && px - x > fuzz) ||
571 (px < x && x - px > fuzz + 3)) { 571 (px < x && x - px > fuzz + 3)) {
572 usePoints.clear(); 572 usePoints.clear();
573 } 573 }