summaryrefslogtreecommitdiffstats
path: root/lightmaps/lightmaps.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lightmaps/lightmaps.cpp')
-rw-r--r--lightmaps/lightmaps.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/lightmaps/lightmaps.cpp b/lightmaps/lightmaps.cpp
index d3ac1fa..bc9798c 100644
--- a/lightmaps/lightmaps.cpp
+++ b/lightmaps/lightmaps.cpp
@@ -145,16 +145,13 @@ public:
}
void render(QPainter *p, const QRect &rect) {
- p->setPen(QPen(Qt::red, 2));
for (int x = 0; x <= m_tilesRect.width(); ++x)
for (int y = 0; y <= m_tilesRect.height(); ++y) {
QPoint tp(x + m_tilesRect.left(), y + m_tilesRect.top());
QRect box = tileRect(tp);
if (rect.intersects(box)) {
- if (m_tilePixmaps.contains(tp)) {
+ if (m_tilePixmaps.contains(tp))
p->drawPixmap(box, m_tilePixmaps.value(tp));
- p->drawRect(box.adjusted(0, 0, -2, -2));
- }
else
p->drawPixmap(box, m_emptyTile);
}
@@ -179,17 +176,6 @@ private slots:
if (!img.load(reply, 0))
img = QImage();
reply->deleteLater();
-#if 0
- QPainter p(&img);
- p.setPen(QPen(Qt::white, 1));
- p.setBrush(Qt::NoBrush);
- p.drawRect(img.rect().adjusted(0, 0, -1, -1));
- p.fillRect(10, 10, 20, 20, Qt::red);
- p.end();
- img.fill(qRgba(255, 0, 0, 255));
- img.save("bla.png");
-#endif
-
m_tilePixmaps[tp] = QPixmap::fromImage(img);
if (img.isNull())
m_tilePixmaps[tp] = m_emptyTile;