Mercurial > hg > svgui
diff layer/FlexiNoteLayer.cpp @ 1146:74f2706995b7 3.0-integration
Merge work on unified spectrogram and colour 3d plot caching renderer
author | Chris Cannam |
---|---|
date | Fri, 05 Aug 2016 15:05:02 +0100 |
parents | ee01a4062747 |
children | c39f2d439d59 |
line wrap: on
line diff
--- a/layer/FlexiNoteLayer.cpp Mon Jun 13 11:44:08 2016 +0100 +++ b/layer/FlexiNoteLayer.cpp Fri Aug 05 15:05:02 2016 +0100 @@ -22,15 +22,18 @@ #include "base/Pitch.h" #include "base/LogRange.h" #include "base/RangeMapper.h" + #include "ColourDatabase.h" -#include "view/View.h" - +#include "LayerGeometryProvider.h" #include "PianoScale.h" #include "LinearNumericalScale.h" #include "LogNumericalScale.h" +#include "PaintAssistant.h" #include "data/model/FlexiNoteModel.h" +#include "view/View.h" + #include "widgets/ItemEditDialog.h" #include "widgets/TextAbbrev.h" @@ -867,34 +870,34 @@ // paint.setBrush(v->getForeground()); QString vlabel = QString("freq: %1%2").arg(p.value).arg(m_model->getScaleUnits()); - // v->drawVisibleText(paint, + // PaintAssistant::drawVisibleText(v, paint, // x - paint.fontMetrics().width(vlabel) - 2, // y + paint.fontMetrics().height()/2 // - paint.fontMetrics().descent(), - // vlabel, View::OutlinedText); - v->drawVisibleText(paint, + // vlabel, PaintAssistant::OutlinedText); + PaintAssistant::drawVisibleText(v, paint, x, y - h/2 - 2 - paint.fontMetrics().height() - paint.fontMetrics().descent(), - vlabel, View::OutlinedText); + vlabel, PaintAssistant::OutlinedText); QString hlabel = "dur: " + QString(RealTime::frame2RealTime (p.duration, m_model->getSampleRate()).toText(true).c_str()); - v->drawVisibleText(paint, + PaintAssistant::drawVisibleText(v, paint, x, y - h/2 - paint.fontMetrics().descent() - 2, - hlabel, View::OutlinedText); + hlabel, PaintAssistant::OutlinedText); QString llabel = QString("%1").arg(p.label); - v->drawVisibleText(paint, + PaintAssistant::drawVisibleText(v, paint, x, y + h + 2 + paint.fontMetrics().descent(), - llabel, View::OutlinedText); + llabel, PaintAssistant::OutlinedText); QString nlabel = QString("%1").arg(noteNumber); - v->drawVisibleText(paint, + PaintAssistant::drawVisibleText(v, paint, x + paint.fontMetrics().averageCharWidth() / 2, y + h/2 - paint.fontMetrics().descent(), - nlabel, View::OutlinedText); + nlabel, PaintAssistant::OutlinedText); } paint.drawRect(x, y - h/2, w, h);