From baea2c29340b14c6ec1f560a09627f23dd358363 Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 2 Jul 2009 13:28:02 +1000 Subject: Smooth, but never anti-alias the edges of pixmaps that need to stitch.. Bug 256967 still stops it working correctly. --- src/declarative/fx/qfxpainteditem.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/declarative/fx/qfxpainteditem.cpp b/src/declarative/fx/qfxpainteditem.cpp index 65589f2..0a13dc4 100644 --- a/src/declarative/fx/qfxpainteditem.cpp +++ b/src/declarative/fx/qfxpainteditem.cpp @@ -232,10 +232,10 @@ void QFxPaintedItem::paintGLContents(GLPainter &p) #if defined(QFX_RENDER_QPAINTER) bool oldAntiAliasing = p.testRenderHint(QPainter::Antialiasing); bool oldSmoothPixmap = p.testRenderHint(QPainter::SmoothPixmapTransform); - if (d->smooth) { - p.setRenderHints(QPainter::Antialiasing, true); + if (oldAntiAliasing) + p.setRenderHints(QPainter::Antialiasing, false); // cannot stitch properly otherwise + if (d->smooth) p.setRenderHints(QPainter::SmoothPixmapTransform, true); - } QRectF clipf = p.clipRegion().boundingRect(); if (clipf.isEmpty()) clipf = mapToScene(content); // ### Inefficient: Maps toScene and then fromScene @@ -330,10 +330,10 @@ void QFxPaintedItem::paintGLContents(GLPainter &p) glDisableClientState(GL_TEXTURE_COORD_ARRAY); #endif #if defined(QFX_RENDER_QPAINTER) - if (d->smooth) { + if (oldAntiAliasing) p.setRenderHints(QPainter::Antialiasing, oldAntiAliasing); + if (d->smooth) p.setRenderHints(QPainter::SmoothPixmapTransform, oldSmoothPixmap); - } #endif } -- cgit v0.12