MCPcopy Create free account
hub / github.com/Cubitect/cubiomes-viewer / paintEvent

Method paintEvent

src/mapview.cpp:27–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void MapOverlay::paintEvent(QPaintEvent *)
28{
29 QPainter painter(this);
30 QString s = bname + QString::asprintf(" [%d,%d]", pos.x, pos.z);
31 QRect r = painter.fontMetrics()
32 .boundingRect(0, 0, width(), height(), Qt::AlignRight | Qt::AlignTop, s);
33
34 painter.fillRect(r, QBrush(QColor(0, 0, 0, 128), Qt::SolidPattern));
35 painter.setPen(Qt::white);
36 painter.drawText(r, s);
37}
38
39MapView::MapView(QWidget *parent)
40 : QWidget(parent)

Callers

nothing calls this directly

Calls 4

clampimaxFunction · 0.85
drawMethod · 0.80
getBiomeNameMethod · 0.80
isBusyMethod · 0.80

Tested by

no test coverage detected