summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-10-13 23:35:13 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-10-13 23:35:13 (GMT)
commit9d58da36c9790e60aead8de4477c80332d3e0a62 (patch)
tree005a2e986dcd5e31fc9f099cfe2d834dc2e0d6be
parent020f5233da1361bb6164875f550d92a5b6ac4ca2 (diff)
downloadQt-9d58da36c9790e60aead8de4477c80332d3e0a62.zip
Qt-9d58da36c9790e60aead8de4477c80332d3e0a62.tar.gz
Qt-9d58da36c9790e60aead8de4477c80332d3e0a62.tar.bz2
Improve scissor clipping in the OpenVG engine
If the scissor is being used to clip instead of the mask, use the bounding rectangle of the clip path if it cannot be handled as a simple rectangle. Reviewed-by: trustme
-rw-r--r--src/openvg/qpaintengine_vg.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 2a506bb..e0c99d7 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -1554,6 +1554,10 @@ void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
QRectF rect(points[0], points[1], points[2] - points[0],
points[5] - points[1]);
clip(rect.toRect(), op);
+ } else {
+ // The best we can do is clip to the bounding rectangle
+ // of all control points.
+ clip(path.controlPointRect().toRect(), op);
}
}