diff options
author | Suneel BS <suneel.b-s@nokia.com> | 2009-05-08 05:39:45 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-07-01 13:19:03 (GMT) |
commit | 7ab895f576b8ef8380838778958fae651a550f79 (patch) | |
tree | 633f3f37bc97e8d18f222f4b0a48ce781d11501a /src/svg/qsvgstyle.cpp | |
parent | 1d32cdf73843ba98104fdbc6d5d0a296dbb689b0 (diff) | |
download | Qt-7ab895f576b8ef8380838778958fae651a550f79.zip Qt-7ab895f576b8ef8380838778958fae651a550f79.tar.gz Qt-7ab895f576b8ef8380838778958fae651a550f79.tar.bz2 |
Fixed inheritance of some attributes in SVG.
Fixed inheritance of stroke attributes, the font-size and text-anchor
attribute. Autotest added by Kim.
Reviewed-by: Kim
Diffstat (limited to 'src/svg/qsvgstyle.cpp')
-rw-r--r-- | src/svg/qsvgstyle.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp index fec6231..556201b 100644 --- a/src/svg/qsvgstyle.cpp +++ b/src/svg/qsvgstyle.cpp @@ -195,14 +195,18 @@ void QSvgFontStyle::revert(QPainter *p, QSvgExtraStates &) } QSvgStrokeStyle::QSvgStrokeStyle(const QPen &pen) - : m_stroke(pen) + : m_stroke(pen), m_strokePresent(true) { } void QSvgStrokeStyle::apply(QPainter *p, const QRectF &, QSvgNode *, QSvgExtraStates &) { m_oldStroke = p->pen(); - p->setPen(m_stroke); + if (!m_strokePresent || !m_stroke.widthF() || !m_stroke.color().alphaF()) { + p->setPen(Qt::NoPen); + } else { + p->setPen(m_stroke); + } } void QSvgStrokeStyle::revert(QPainter *p, QSvgExtraStates &) |