diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-05-30 07:38:47 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-05-30 10:03:46 (GMT) |
commit | f370dd07560c449ba17d13475721f7d3b46e6b24 (patch) | |
tree | b1ff0ff5c182ff113b654d2ee033192a652e13c0 | |
parent | 3f82ecbd0e2cdf477e57c7fe41b63c09d7e84787 (diff) | |
download | Qt-f370dd07560c449ba17d13475721f7d3b46e6b24.zip Qt-f370dd07560c449ba17d13475721f7d3b46e6b24.tar.gz Qt-f370dd07560c449ba17d13475721f7d3b46e6b24.tar.bz2 |
Fixed clipping errors for non-extended paint engines.
Partially revert change a33ef62469fd71bec for the non-extended paint
engine path.
Task-number: QTBUG-19525
Reviewed-by: Andy Shaw
-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 dfb9a04..a4ab00a 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -2788,6 +2788,9 @@ void QPainter::setClipRect(const QRect &rect, Qt::ClipOperation op) return; } + if (d->state->clipOperation == Qt::NoClip && op == Qt::IntersectClip) + op = Qt::ReplaceClip; + d->state->clipRegion = rect; d->state->clipOperation = op; if (op == Qt::NoClip || op == Qt::ReplaceClip) @@ -2843,6 +2846,9 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op) return; } + if (d->state->clipOperation == Qt::NoClip && op == Qt::IntersectClip) + op = Qt::ReplaceClip; + d->state->clipRegion = r; d->state->clipOperation = op; if (op == Qt::NoClip || op == Qt::ReplaceClip) @@ -3248,6 +3254,9 @@ void QPainter::setClipPath(const QPainterPath &path, Qt::ClipOperation op) return; } + if (d->state->clipOperation == Qt::NoClip && op == Qt::IntersectClip) + op = Qt::ReplaceClip; + d->state->clipPath = path; d->state->clipOperation = op; if (op == Qt::NoClip || op == Qt::ReplaceClip) |