diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-08-20 11:35:54 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-08-21 10:20:02 (GMT) |
commit | fc82b170f107d335aea6d468df6e4f5bc5db7cf5 (patch) | |
tree | 1e32bdede7d1d8d00004f3689145a6fb9dcb9623 /src/gui/painting/qpainter.cpp | |
parent | 24f8cf971b330214f79757facc82d72981b7789e (diff) | |
download | Qt-fc82b170f107d335aea6d468df6e4f5bc5db7cf5.zip Qt-fc82b170f107d335aea6d468df6e4f5bc5db7cf5.tar.gz Qt-fc82b170f107d335aea6d468df6e4f5bc5db7cf5.tar.bz2 |
Reset clip structure when we use Qt::ReplaceClip or Qt::NoClip
Reviewed-by: Samuel
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index ab35ead..c4da0a6 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -2561,6 +2561,8 @@ void QPainter::setClipRect(const QRectF &rect, Qt::ClipOperation op) QVectorPath vp(pts, 4, 0, QVectorPath::RectangleHint); d->state->clipEnabled = true; d->extended->clip(vp, op); + if (op == Qt::ReplaceClip || op == Qt::NoClip) + d->state->clipInfo.clear(); d->state->clipInfo << QPainterClipInfo(rect, op, d->state->matrix); d->state->clipOperation = op; return; @@ -2607,6 +2609,8 @@ void QPainter::setClipRect(const QRect &rect, Qt::ClipOperation op) if (d->extended) { d->state->clipEnabled = true; d->extended->clip(rect, op); + if (op == Qt::ReplaceClip || op == Qt::NoClip) + d->state->clipInfo.clear(); d->state->clipInfo << QPainterClipInfo(rect, op, d->state->matrix); d->state->clipOperation = op; return; @@ -2660,6 +2664,8 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op) if (d->extended) { d->state->clipEnabled = true; d->extended->clip(r, op); + if (op == Qt::NoClip || op == Qt::ReplaceClip) + d->state->clipInfo.clear(); d->state->clipInfo << QPainterClipInfo(r, op, d->state->matrix); d->state->clipOperation = op; return; @@ -3064,6 +3070,8 @@ void QPainter::setClipPath(const QPainterPath &path, Qt::ClipOperation op) if (d->extended) { d->state->clipEnabled = true; d->extended->clip(path, op); + if (op == Qt::NoClip || op == Qt::ReplaceClip) + d->state->clipInfo.clear(); d->state->clipInfo << QPainterClipInfo(path, op, d->state->matrix); d->state->clipOperation = op; return; |