obsolete QPrinter Methods in FontMeterics

This commit is contained in:
LoudSnorer 2023-02-18 07:57:55 -05:00
parent 9fbe20b3a3
commit 9c530f3d86

View File

@ -947,7 +947,7 @@ void gGraphView::DrawTextQue(QPainter &painter)
if (q.angle == 0) {
painter.drawText(q.x, q.y, q.text);
} else {
w = painter.fontMetrics().width(q.text);
w = painter.fontMetrics().horizontalAdvance(q.text);
h = painter.fontMetrics().xHeight() + 2;
painter.translate(q.x, q.y);
@ -972,7 +972,7 @@ void gGraphView::DrawTextQue(QPainter &painter)
if (q.angle == 0) {
painter.drawText(q.rect, q.flags, q.text);
} else {
w = painter.fontMetrics().width(q.text);
w = painter.fontMetrics().horizontalAdvance(q.text);
h = painter.fontMetrics().xHeight() + 2;
painter.translate(q.rect.x(), q.rect.y());
@ -1013,7 +1013,7 @@ void gGraphView::DrawTextQueCached(QPainter &painter)
if (!QPixmapCache::find(hstr, &pm)) {
QFontMetrics fm(*q.font);
w = fm.width(q.text);
w = fm.horizontalAdvance(q.text);
h = fm.height()+buf;
pm = QPixmap(w, h);