From dd24168d42df7b474c0fbc9cd943b0556cb4a25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 14 Sep 2009 15:25:07 +0200 Subject: 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 --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 1 + 1 file changed, 1 insertion(+) 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(); -- cgit v0.12