summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-08-26 08:29:11 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-08-26 08:39:56 (GMT)
commite692a4044e161c46e6b145d2f3874a0b7b929b4d (patch)
tree4876e38b250d32398a118d71504d5ef018859b68 /src
parent4806174aeff4d7c600f6be20649153bf0e997953 (diff)
downloadQt-e692a4044e161c46e6b145d2f3874a0b7b929b4d.zip
Qt-e692a4044e161c46e6b145d2f3874a0b7b929b4d.tar.gz
Qt-e692a4044e161c46e6b145d2f3874a0b7b929b4d.tar.bz2
Fixed clipping bug in GL 2 paint engine (visible in arthur demos).
QVectorPath::hints() is not a strict bit field, and thus can not be anded with RectangleHint. Instead, QVectorPath::shape() should be directly compared with RectangleHint to check if the vector path is a rectangle or not. In this case the first four points of a regular painter path were treated as a rectangle with dire consequences. Reviewed-by: Tom
Diffstat (limited to 'src')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 2901c1e..136a078 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1499,7 +1499,7 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op)
if (op == Qt::ReplaceClip && !d->hasClipOperations())
op = Qt::IntersectClip;
- if (!path.isEmpty() && op == Qt::IntersectClip && (path.hints() & QVectorPath::RectangleHint)) {
+ if (!path.isEmpty() && op == Qt::IntersectClip && (path.shape() == QVectorPath::RectangleHint)) {
const QPointF* const points = reinterpret_cast<const QPointF*>(path.points());
QRectF rect(points[0], points[2]);