summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem.cpp
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-29 00:26:35 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-07-29 06:43:33 (GMT)
commitf0ed432d55ef6da7223ee3d58e45391e3f88be86 (patch)
treece500dfd22b412b0390f1c3bb6909142112dbaf9 /src/gui/graphicsview/qgraphicsitem.cpp
parentf55576b670c69b69c5f1140661cf20cbda96853a (diff)
downloadQt-f0ed432d55ef6da7223ee3d58e45391e3f88be86.zip
Qt-f0ed432d55ef6da7223ee3d58e45391e3f88be86.tar.gz
Qt-f0ed432d55ef6da7223ee3d58e45391e3f88be86.tar.bz2
Remove drawIntoPixmap and implement all the effects with the new API.
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp32
1 files changed, 1 insertions, 31 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 120ca05..c0fa271 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -9972,7 +9972,7 @@ QPixmap QGraphicsItemEffectSourcePrivate::pixmap(bool deviceCoordinates, QPoint
QPixmap pixmap(effectRect.size());
pixmap.fill(Qt::transparent);
QPainter pixmapPainter(&pixmap);
- pixmapPainter.setRenderHints(QPainter::SmoothPixmapTransform | QPainter::Antialiasing);
+ pixmapPainter.setRenderHints(info->painter->renderHints());
QGraphicsScenePrivate *scened = item->d_ptr->scene->d_func();
scened->draw(item, &pixmapPainter, info->viewTransform, info->transformPtr, info->exposedRegion,
@@ -9981,36 +9981,6 @@ QPixmap QGraphicsItemEffectSourcePrivate::pixmap(bool deviceCoordinates, QPoint
return pixmap;
}
-bool QGraphicsItemEffectSourcePrivate::drawIntoPixmap(QPixmap *pixmap, const QPoint &offset)
-{
- QPoint effectOffset(offset);
-
- QTransform viewTransform(Qt::Uninitialized);
- if (info->viewTransform) {
- viewTransform = *info->viewTransform;
- viewTransform *= QTransform::fromTranslate(-effectOffset.x(), -effectOffset.y());
- } else {
- viewTransform = QTransform::fromTranslate(-effectOffset.x(), -effectOffset.y());
- }
-
- *info->transformPtr *= QTransform::fromTranslate(-effectOffset.x(), -effectOffset.y());
-
- QRegion exposedRegion;
- if (info->exposedRegion) {
- exposedRegion = *info->exposedRegion;
- exposedRegion.translate(-effectOffset.x(), -effectOffset.y());
- }
-
- pixmap->fill(Qt::transparent);
- QPainter pixmapPainter(pixmap);
- pixmapPainter.setRenderHints(QPainter::SmoothPixmapTransform | QPainter::Antialiasing);
- QGraphicsScenePrivate *scened = item->d_ptr->scene->d_func();
- scened->draw(item, &pixmapPainter, &viewTransform, info->transformPtr, &exposedRegion,
- info->widget, info->opacity, 0, info->wasDirtySceneTransform,
- info->drawItem);
- return true;
-}
-
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug debug, QGraphicsItem *item)
{