summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-10-27 12:48:57 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-10-27 12:48:57 +0100
commit91ce1b76586e9114941bb1cbd6820132ee2f893e (patch)
tree52ac4652a9003113abd344d78ac62652bf7718c7
parent392359c5413e2a824699625ee9174bb1a6eb8a71 (diff)
parentaaa06d6c82e02961f92690b10c84a0030dc0ebb7 (diff)
downloadqtsvg-91ce1b76586e9114941bb1cbd6820132ee2f893e.tar.gz
Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: I1ed84131c65cb9f047a0f393ebd845282daad499
-rw-r--r--src/svg/qsvggenerator.cpp5
-rw-r--r--src/svg/qsvggraphics.cpp2
-rw-r--r--src/svg/qsvgnode.cpp2
-rw-r--r--src/svg/qsvgtinydocument.cpp4
4 files changed, 5 insertions, 8 deletions
diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp
index d8ada6e..a06170f 100644
--- a/src/svg/qsvggenerator.cpp
+++ b/src/svg/qsvggenerator.cpp
@@ -392,6 +392,7 @@ public:
qWarning("Unhandled cap style");
}
switch (spen.joinStyle()) {
+ case Qt::SvgMiterJoin:
case Qt::MiterJoin:
stream() << "stroke-linejoin=\"miter\" "
"stroke-miterlimit=\""<<spen.miterLimit()<<"\" ";
@@ -402,10 +403,6 @@ public:
case Qt::RoundJoin:
stream() << "stroke-linejoin=\"round\" ";
break;
- case Qt::SvgMiterJoin:
- stream() << "stroke-linejoin=\"miter\" "
- "stroke-miterlimit=\""<<spen.miterLimit()<<"\" ";
- break;
default:
qWarning("Unhandled join style");
}
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; \
diff --git a/src/svg/qsvgnode.cpp b/src/svg/qsvgnode.cpp
index fdb5348..10a8828 100644
--- a/src/svg/qsvgnode.cpp
+++ b/src/svg/qsvgnode.cpp
@@ -200,7 +200,7 @@ QRectF QSvgNode::transformedBounds() const
QPainter p(&dummy);
QSvgExtraStates states;
- QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::SvgMiterJoin);
pen.setMiterLimit(4);
p.setPen(pen);
diff --git a/src/svg/qsvgtinydocument.cpp b/src/svg/qsvgtinydocument.cpp
index 71b1263..88e9224 100644
--- a/src/svg/qsvgtinydocument.cpp
+++ b/src/svg/qsvgtinydocument.cpp
@@ -230,7 +230,7 @@ void QSvgTinyDocument::draw(QPainter *p, const QRectF &bounds)
//sets default style on the painter
//### not the most optimal way
mapSourceToTarget(p, bounds);
- QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::SvgMiterJoin);
pen.setMiterLimit(4);
p->setPen(pen);
p->setBrush(Qt::black);
@@ -273,7 +273,7 @@ void QSvgTinyDocument::draw(QPainter *p, const QString &id,
QTransform originalTransform = p->worldTransform();
//XXX set default style on the painter
- QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
+ QPen pen(Qt::NoBrush, 1, Qt::SolidLine, Qt::FlatCap, Qt::SvgMiterJoin);
pen.setMiterLimit(4);
p->setPen(pen);
p->setBrush(Qt::black);