comparison layer/TimeRulerLayer.cpp @ 1078:ee01a4062747 spectrogram-minor-refactor

Move drawVisibleText to PaintAssistant
author Chris Cannam
date Thu, 30 Jun 2016 12:40:22 +0100
parents 33d7e1a6747b
children a34a2a25907c
comparison
equal deleted inserted replaced
1077:5144d7185fb5 1078:ee01a4062747
17 17
18 #include "LayerFactory.h" 18 #include "LayerFactory.h"
19 19
20 #include "data/model/Model.h" 20 #include "data/model/Model.h"
21 #include "base/RealTime.h" 21 #include "base/RealTime.h"
22 #include "view/View.h"
23
22 #include "ColourDatabase.h" 24 #include "ColourDatabase.h"
23 #include "view/View.h" 25 #include "PaintAssistant.h"
24 26
25 #include <QPainter> 27 #include <QPainter>
26 28
27 #include <iostream> 29 #include <iostream>
28 #include <cmath> 30 #include <cmath>
322 324
323 if (v->getView()->getLayer(0) == this) { 325 if (v->getView()->getLayer(0) == this) {
324 // backmost layer, don't worry about outlining the text 326 // backmost layer, don't worry about outlining the text
325 paint.drawText(x+2 - tw/2, y, text); 327 paint.drawText(x+2 - tw/2, y, text);
326 } else { 328 } else {
327 v->drawVisibleText(paint, x+2 - tw/2, y, text, View::OutlinedText); 329 PaintAssistant::drawVisibleText(v, paint, x+2 - tw/2, y, text, PaintAssistant::OutlinedText);
328 } 330 }
329 } 331 }
330 } 332 }
331 333
332 paint.setPen(greyColour); 334 paint.setPen(greyColour);