Advertisement
Guest User

Untitled

a guest
May 30th, 2011
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.65 KB | None | 0 0
  1. From 272ce676b80845106025b040578fe66ea0cb5b2f Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Samuel=20R=C3=B8dal?= <samuel.rodal@nokia.com>
  3. Date: Mon, 30 May 2011 09:38:47 +0200
  4. Subject: [PATCH] Fixed clipping errors for non-extended paint engines.
  5.  
  6. Partially revert change a33ef62469fd71bec for the non-extended paint
  7. engine path.
  8.  
  9. Task-number: QTBUG-19525
  10. Reviewed-by:
  11. ---
  12. src/gui/painting/qpainter.cpp |    9 +++++++++
  13.  1 files changed, 9 insertions(+), 0 deletions(-)
  14.  
  15. diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
  16. index 3735e7c..5974f53 100644
  17. --- a/src/gui/painting/qpainter.cpp
  18. +++ b/src/gui/painting/qpainter.cpp
  19. @@ -2788,6 +2788,9 @@ void QPainter::setClipRect(const QRect &rect, Qt::ClipOperation op)
  20.          return;
  21.      }
  22.  
  23. +    if (d->state->clipOperation == Qt::NoClip && op == Qt::IntersectClip)
  24. +        op = Qt::ReplaceClip;
  25. +
  26.      d->state->clipRegion = rect;
  27.      d->state->clipOperation = op;
  28.      if (op == Qt::NoClip || op == Qt::ReplaceClip)
  29. @@ -2843,6 +2846,9 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op)
  30.          return;
  31.      }
  32.  
  33. +    if (d->state->clipOperation == Qt::NoClip && op == Qt::IntersectClip)
  34. +        op = Qt::ReplaceClip;
  35. +
  36.      d->state->clipRegion = r;
  37.      d->state->clipOperation = op;
  38.      if (op == Qt::NoClip || op == Qt::ReplaceClip)
  39. @@ -3248,6 +3254,9 @@ void QPainter::setClipPath(const QPainterPath &path, Qt::ClipOperation op)
  40.          return;
  41.      }
  42.  
  43. +    if (d->state->clipOperation == Qt::NoClip && op == Qt::IntersectClip)
  44. +        op = Qt::ReplaceClip;
  45. +
  46.      d->state->clipPath = path;
  47.      d->state->clipOperation = op;
  48.      if (op == Qt::NoClip || op == Qt::ReplaceClip)
  49. --
  50. 1.7.0.4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement