diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-09-14 15:50:30 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-09-14 15:57:15 (GMT) |
commit | ab35f0f8b0d872bc2e963c6ef869fade71b83e3f (patch) | |
tree | af58509d936d6656fd6340c5f5da04aec85e912f /src/svg/qsvgtinydocument.cpp | |
parent | 886feff55f48ebdff0440278e611f822e6326c91 (diff) | |
download | Qt-ab35f0f8b0d872bc2e963c6ef869fade71b83e3f.zip Qt-ab35f0f8b0d872bc2e963c6ef869fade71b83e3f.tar.gz Qt-ab35f0f8b0d872bc2e963c6ef869fade71b83e3f.tar.bz2 |
Fixed gradient referencing in SVGs.
An SVG element can now reference a gradient or solid-color defined
anywhere in the same SVG file.
Task-number: 245602
Reviewed-by: Trond
Diffstat (limited to 'src/svg/qsvgtinydocument.cpp')
-rw-r--r-- | src/svg/qsvgtinydocument.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/svg/qsvgtinydocument.cpp b/src/svg/qsvgtinydocument.cpp index 5d58f79..e2cefeb 100644 --- a/src/svg/qsvgtinydocument.cpp +++ b/src/svg/qsvgtinydocument.cpp @@ -350,6 +350,26 @@ QSvgFont * QSvgTinyDocument::svgFont(const QString &family) const return m_fonts[family]; } +void QSvgTinyDocument::addNamedNode(const QString &id, QSvgNode *node) +{ + m_namedNodes.insert(id, node); +} + +QSvgNode *QSvgTinyDocument::namedNode(const QString &id) const +{ + return m_namedNodes.value(id); +} + +void QSvgTinyDocument::addNamedStyle(const QString &id, QSvgFillStyleProperty *style) +{ + m_namedStyles.insert(id, style); +} + +QSvgFillStyleProperty *QSvgTinyDocument::namedStyle(const QString &id) const +{ + return m_namedStyles.value(id); +} + void QSvgTinyDocument::restartAnimation() { m_time.restart(); |