Details
-
Technical task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
-
fdb8c6fc0 (dev), 27148ff8d (dev), 08437f5ca (dev), 36a315d9c (dev), 119a934bc (dev), ee3138a16 (dev), d689a5e2a (dev), 8efc3251f (dev)
Description
Qt SVG is currently documented to only support static features of SVG, but it does support some simple animations (as is visible in the original example).
This tasks involves researching how much effort is involved in expanding support for animations in Qt SVG with the QPainter-based backend.
There are several svg elements that can be used for animations in Svg Tiny 1.2:
- <animate> : Takes a target attribute to animate it
- <animateTransform> : Animates a svg node transform
- <animateColor> : Animates color. This property is deprecated because it can be achieved using <animate> element
- <animateMotion> : Animates a svg node movement following a path
- <set> : Sets the value of an attribute to the desired value
Currently Qt Svg supports only <animateTransform> and <animateColor> with a limited implementation. There are alot of non-implemented attributes that are supported in the standard. For example, animation elements can set "xlink:href" attribute that tells the parser which target node to use instead of adding the animation element as a child to another svg node element.
Additionally, the supported animation elements are added as a style to a QSvgNode which is better handled by an animator class that advances the animation during rendering.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-127592 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
594664,3 | Support parsing animations in the CSS parser | dev | qt/qtbase | Status: MERGED | +2 | +1 |
595123,8 | Animations: Add animation properties to QSvgAttributes | dev | qt/qtsvg | Status: MERGED | +2 | 0 |
596016,7 | Animations: Create an animator class | dev | qt/qtsvg | Status: MERGED | +2 | +1 |
596504,17 | Animations: Create animation classes | dev | qt/qtsvg | Status: MERGED | +2 | 0 |
596505,12 | Animations: Move animations from style | dev | qt/qtsvg | Status: MERGED | +2 | +1 |
596623,12 | Animations: Add support for CSS animations | dev | qt/qtsvg | Status: MERGED | +2 | 0 |
603470,3 | Animations: Add options to disable animations | dev | qt/qtsvg | Status: MERGED | +2 | 0 |
606051,7 | Animations: Add support for additive and fill | dev | qt/qtsvg | Status: MERGED | +2 | 0 |