diff options
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 2ea6673..9dadbd5 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -8969,6 +8969,15 @@ void QPainter::drawPixmapFragments(const PixmapFragment *fragments, int fragment if (!d->engine) return; +#ifndef QT_NO_DEBUG + for (int i = 0; i < fragmentCount; ++i) { + QRectF sourceRect(fragments[i].sourceLeft, fragments[i].sourceTop, + fragments[i].width, fragments[i].height); + 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(fragments, fragmentCount, pixmap, hints); } else { |