diff options
author | Bill King <bill.king@nokia.com> | 2009-11-13 02:48:10 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2009-11-13 02:48:10 (GMT) |
commit | c7ef9c969fb368027135c5e7b0e9b6f53c465702 (patch) | |
tree | a9dccb0f6d3380ee13577502365117754768f356 /doc/src/snippets | |
parent | e80adac9902abfd423aae23dd22f490a33763228 (diff) | |
parent | 99b19431e6846a36a65f23d21a95140a081d1f1a (diff) | |
download | Qt-c7ef9c969fb368027135c5e7b0e9b6f53c465702.zip Qt-c7ef9c969fb368027135c5e7b0e9b6f53c465702.tar.gz Qt-c7ef9c969fb368027135c5e7b0e9b6f53c465702.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'doc/src/snippets')
-rw-r--r-- | doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp b/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp index 35689f4..5ef6609 100644 --- a/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp +++ b/doc/src/snippets/code/src_gui_effects_qgraphicseffect.cpp @@ -40,11 +40,11 @@ ****************************************************************************/ //! [0] -MyGraphicsOpacityEffect::draw(QPainter *painter, QGraphicsEffectSource *source) +MyGraphicsOpacityEffect::draw(QPainter *painter) { // Fully opaque; draw directly without going through a pixmap. if (qFuzzyCompare(m_opacity, 1)) { - source->draw(painter); + drawSource(painter); return; } ... @@ -52,18 +52,18 @@ MyGraphicsOpacityEffect::draw(QPainter *painter, QGraphicsEffectSource *source) //! [0] //! [1] -MyGraphicsEffect::draw(QPainter *painter, QGraphicsEffectSource *source) +MyGraphicsEffect::draw(QPainter *painter) { ... QPoint offset; - if (source->isPixmap()) { + if (sourceIsPixmap()) { // No point in drawing in device coordinates (pixmap will be scaled anyways). - const QPixmap pixmap = source->pixmap(Qt::LogicalCoordinates, &offset); + const QPixmap pixmap = sourcePixmap(Qt::LogicalCoordinates, &offset); ... painter->drawPixmap(offset, pixmap); } else { // Draw pixmap in device coordinates to avoid pixmap scaling; - const QPixmap pixmap = source->pixmap(Qt::DeviceCoordinates, &offset); + const QPixmap pixmap = sourcePixmap(Qt::DeviceCoordinates, &offset); painter->setWorldTransform(QTransform()); ... painter->drawPixmap(offset, pixmap); |