comparison layer/SpectrumLayer.cpp @ 1279:a04f1012fca2

Fix positioning of peak lines on spectrum layer (origin is already accounted for in the bin/frequency to x conversion functions)
author Chris Cannam
date Wed, 02 May 2018 14:26:51 +0100
parents a34a2a25907c
children 34394e8c2942
comparison
equal deleted inserted replaced
1275:3ca1be2e2c91 1279:a04f1012fca2
654 654
655 double norm = 0.f; 655 double norm = 0.f;
656 (void)getYForValue(v, values[bin], norm); // don't need return value, need norm 656 (void)getYForValue(v, values[bin], norm); // don't need return value, need norm
657 657
658 paint.setPen(mapper.map(norm)); 658 paint.setPen(mapper.map(norm));
659 paint.drawLine(xorigin + x, 0, xorigin + x, v->getPaintHeight() - pkh - 1); 659 paint.drawLine(x, 0, x, v->getPaintHeight() - scaleh - pkh - 1);
660 } 660 }
661 661
662 paint.restore(); 662 paint.restore();
663 } 663 }
664 664