Mercurial > hg > svgui
comparison view/View.cpp @ 1085:179ea8a2f650 spectrogram-minor-refactor
Add VerticalBinLayer to SpectrogramLayer
author | Chris Cannam |
---|---|
date | Fri, 01 Jul 2016 17:54:31 +0100 |
parents | ee01a4062747 |
children | 0edfed2c8482 |
comparison
equal
deleted
inserted
replaced
1084:db976e9f385a | 1085:179ea8a2f650 |
---|---|
413 return h - (h * (frequency - minf)) / (maxf - minf); | 413 return h - (h * (frequency - minf)) / (maxf - minf); |
414 } | 414 } |
415 } | 415 } |
416 | 416 |
417 double | 417 double |
418 View::getFrequencyForY(int y, | 418 View::getFrequencyForY(double y, |
419 double minf, | 419 double minf, |
420 double maxf, | 420 double maxf, |
421 bool logarithmic) const | 421 bool logarithmic) const |
422 { | 422 { |
423 int h = height(); | 423 double h = height(); |
424 | 424 |
425 if (logarithmic) { | 425 if (logarithmic) { |
426 | 426 |
427 static double lastminf = 0.0, lastmaxf = 0.0; | 427 static double lastminf = 0.0, lastmaxf = 0.0; |
428 static double logminf = 0.0, logmaxf = 0.0; | 428 static double logminf = 0.0, logmaxf = 0.0; |