diff options
author | Suneel BS <suneel.b-s@nokia.com> | 2009-05-14 15:22:15 +0530 |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-08-20 15:18:27 +0200 |
commit | be6a9d6223b9a07a4563cfe63e54b93da959d8f4 (patch) | |
tree | fef09a0bf111f5b6d62dcb6faac6e60d1f831978 /src/svg/qsvghandler.cpp | |
parent | a2d224b36be8ea23e64273b0224d1c0aba9ca9ac (diff) | |
download | qt4-tools-be6a9d6223b9a07a4563cfe63e54b93da959d8f4.tar.gz |
Fix for SVG animate-transform when additive = "replace".
On animate transform if additive = "replace" then transform specified
with the element should be replaced with value of animateTransform. If
additive = "sum" , then apply the animateTransform on top of element
level transform.
Reviewed-by: Kim
Diffstat (limited to 'src/svg/qsvghandler.cpp')
-rw-r--r-- | src/svg/qsvghandler.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp index a79e4a019d..2d07a1e379 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -2025,6 +2025,7 @@ static bool parseAnimateTransformNode(QSvgNode *parent, QString fillStr = attributes.value(QLatin1String("fill")).toString(); QString fromStr = attributes.value(QLatin1String("from")).toString(); QString toStr = attributes.value(QLatin1String("to")).toString(); + QString addtv = attributes.value(QLatin1String("additive")).toString(); QVector<qreal> vals; if (values.isEmpty()) { @@ -2087,8 +2088,11 @@ static bool parseAnimateTransformNode(QSvgNode *parent, return false; } + QSvgAnimateTransform::Additive additive = QSvgAnimateTransform::Replace; + if (addtv == QLatin1String("sum")) + additive = QSvgAnimateTransform::Sum; QSvgAnimateTransform *anim = new QSvgAnimateTransform(begin, end, 0); - anim->setArgs(type, vals); + anim->setArgs(type, additive, vals); anim->setFreeze(fillStr == QLatin1String("freeze")); anim->setRepeatCount( (repeatStr == QLatin1String("indefinite"))? -1 : |