comparison layer/SpectrogramLayer.cpp @ 278:a078aa2932cc

* Fix piano keyboard in spectrum, add pitch labels to frequency displays in measurement rect (clunkily done) and harmonic cursor in spectrum
author Chris Cannam
date Tue, 03 Jul 2007 18:47:39 +0000
parents 8acd30ed735c
children 47fe0352861e
comparison
equal deleted inserted replaced
277:8acd30ed735c 278:a078aa2932cc
2485 paint.drawLine(cursorPos.x(), 0, cursorPos.x(), v->height()); 2485 paint.drawLine(cursorPos.x(), 0, cursorPos.x(), v->height());
2486 2486
2487 float fundamental = getFrequencyForY(v, cursorPos.y()); 2487 float fundamental = getFrequencyForY(v, cursorPos.y());
2488 2488
2489 int sw = getVerticalScaleWidth(v, paint); 2489 int sw = getVerticalScaleWidth(v, paint);
2490 paint.drawText(sw + 2, cursorPos.y() - 2, QString("%1 Hz").arg(fundamental)); 2490 v->drawVisibleText(paint,
2491 sw + 2,
2492 cursorPos.y() - 2,
2493 QString("%1 Hz").arg(fundamental),
2494 View::OutlinedText);
2495
2496 //!!! and pitch label
2491 2497
2492 int harmonic = 2; 2498 int harmonic = 2;
2493 2499
2494 while (harmonic < 100) { 2500 while (harmonic < 100) {
2495 2501