summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-09-14 13:25:07 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-09-14 13:29:33 (GMT)
commitdd24168d42df7b474c0fbc9cd943b0556cb4a25f (patch)
tree0653c9a3cf8462c492bca6abb398184f025470f1 /src
parent4361fd12d8111b362c3a9ee2d8addc76d055d7c2 (diff)
downloadQt-dd24168d42df7b474c0fbc9cd943b0556cb4a25f.zip
Qt-dd24168d42df7b474c0fbc9cd943b0556cb4a25f.tar.gz
Qt-dd24168d42df7b474c0fbc9cd943b0556cb4a25f.tar.bz2
Fixed clipping bug in GL 2 engine.
When dumping the rectangle clip to the depth buffer due to needing to intersect with a more complex clip, we didn't take into consideration that writeClip will transform the path by the current matrix, whereas the rectangle clip is in device coordinates. Thus, we need to map the path by the inverse matrix. Task-number: 260701 Reviewed-by: Trond
Diffstat (limited to 'src')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index bbb285f..9386044 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1538,6 +1538,7 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op)
if (state()->rectangleClip.isValid() && op != Qt::NoClip && op != Qt::ReplaceClip) {
QPainterPath path;
path.addRect(state()->rectangleClip);
+ path = state()->matrix.inverted().map(path);
state()->rectangleClip = QRect();
d->updateDepthScissorTest();