src/canvas.cpp

changeset 1380
bc799b965418
parent 1376
83dd6cbd7f1a
child 1385
2f18c0da749d
child 1390
3eace926af7f
equal deleted inserted replaced
1379:35811339ea72 1380:bc799b965418
57 // Render triangle count 57 // Render triangle count
58 { 58 {
59 QPoint renderPoint {4, height() - 4 - metrics.height() - metrics.descent()}; 59 QPoint renderPoint {4, height() - 4 - metrics.height() - metrics.descent()};
60 painter.drawText(renderPoint, format("△ %1", largeNumberRep(m_document.triangleCount()))); 60 painter.drawText(renderPoint, format("△ %1", largeNumberRep(m_document.triangleCount())));
61 } 61 }
62
63 // Message log
64 if (m_window->messageLog())
65 {
66 int y = 0;
67 int margin = 2;
68 QColor penColor = textPen().color();
69
70 for (const MessageManager::Line& line : m_window->messageLog()->getLines())
71 {
72 penColor.setAlphaF(line.alpha);
73 painter.setPen(penColor);
74 painter.drawText(QPoint {margin, y + margin + metrics.ascent()}, line.text);
75 y += metrics.height();
76 }
77 }
78 } 62 }
79 63
80 /* 64 /*
81 * Assuming we're currently viewing from a fixed camera, draw a backdrop into it. Currently this means drawing the grid. 65 * Assuming we're currently viewing from a fixed camera, draw a backdrop into it. Currently this means drawing the grid.
82 */ 66 */

mercurial