Mercurial > hg > svgui
diff layer/NoteLayer.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 | a34a2a25907c |
line wrap: on
line diff
--- a/layer/NoteLayer.cpp Thu Jun 30 10:59:11 2016 +0100 +++ b/layer/NoteLayer.cpp Thu Jun 30 12:40:22 2016 +0100 @@ -21,12 +21,13 @@ #include "base/Pitch.h" #include "base/LogRange.h" #include "base/RangeMapper.h" -#include "ColourDatabase.h" #include "view/View.h" +#include "ColourDatabase.h" #include "PianoScale.h" #include "LinearNumericalScale.h" #include "LogNumericalScale.h" +#include "PaintAssistant.h" #include "data/model/NoteModel.h" @@ -809,18 +810,18 @@ paint.setBrush(v->getForeground()); QString vlabel = QString("%1%2").arg(p.value).arg(getScaleUnits()); - v->drawVisibleText(paint, + PaintAssistant::drawVisibleText(v, paint, x - paint.fontMetrics().width(vlabel) - 2, y + paint.fontMetrics().height()/2 - paint.fontMetrics().descent(), - vlabel, LayerGeometryProvider::OutlinedText); + vlabel, PaintAssistant::OutlinedText); QString hlabel = RealTime::frame2RealTime (p.frame, m_model->getSampleRate()).toText(true).c_str(); - v->drawVisibleText(paint, + PaintAssistant::drawVisibleText(v, paint, x, y - h/2 - paint.fontMetrics().descent() - 2, - hlabel, LayerGeometryProvider::OutlinedText); + hlabel, PaintAssistant::OutlinedText); } paint.drawRect(x, y - h/2, w, h);