diff layer/ColourMapper.cpp @ 274:b9380f679f70

* Fix centre line position * Fix failure to update overview when generating peaks from wav file * Provide y-coordinate scale values and differences for spectrum measurement mode, and fix values for waveform (inc dB for both) * Add Printer colour scheme (may be futile)
author Chris Cannam
date Mon, 02 Jul 2007 13:04:17 +0000
parents 28c8e8e3c537
children
line wrap: on
line diff
--- a/layer/ColourMapper.cpp	Fri Jun 29 16:50:59 2007 +0000
+++ b/layer/ColourMapper.cpp	Mon Jul 02 13:04:17 2007 +0000
@@ -39,7 +39,7 @@
 int
 ColourMapper::getColourMapCount()
 {
-    return 10;
+    return 11;
 }
 
 QString
@@ -59,6 +59,7 @@
     case FruitSalad:       return tr("Fruit Salad");
     case Banded:           return tr("Banded");
     case Highlight:        return tr("Highlight");
+    case Printer:          return tr("Printer");
     }
 
     return tr("<unknown>");
@@ -157,6 +158,28 @@
     case Highlight:
         if (norm > 0.99) return Qt::white;
         else return Qt::darkBlue;
+
+    case Printer:
+        if (norm > 0.8) {
+            r = 1.f;
+        } else if (norm > 0.7) {
+            r = 0.9f;
+        } else if (norm > 0.6) {
+            r = 0.8f;
+        } else if (norm > 0.5) {
+            r = 0.7f;
+        } else if (norm > 0.4) {
+            r = 0.6f;
+        } else if (norm > 0.3) {
+            r = 0.5f;
+        } else if (norm > 0.2) {
+            r = 0.4f;
+        } else {
+            r = 0.f;
+        }
+        r = g = b = 1.f - r;
+        hsv = false;
+        break;
     }
 
     if (hsv) {
@@ -203,6 +226,9 @@
 
     case Highlight:
         return Qt::red;
+
+    case Printer:
+        return Qt::red;
     }
 
     return Qt::white;