mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 03:30: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) {
|
if (q.angle == 0) {
|
||||||
painter.drawText(q.x, q.y, q.text);
|
painter.drawText(q.x, q.y, q.text);
|
||||||
} else {
|
} else {
|
||||||
w = painter.fontMetrics().width(q.text);
|
w = painter.fontMetrics().horizontalAdvance(q.text);
|
||||||
h = painter.fontMetrics().xHeight() + 2;
|
h = painter.fontMetrics().xHeight() + 2;
|
||||||
|
|
||||||
painter.translate(q.x, q.y);
|
painter.translate(q.x, q.y);
|
||||||
@ -972,7 +972,7 @@ void gGraphView::DrawTextQue(QPainter &painter)
|
|||||||
if (q.angle == 0) {
|
if (q.angle == 0) {
|
||||||
painter.drawText(q.rect, q.flags, q.text);
|
painter.drawText(q.rect, q.flags, q.text);
|
||||||
} else {
|
} else {
|
||||||
w = painter.fontMetrics().width(q.text);
|
w = painter.fontMetrics().horizontalAdvance(q.text);
|
||||||
h = painter.fontMetrics().xHeight() + 2;
|
h = painter.fontMetrics().xHeight() + 2;
|
||||||
|
|
||||||
painter.translate(q.rect.x(), q.rect.y());
|
painter.translate(q.rect.x(), q.rect.y());
|
||||||
@ -1013,7 +1013,7 @@ void gGraphView::DrawTextQueCached(QPainter &painter)
|
|||||||
if (!QPixmapCache::find(hstr, &pm)) {
|
if (!QPixmapCache::find(hstr, &pm)) {
|
||||||
|
|
||||||
QFontMetrics fm(*q.font);
|
QFontMetrics fm(*q.font);
|
||||||
w = fm.width(q.text);
|
w = fm.horizontalAdvance(q.text);
|
||||||
h = fm.height()+buf;
|
h = fm.height()+buf;
|
||||||
|
|
||||||
pm = QPixmap(w, h);
|
pm = QPixmap(w, h);
|
||||||
|
Loading…
Reference in New Issue
Block a user