--- a/ganeswidgets/src/hgqtquadrenderer.cpp Fri Sep 03 10:22:04 2010 +0300
+++ b/ganeswidgets/src/hgqtquadrenderer.cpp Fri Sep 17 15:55:58 2010 +0300
@@ -156,7 +156,7 @@
}
- void draw(QPainter* painter, const QRectF& rect)
+ void draw(QPainter* painter, const QRectF& rect, const QTransform& transform)
{
if (!quad()->visible())
return;
@@ -171,7 +171,7 @@
if (image->pixmap().isNull())
image = mRenderer->defaultImage();
- drawImage(painter, image, rect);
+ drawImage(painter, image, rect, transform);
}
@@ -196,7 +196,7 @@
QTransform::quadToQuad(img, poly, tm);
}
- void drawImage(QPainter* painter, HgQtImage* image, const QRectF& rect)
+ void drawImage(QPainter* painter, HgQtImage* image, const QRectF& rect, const QTransform& transform)
{
const QPixmap& pixmap = image->pixmap();
@@ -219,10 +219,8 @@
computeWarpMatrix(mTransform, image->width(), image->height(), points);
- QTransform base = painter->transform();
- painter->setTransform(mTransform * base);
+ painter->setTransform(mTransform * transform);
painter->drawPixmap(QPointF(0,0), pixmap);
- painter->setTransform(base);
}
HgQtQuadRenderer* mRenderer;
@@ -267,14 +265,15 @@
{
mIsReflection = true;
- drawTransformedQuads(painter, rect);
-
+ drawTransformedQuads(painter, rect, temp);
+
+ painter->setTransform(temp);
drawFloor(painter, rect);
}
mIsReflection = false;
- drawTransformedQuads(painter, rect);
+ drawTransformedQuads(painter, rect, temp);
painter->setTransform(temp);