summaryrefslogtreecommitdiffstats
path: root/demos/embedded/raycasting
diff options
context:
space:
mode:
authorAriya Hidayat <ariya.hidayat@nokia.com>2009-09-25 09:28:44 (GMT)
committerAriya Hidayat <ariya.hidayat@nokia.com>2009-09-25 09:29:06 (GMT)
commitafa1741dbe0b931938f0de6907610f65af4ab93e (patch)
tree694ee3032db7305dd4883c711dd91d0c2ae7809d /demos/embedded/raycasting
parent24b4c1df2f083829f39101ce5d9676d78b2cdc2a (diff)
downloadQt-afa1741dbe0b931938f0de6907610f65af4ab93e.zip
Qt-afa1741dbe0b931938f0de6907610f65af4ab93e.tar.gz
Qt-afa1741dbe0b931938f0de6907610f65af4ab93e.tar.bz2
Raycasting example: fix painting error when the orientation changes.
Reviewed-by: TrustMe
Diffstat (limited to 'demos/embedded/raycasting')
-rw-r--r--demos/embedded/raycasting/raycasting.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/demos/embedded/raycasting/raycasting.cpp b/demos/embedded/raycasting/raycasting.cpp
index ba91281..c3b21b6 100644
--- a/demos/embedded/raycasting/raycasting.cpp
+++ b/demos/embedded/raycasting/raycasting.cpp
@@ -285,6 +285,8 @@ protected:
QPainter p(this);
p.setCompositionMode(QPainter::CompositionMode_Source);
+ p.drawImage(event->rect(), buffer, event->rect());
+
if (touchDevice && event->rect().intersects(trackPad)) {
p.fillRect(trackPad, Qt::white);
p.setPen(QPen(QColor(224, 224, 224), 6));
@@ -306,10 +308,8 @@ protected:
p.drawPolygon(poly);
p.translate(0, rad - 20);
}
- p.resetTransform();
}
- p.drawImage(event->rect(), buffer, event->rect());
p.end();
}