comparison layer/SpectrumLayer.cpp @ 287:cd2492c5fe45

* Add SingleColourLayer to manage colours for layers that have a single predominant colour (i.e. most of them).
author Chris Cannam
date Thu, 12 Jul 2007 16:14:59 +0000
parents 9dd432665059
children 3101c68a00c1
comparison
equal deleted inserted replaced
286:7554ae119882 287:cd2492c5fe45
642 642
643 int xorigin = getVerticalScaleWidth(v, paint) + 1; 643 int xorigin = getVerticalScaleWidth(v, paint) + 1;
644 int w = v->width() - xorigin - 1; 644 int w = v->width() - xorigin - 1;
645 645
646 int pkh = 0; 646 int pkh = 0;
647 if (m_binScale == LogBins) pkh = 10; 647 //!!! if (m_binScale == LogBins) {
648 pkh = 10;
649 //!!! }
648 650
649 if (fft && m_showPeaks) { 651 if (fft && m_showPeaks) {
650 652
651 // draw peak lines 653 // draw peak lines
652 654
705 //unit -- we need to fix that and hoist this code as appropriate. 707 //unit -- we need to fix that and hoist this code as appropriate.
706 //Same really goes for any code in SpectrogramLayer that could be 708 //Same really goes for any code in SpectrogramLayer that could be
707 //relevant to Colour3DPlotLayer with unit Hz, but that's a bigger 709 //relevant to Colour3DPlotLayer with unit Hz, but that's a bigger
708 //proposition. 710 //proposition.
709 711
710 if (m_binScale == LogBins) { 712 // if (m_binScale == LogBins) {
711 713
712 int pkh = 10; 714 // int pkh = 10;
713 int h = v->height(); 715 int h = v->height();
714 716
715 // piano keyboard 717 // piano keyboard
716 //!!! should be in a new paintHorizontalScale()? 718 //!!! should be in a new paintHorizontalScale()?
717 // nice to have a piano keyboard class, of course 719 // nice to have a piano keyboard class, of course
777 } 779 }
778 780
779 ppx = px; 781 ppx = px;
780 px = x; 782 px = x;
781 } 783 }
782 } 784 // }
783 } 785 }
784 786
785 void 787 void
786 SpectrumLayer::getBiasCurve(BiasCurve &curve) const 788 SpectrumLayer::getBiasCurve(BiasCurve &curve) const
787 { 789 {