diff options
Diffstat (limited to 'src/svg')
-rw-r--r-- | src/svg/qsvghandler.cpp | 6 | ||||
-rw-r--r-- | src/svg/qsvgstyle.cpp | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index 18ba71c..433a3ad 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -2587,10 +2587,12 @@ static void parseBaseGradient(QSvgNode *node, if (prop && prop->type() == QSvgStyleProperty::GRADIENT) { QSvgGradientStyle *inherited = static_cast<QSvgGradientStyle*>(prop); - if (!inherited->stopLink().isEmpty()) + if (!inherited->stopLink().isEmpty()) { gradProp->setStopLink(inherited->stopLink(), handler->document()); - else + } else { grad->setStops(inherited->qgradient()->stops()); + gradProp->setGradientStopsSet(inherited->gradientStopsSet()); + } matrix = inherited->qmatrix(); } else { diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp index 4a40bed..b065395 100644 --- a/src/svg/qsvgstyle.cpp +++ b/src/svg/qsvgstyle.cpp @@ -257,7 +257,7 @@ void QSvgGradientStyle::apply(QPainter *p, const QRectF &/*rect*/, QSvgNode *, Q // If the gradient is marked as empty, insert transparent black if (!m_gradientStopsSet) { - m_gradient->setColorAt(0.0, QColor(0, 0, 0, 0)); + m_gradient->setStops(QGradientStops() << QGradientStop(0.0, QColor(0, 0, 0, 0))); m_gradientStopsSet = true; } |