diff layer/Colour3DPlotRenderer.cpp @ 1112:d578b685d912 spectrogram-minor-refactor

Colourmap rotation (inelegantly)
author Chris Cannam
date Tue, 19 Jul 2016 10:12:30 +0100
parents 67dd16e33a3d
children 261a00010918
line wrap: on
line diff
--- a/layer/Colour3DPlotRenderer.cpp	Tue Jul 19 09:36:21 2016 +0100
+++ b/layer/Colour3DPlotRenderer.cpp	Tue Jul 19 10:12:30 2016 +0100
@@ -370,7 +370,8 @@
             QRect r(rx0, ry1, rw, ry0 - ry1);
 
             float value = preparedColumn[sy - minbin];
-            QColor colour = m_params.colourScale.getColour(value, 0);//!!! +rotation
+            QColor colour = m_params.colourScale.getColour(value,
+                                                           m_params.colourRotation);
 
             if (rw == 1) {
                 paint.setPen(colour);
@@ -938,10 +939,10 @@
     m_drawBuffer = QImage(w, h, QImage::Format_Indexed8);
 
     for (int pixel = 0; pixel < 256; ++pixel) {
-        //!!! todo: colour rotation (here 0)
         m_drawBuffer.setColor
             ((unsigned char)pixel,
-             m_params.colourScale.getColourForPixel(pixel, 0).rgb());
+             m_params.colourScale.getColourForPixel
+             (pixel, m_params.colourRotation).rgb());
     }
 
     m_drawBuffer.fill(0);