diff layer/Colour3DPlotLayer.cpp @ 1078:ee01a4062747 spectrogram-minor-refactor

Move drawVisibleText to PaintAssistant
author Chris Cannam
date Thu, 30 Jun 2016 12:40:22 +0100
parents 5144d7185fb5
children 179ea8a2f650
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.cpp	Thu Jun 30 10:59:11 2016 +0100
+++ b/layer/Colour3DPlotLayer.cpp	Thu Jun 30 12:40:22 2016 +0100
@@ -21,6 +21,7 @@
 
 #include "ColourMapper.h"
 #include "LayerGeometryProvider.h"
+#include "PaintAssistant.h"
 
 #include "view/ViewManager.h"
 
@@ -867,12 +868,12 @@
 
         paint.setWorldMatrix(m);
 
-        v->drawVisibleText(paint, 2, 0, minstr, LayerGeometryProvider::OutlinedText);
+        PaintAssistant::drawVisibleText(v, paint, 2, 0, minstr, PaintAssistant::OutlinedText);
 
         m.translate(ch - msw - 2, 0);
         paint.setWorldMatrix(m);
 
-        v->drawVisibleText(paint, 0, 0, maxstr, LayerGeometryProvider::OutlinedText);
+        PaintAssistant::drawVisibleText(v, paint, 0, 0, maxstr, PaintAssistant::OutlinedText);
 
         paint.restore();
     }
@@ -1440,12 +1441,13 @@
 		    double value = m_model->getValueAt(sx, sy);
 		    snprintf(labelbuf, buflen, "%06f", value);
 		    QString text(labelbuf);
-		    v->drawVisibleText
-                        (paint,
+                    PaintAssistant::drawVisibleText
+                        (v,
+                         paint,
                          rx0 + 2,
                          ry0 - h / sh - 1 + 2 + paint.fontMetrics().ascent(),
                          text,
-                         LayerGeometryProvider::OutlinedText);
+                         PaintAssistant::OutlinedText);
 		}
 	    }
 	}