comparison layer/Colour3DPlotLayer.cpp @ 1048:e8102ff5573b

Use drawVisibleText for box labels
author Chris Cannam
date Fri, 04 Mar 2016 12:23:31 +0000
parents 86a8145a1897
children 40480e4bab6a
comparison
equal deleted inserted replaced
1047:86a8145a1897 1048:e8102ff5573b
1414 if (sx >= 0 && sx < m_cache->width() && 1414 if (sx >= 0 && sx < m_cache->width() &&
1415 sy >= 0 && sy < m_cache->height()) { 1415 sy >= 0 && sy < m_cache->height()) {
1416 double value = m_model->getValueAt(sx, sy); 1416 double value = m_model->getValueAt(sx, sy);
1417 snprintf(labelbuf, buflen, "%06f", value); 1417 snprintf(labelbuf, buflen, "%06f", value);
1418 QString text(labelbuf); 1418 QString text(labelbuf);
1419 paint.setPen(v->getBackground()); 1419 v->drawVisibleText
1420 paint.drawText(rx0 + 2, 1420 (paint,
1421 ry0 - h / sh - 1 + 2 + paint.fontMetrics().ascent(), 1421 rx0 + 2,
1422 text); 1422 ry0 - h / sh - 1 + 2 + paint.fontMetrics().ascent(),
1423 text,
1424 View::OutlinedText);
1423 } 1425 }
1424 } 1426 }
1425 } 1427 }
1426 } 1428 }
1427 } 1429 }