From 9d58da36c9790e60aead8de4477c80332d3e0a62 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Wed, 14 Oct 2009 09:35:13 +1000 Subject: 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 --- src/openvg/qpaintengine_vg.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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); } } -- cgit v0.12