diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-08-01 09:48:40 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-08-01 09:48:40 (GMT) |
commit | 0f10e3603fc5f24ebd3773cb2976d0bb24fcbd17 (patch) | |
tree | 4bfa9c57e62b023730ec5fc7dafbd45cfc33c086 /src/gui/painting/qpainter.cpp | |
parent | c9fb043d9fa38dd8eec6976e7a338dc89ddc5b0e (diff) | |
parent | bf8f39329c05a92c3da2b73b4e555dc9980e6008 (diff) | |
download | Qt-0f10e3603fc5f24ebd3773cb2976d0bb24fcbd17.zip Qt-0f10e3603fc5f24ebd3773cb2976d0bb24fcbd17.tar.gz Qt-0f10e3603fc5f24ebd3773cb2976d0bb24fcbd17.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging:
Make macdeployqt more robust against usage of symbolic links.
Document support for Linguist on Mac.
Make mac(deploy|change)qt handle dylibs that use Qt inside an app bundle.
Guard macdeployqt against @rpath and @loader_path too.
Fix typo.
OpenVG cleanup.
Include trailing space width in RTL text line width
Fix the compilation error when QT_NO_PLUGIN_CHECK was set.
Fixed holes in border image drawing by introducing new API.
Properly resolve and use glMapBuffer / glUnmapBuffer on GLES2.
Revert "fix QFileInfo::isSymLink() for NTFS mount points"
Remove debug output.
Add some sound support to the uikit platform.
Add flickrdemo uikit example project.
Fix uikit simulator build.
Get subpixel antialiasing again w/combo of raster and affine transform
Add initial support for bitmap version 4/5 headers.
optimize QRawFont::supportsCharacter()
Switch to use floating point pixelSize in QRawFont completely
Add a way to check if we have a matching family in the database.
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 1d10d75..8e64f3b 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -9248,6 +9248,52 @@ void QPainter::drawPixmapFragments(const PixmapFragment *fragments, int fragment } /*! + \since 4.8 + + This function is used to draw the same \a pixmap with multiple target + and source rectangles. If \a sourceRects is 0, the whole pixmap will be + rendered at each of the target rectangles. The \a hints parameter can be + used to pass in drawing hints. + + This function is potentially faster than multiple calls to drawPixmap(), + since the backend can optimize state changes. + + \sa QPainter::PixmapFragmentHint +*/ + +void QPainter::drawPixmapFragments(const QRectF *targetRects, const QRectF *sourceRects, int fragmentCount, + const QPixmap &pixmap, PixmapFragmentHints hints) +{ + Q_D(QPainter); + + if (!d->engine || pixmap.isNull()) + return; + +#ifndef QT_NO_DEBUG + if (sourceRects) { + for (int i = 0; i < fragmentCount; ++i) { + QRectF sourceRect = sourceRects[i]; + if (!(QRectF(pixmap.rect()).contains(sourceRect))) + qWarning("QPainter::drawPixmapFragments - the source rect is not contained by the pixmap's rectangle"); + } + } +#endif + + if (d->engine->isExtended()) { + d->extended->drawPixmapFragments(targetRects, sourceRects, fragmentCount, pixmap, hints); + } else { + if (sourceRects) { + for (int i = 0; i < fragmentCount; ++i) + drawPixmap(targetRects[i], pixmap, sourceRects[i]); + } else { + QRectF sourceRect = pixmap.rect(); + for (int i = 0; i < fragmentCount; ++i) + drawPixmap(targetRects[i], pixmap, sourceRect); + } + } +} + +/*! \since 4.7 \class QPainter::PixmapFragment |