mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 18:50:44 +00:00
obsolete QPrinter Methods in FontMeterics
This commit is contained in:
parent
9fbe20b3a3
commit
9c530f3d86
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user