summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-06-24 00:24:19 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-06-24 00:24:19 (GMT)
commitfcf88c88c1d730028e0fbc46cadce040d6fb7e02 (patch)
tree38765245ed6bbde70ee82766328279ad5d65cdca /src/declarative
parent6d7120dc2081e10c46ffe8467b047affe81ed747 (diff)
downloadQt-fcf88c88c1d730028e0fbc46cadce040d6fb7e02.zip
Qt-fcf88c88c1d730028e0fbc46cadce040d6fb7e02.tar.gz
Qt-fcf88c88c1d730028e0fbc46cadce040d6fb7e02.tar.bz2
Fix issue with render hints not being restored properly.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/fx/qfximage.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp
index 40389c4..58d597a 100644
--- a/src/declarative/fx/qfximage.cpp
+++ b/src/declarative/fx/qfximage.cpp
@@ -336,7 +336,8 @@ void QFxImage::paintContents(QPainter &p)
if (d->pix.isNull())
return;
- QPainter::RenderHints oldHints = p.renderHints();
+ bool oldAA = p.testRenderHint(QPainter::Antialiasing);
+ bool oldSmooth = p.testRenderHint(QPainter::SmoothPixmapTransform);
if (d->smooth)
p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth);
@@ -428,8 +429,10 @@ void QFxImage::paintContents(QPainter &p)
QRect(pix.width()-sgr, pix.height() - sgb, sgr, sgb));
}
- if (d->smooth)
- p.setRenderHints(oldHints);
+ if (d->smooth) {
+ p.setRenderHint(QPainter::Antialiasing, oldAA);
+ p.setRenderHint(QPainter::SmoothPixmapTransform, oldSmooth);
+ }
}
#elif defined(QFX_RENDER_OPENGL)
uint QFxImage::glSimpleItemData(float *vertices, float *texVertices,