From SVG

This page is an archive of the previous Group's wiki from http://www.w3.org/Graphics/SVG/Group/wiki.

Additive Animation for text x, y, rotate?

Exploring the behaviour of additive behaviour of text x, y, rotate of the types '<coordinate>+', respectively '<number>+'.

For values- and from-to-animations it is easy to determine and to simulate both types of behaviour, additive and non-additive. Both are well defined. Even for properties like stroke-dasharray it is simply possible to simulate additive behaviour using slightly different animations, therefore it is not quite understandable (for me), why they are noted to be non-additive.

to-animations are a mixture of additive and non-additive behaviour, but due to modifications in SMIL2 (compared to the old SMIL animation recommendation applicable for SVG1.1) and a minor clarification in the current SMIL3 draft, the behaviour is now always well defined even for lists of number like values, therefore this can unambiguously tested too.

from-by- and by-animations are only well defined, if the attributes are additive. Therefore additive behaviour can be simulated, tested and implemented without further problems. If non-additive behaviour is assumed, this however leads always to error processing. As far as I can see, SVG1.2 has no specific rule, what to do, if there is no sufficient values, to, by (or path for animateMotion) information at all in an animation element, therefore SMIL2 error processing might be used. This means, such stupid animation elements have no effect on presentation, but the timing can still be used to derive some timing information for example for dependent animations.

Samples for text only (SVG tiny 1.2)

In general the additive behaviour is simulated for comparison in red, covered by blue test cases, it the behaviour is additive. If available the non-additive behaviour is indicated in grey (if not available, the expected result from error processing as explained above is indicated).

Details are given in the desc element of each sample as well as the behaviour of some viewers.

Samples for values-animations

Samples for from-to-animations

Samples for from-by-animations

Samples for by-animations

Samples for to-animations

Some observations or results from the tests

The adobe plugin uses always additive behaviour and manages the to-animations as well (these examples are simple enough, that critical errors for to-animations will not yet get visible).

Squiggle 1.7 uses additive behaviour for values, from-to, from-by animations, provides error messages for the by-animation of rotate (could be an error related to an interpolation problem, I have already seen in other tests, therefore maybe not directly related to the issue tested here) and additive behaviour for x, an error message for to-animation of rotate and no animation for x.

Operas version history reflects the plurivalent possible interpretations of SVG1.1, the old SMIL animation recommendation, SVG1.2 tiny and SMIL2 maybe. Especially in earlier versions like 8.x and 9 preview/beta this is often superposed by other errors. In some versions it can be estimated, that an additive behaviour was intended. In other versions one might see some experiments to derive any behaviour from SVG1.1 and the old SMIL animation recommendation somehow (as this is tried in some of my SVG1.1 animation tests too, there might be a weak interaction between despaired test approaches, bug reports and implementation trials here). The general trend for values- and from-to-animation seems to be from additive behaviour to non-additive behaviour, for the others it looks like exploring and guessing around (see for details desc element of each sample).

Amaya9.x and KSVG1 (KDE, Konqueror) have some rudimental animation support, the behaviour is mainly superposed by implementation gaps, they cannot be taken as a reliable reference currently.

Samples including tspan

To see, how or if it works with a combination of text and tspan, some more values animation samples for x and y are provided.

Details are given in the desc element of each sample as well as the behaviour of some viewers.

Some observations or results from the tests

As in the previous samples, the adobe plugin shows always additive behaviour, but in the last sample it does not use the animated absolute positions derived from the animated x and y from text as underlying values. Squiggle 1.7 shows too always additive behaivour, but has the same problem as the adobe plugin with the last sample.

In Opera typically the behaviour is superposed by different errors. Only Opera9 technical preview 1 shows completly non additive behaviour not superposed by errors. Due to errors in the other versions, the behaviour can only identified to be plurivalent, more non additive, only in some versions maybe additive with additional errors.