comparison layer/SpectrogramLayer.cpp @ 1112:d578b685d912 spectrogram-minor-refactor

Colourmap rotation (inelegantly)
author Chris Cannam
date Tue, 19 Jul 2016 10:12:30 +0100
parents 8abdefce36a6
children 261a00010918
comparison
equal deleted inserted replaced
1111:953ce409ccfb 1112:d578b685d912
843 } 843 }
844 844
845 void 845 void
846 SpectrogramLayer::setColourRotation(int r) 846 SpectrogramLayer::setColourRotation(int r)
847 { 847 {
848 invalidateRenderers();
849
850 if (r < 0) r = 0; 848 if (r < 0) r = 0;
851 if (r > 256) r = 256; 849 if (r > 256) r = 256;
852 int distance = r - m_colourRotation; 850 int distance = r - m_colourRotation;
853 851
854 if (distance != 0) { 852 if (distance != 0) {
855 //!!! rotatePalette(-distance); 853 //!!! rotatePalette(-distance);
856 m_colourRotation = r; 854 m_colourRotation = r;
857 } 855 }
856
857 invalidateRenderers(); //!!! in theory we shouldn't have to do this... but...
858 858
859 emit layerParametersChanged(); 859 emit layerParametersChanged();
860 } 860 }
861 861
862 void 862 void
1479 params.normalization = m_normalization; 1479 params.normalization = m_normalization;
1480 params.binDisplay = m_binDisplay; 1480 params.binDisplay = m_binDisplay;
1481 params.binScale = m_binScale; 1481 params.binScale = m_binScale;
1482 params.alwaysOpaque = true; 1482 params.alwaysOpaque = true;
1483 params.invertVertical = false; 1483 params.invertVertical = false;
1484 params.colourRotation = m_colourRotation;
1484 1485
1485 Preferences::SpectrogramSmoothing smoothing = 1486 Preferences::SpectrogramSmoothing smoothing =
1486 Preferences::getInstance()->getSpectrogramSmoothing(); 1487 Preferences::getInstance()->getSpectrogramSmoothing();
1487 params.interpolate = 1488 params.interpolate =
1488 (smoothing == Preferences::SpectrogramInterpolated || 1489 (smoothing == Preferences::SpectrogramInterpolated ||