summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-10-14 09:35:13 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-10-14 09:35:13 +1000
commit9d58da36c9790e60aead8de4477c80332d3e0a62 (patch)
tree005a2e986dcd5e31fc9f099cfe2d834dc2e0d6be /src/openvg
parent020f5233da1361bb6164875f550d92a5b6ac4ca2 (diff)
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
Diffstat (limited to 'src/openvg')
-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 2a506bb736..e0c99d7d2a 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);
}
}