From 14fa3c45fcc71f1b5b7c84ae23a1f7a5d2f22e9e Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 20 Oct 2014 15:45:45 +0200 Subject: Don't stroke a path if it's not specified in the SVG The code in the svg renderer is using a QPen with it's brush set to Qt::NoBrush as a hack to indicate that we don't have a stroke to paint, but to nevertheless use QPen to keep track of state. So when rendering, we have to check for the pen having no brush and in that case not draw anything. Task-number: QTBUG-36767 Change-Id: Ib622c7d0108e7360437f57853f11c65190c16773 Reviewed-by: Laszlo Agocs --- src/svg/qsvggraphics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/svg/qsvggraphics.cpp') diff --git a/src/svg/qsvggraphics.cpp b/src/svg/qsvggraphics.cpp index 05ce744..712d770 100644 --- a/src/svg/qsvggraphics.cpp +++ b/src/svg/qsvggraphics.cpp @@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE p->setOpacity(oldOpacity * states.fillOpacity); \ command; \ p->setPen(oldPen); \ - if (oldPen.widthF() != 0) { \ + if (oldPen != Qt::NoPen && oldPen.brush() != Qt::NoBrush && oldPen.widthF() != 0) { \ p->setOpacity(oldOpacity * states.strokeOpacity); \ p->setBrush(Qt::NoBrush); \ command; \ -- cgit v1.2.1