diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-03 11:51:53 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-03 11:51:53 (GMT) |
commit | fc4a3206fd89d28c0b0c6c36fa0c136a65e2e057 (patch) | |
tree | 4fe485fe058ca52a185a28f4942a009a13884219 /src/gui | |
parent | 2a0d6bf8d3f7c92667512d2222cf2304e06130b4 (diff) | |
parent | 68be6457f6732437b485812ab2db11c147a24b51 (diff) | |
download | Qt-fc4a3206fd89d28c0b0c6c36fa0c136a65e2e057.zip Qt-fc4a3206fd89d28c0b0c6c36fa0c136a65e2e057.tar.gz Qt-fc4a3206fd89d28c0b0c6c36fa0c136a65e2e057.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into 4.6
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/graphicsview/qgraphicsview.cpp | 8 | ||||
-rw-r--r-- | src/gui/painting/qpainter.cpp | 5 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index 710c745..8945f51 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -281,6 +281,7 @@ static const int QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS = 503; // largest prime < #include <QtGui/qstyleoption.h> #include <QtGui/qinputcontext.h> #ifdef Q_WS_X11 +#include <QtGui/qpaintengine.h> #include <private/qt_x11_p.h> #endif @@ -3294,7 +3295,12 @@ void QGraphicsView::paintEvent(QPaintEvent *event) backgroundPainter.setClipRegion(d->backgroundPixmapExposed, Qt::ReplaceClip); if (viewTransformed) backgroundPainter.setTransform(viewTransform); - backgroundPainter.setCompositionMode(QPainter::CompositionMode_Source); +#ifdef Q_WS_X11 +#undef X11 + if (backgroundPainter.paintEngine()->type() != QPaintEngine::X11) +#define X11 qt_x11Data +#endif + backgroundPainter.setCompositionMode(QPainter::CompositionMode_Source); drawBackground(&backgroundPainter, exposedSceneRect); d->backgroundPixmapExposed = QRegion(); } diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index cddad7d..8d6cad3 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -2275,8 +2275,9 @@ void QPainter::setBrushOrigin(const QPointF &p) /*! Sets the composition mode to the given \a mode. - \warning You can only set the composition mode for QPainter - objects that operates on a QImage. + \warning Only a QPainter operating on a QImage fully supports all + composition modes. The RasterOp modes are supported for X11 as + described in compositionMode(). \sa compositionMode() */ |