Mercurial > hg > svgui
comparison layer/SpectrumLayer.cpp @ 1374:631897ba9fca zoom
Merge from default branch
author | Chris Cannam |
---|---|
date | Tue, 06 Nov 2018 08:59:03 +0000 |
parents | d79e21855aef |
children | 2df1af7ac752 |
comparison
equal
deleted
inserted
replaced
1360:e848ea0850fe | 1374:631897ba9fca |
---|---|
416 if (fn.pointSize() > 8) { | 416 if (fn.pointSize() > 8) { |
417 fn.setPointSize(fn.pointSize() - 1); | 417 fn.setPointSize(fn.pointSize() - 1); |
418 paint.setFont(fn); | 418 paint.setFont(fn); |
419 } | 419 } |
420 | 420 |
421 ColourMapper mapper(m_colourMap, 0, 1); | 421 ColourMapper mapper(m_colourMap, m_colourInverted, 0, 1); |
422 paint.setPen(mapper.getContrastingColour()); | 422 paint.setPen(mapper.getContrastingColour()); |
423 | 423 |
424 int xorigin = m_xorigins[v->getId()]; | 424 int xorigin = m_xorigins[v->getId()]; |
425 paint.drawLine(xorigin, cursorPos.y(), v->getPaintWidth(), cursorPos.y()); | 425 paint.drawLine(xorigin, cursorPos.y(), v->getPaintWidth(), cursorPos.y()); |
426 paint.drawLine(cursorPos.x(), cursorPos.y(), cursorPos.x(), v->getPaintHeight()); | 426 paint.drawLine(cursorPos.x(), cursorPos.y(), cursorPos.x(), v->getPaintHeight()); |
616 paint.save(); | 616 paint.save(); |
617 paint.setRenderHint(QPainter::Antialiasing, false); | 617 paint.setRenderHint(QPainter::Antialiasing, false); |
618 | 618 |
619 ColourMapper mapper = | 619 ColourMapper mapper = |
620 hasLightBackground() ? | 620 hasLightBackground() ? |
621 ColourMapper(ColourMapper::BlackOnWhite, 0, 1) : | 621 ColourMapper(ColourMapper::BlackOnWhite, m_colourInverted, 0, 1) : |
622 ColourMapper(ColourMapper::WhiteOnBlack, 0, 1); | 622 ColourMapper(ColourMapper::WhiteOnBlack, m_colourInverted, 0, 1); |
623 | 623 |
624 int peakminbin = 0; | 624 int peakminbin = 0; |
625 int peakmaxbin = fft->getHeight() - 1; | 625 int peakmaxbin = fft->getHeight() - 1; |
626 double peakmaxfreq = Pitch::getFrequencyForPitch(128); | 626 double peakmaxfreq = Pitch::getFrequencyForPitch(128); |
627 peakmaxbin = int(((peakmaxfreq * fft->getHeight() * 2) / fft->getSampleRate())); | 627 peakmaxbin = int(((peakmaxfreq * fft->getHeight() * 2) / fft->getSampleRate())); |