W3C home > Mailing lists > Public > www-smil@w3.org > July to September 2007

[SMIL30 LC comment] 7.13.2 MediaPanZoom Module

From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
Date: Fri, 3 Aug 2007 12:20:40 +0200
To: www-smil@w3.org
Message-Id: <200708031220.40108.Dr.O.Hoffmann@gmx.de>

Hello SMIL working group,

I think, I found a few problems with this module.

a) General definition

'The SMIL MediaPanZoom module integrates the functionality of the SVG viewBox 
 attribute and adapts it for use within the SMIL media framework.'

I think, it is in the current definition only in some points related to the 
SVG viewBox:

'The value of the viewBox attribute is an ordered list of four numbers, 
separated by whitespace and/or a comma:'

- This indeed fits to the SVG viewBox.


' width
A non-negative length value (using CSS2 pixel or non-negative percentage 
that defines the horizontal dimension of the viewBox. If pixel notation is 
the 'px' suffix may be omitted. A negative value is an error. The default 
value of 
width is auto.'

- This does not fit to SVG and not to the previous description, because the
value is not a number anymore if it can contain the unit 'px' or can be noted
in percentage. If the default width is 'auto', this is neither a number, nor a
percentage value, nor a length value (a number and a unit).
This section is inconsistent in itself and 'width' and 'height' are not 
consistent with the SVG definition of viewBox.

Comparison with SVG:

-> viewBox on an image element for example does not
work in SVG as described here for SMIL3.
In SVG 1.1 or SVG tiny 1.2 CR it is noted:
'i.e. the 'image' element has an implicit 'viewBox' of 
"0 0 raster-image-width raster-image-height"'
Similar thing we get in SVG tiny 1.2 CR
for the elements video and animation.
To conclude, the viewBox described in this draft does not
have much more in common with the SVG viewBox element as the name.
It works more or less in a similar way for the elements svg and symbol.
Maybe it is a good idea to change the name of the SMIL attribute to
avoid confusion, for example what about zoomBox?

b) The example contains errors:

'<smil ...>
      <root-layout height="200" width="300" backgroundColor="red" />
      <region id="B" top="0" left="0" height="50" width="75"  
backgroundColor="blue" />
      <ref id="R0" src="table_233x150.jpg" viewBox="0,0,50,75" dur="20s" 
region="T" fit=""meet" >
         <animate attributeName="viewBox" 
                     values="(25,20,50,75); (45,55,50,75);(140,40,50,75);
(35,0,100,150); (0,0,100,150);" 
                     dur="20s" />

- the animate element, the values attribute:
-> The last ';' is wrong
-> the '(' and ')' are not part of the viewBox attribute or the values 
     therefore this is wrong too.  
-> values="25,20,50,75; 45,55,50,75;140,40,50,75;35,0,100,150; 0,0,100,150"

c) Animation problem (?)

-> What about calcMode paced for viewBox?
Due to some wrong formulas in the SVG tiny 1.2 CR
I already did some calculations about this for several
attributes with lists of numbers or even with a mixture
of values of different units. viewBox is either a list of
two vectors or a list of one vector and two scalars.
There can be a paced change of the value of a viewBox.
The procedure can be to expand the value consisting of
4 numbers to a list of 4 points or vectors to the corners
of the viewBox. For each point or vectors a paced change
can be gained, using the euclidian distance. If this is
fulfilled, this results in a paced change of each point
of the viewBox. But because each corner needs to be
animated separately, this is no interpolation between the
given values anymore, therefore the condition of calcMode
paced is not fulfilled, to interpolate between the values.
Therefore we can be pretty sure, that there is no 
behaviour completely consistent with the definition of
calcMode paced. 
What is the expected correct behaviour? Fallback to 
calcMode linear? 
Received on Saturday, 4 August 2007 00:01:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:34:27 UTC