diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-05-27 00:46:40 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-05-27 00:46:40 (GMT) |
commit | 411678df3e25304b105e5f3afc849b529baa0d6f (patch) | |
tree | f80a983b5146c6d9b34356bcd4c3de3d8c84134e /src/declarative/fx/qfximage.cpp | |
parent | 861f0fcd140232e8fe94122d640ab69a7c116663 (diff) | |
download | Qt-411678df3e25304b105e5f3afc849b529baa0d6f.zip Qt-411678df3e25304b105e5f3afc849b529baa0d6f.tar.gz Qt-411678df3e25304b105e5f3afc849b529baa0d6f.tar.bz2 |
Don't really need QPainter::save/restore for render hint mods.
Diffstat (limited to 'src/declarative/fx/qfximage.cpp')
-rw-r--r-- | src/declarative/fx/qfximage.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp index 6226e45..55aecd7 100644 --- a/src/declarative/fx/qfximage.cpp +++ b/src/declarative/fx/qfximage.cpp @@ -322,10 +322,9 @@ void QFxImage::paintContents(QPainter &p) if (d->_pix.isNull()) return; - if (d->_smooth) { - p.save(); + QPainter::RenderHints oldHints = p.renderHints(); + if (d->_smooth) p.setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->_smooth); - } QSimpleCanvasConfig::Image pix = d->_pix; @@ -415,9 +414,8 @@ void QFxImage::paintContents(QPainter &p) QRect(pix.width()-sgr, pix.height() - sgb, sgr, sgb)); } - if (d->_smooth) { - p.restore(); - } + if (d->_smooth) + p.setRenderHints(oldHints); } #elif defined(QFX_RENDER_OPENGL) uint QFxImage::glSimpleItemData(float *vertices, float *texVertices, |