W3C home > Mailing lists > Public > www-svg@w3.org > January 2006

RE: Effect of 'animateMotion' on transform.animVal

From: Jon Ferraiolo <jonf@adobe.com>
Date: Mon, 9 Jan 2006 15:59:49 -0800
Message-ID: <6ECA24BE410D994496A2AE995367C5C8576902@namail3.corp.adobe.com>
To: "Cameron McCormack" <cam-www-svg@aka.mcc.id.au>, <www-svg@w3.org>


Hi Cameron,
To me, the spirit of the API design with SVG is that you have to use
alternate APIs with the strings "Anim", "Animated" or "Presentation" in
the name in order to access anything about the animated state of the
world; otherwise, the API will return the base values. Thus, I would
assume getCTM returns the matrix without taking into account any extra
transforms due to animateMotion or animateTransform. But the implication
is that there would be no APIs which return a CTM which factors in any
transforms due to animateMotion. 

If my analysis is correct, then you have discovered a hole where SVG
provides an incomplete set of APIs. (Not that this hole is hugely
important to fill immediately. I am not sure how many scripters need
this information. It is over 4 years since SVG 1.0 went to
Recommendation and I don't remember anyone else asking about this.)

Jon


-----Original Message-----
From: www-svg-request@w3.org [mailto:www-svg-request@w3.org] On Behalf
Of Cameron McCormack
Sent: Monday, January 09, 2006 3:31 PM
To: www-svg@w3.org
Subject: Effect of 'animateMotion' on transform.animVal


Hi WG.

I'd like to get something clarified about 'animateMotion'.  If an
object's position is animated using this element, does the animated
transform value reflect this?  While the text for 'animateTransform'[1]
states:

  The 'animateTransform' element animates a transformation attribute on
  a target element, [...]

and I'm guessing that by "a transformation attribute" it means "the
transform attribute", the text for 'animationMotion'[2] is less clear:

  The 'animateMotion' element causes a referenced element to move along
  a motion path.

It also says:

  The various (x,y) points of the shape provide a supplemental
  transformation matrix onto the CTM for the referenced object which
  causes a translation along the x- and y-axes of the current user
  coordinate system by the (x,y) values of the shape computed over time.
  Thus, the referenced object is translated over time by the offset of
  the motion path relative to the origin of the current user coordinate
  system. The supplemental transformation is applied on top of any
  transformations due to the target element's transform attribute or any
  animations on that attribute due to 'animateTransform' elements on the
  target element.

so there is an extra transformation in there that at least manifests
itself in the return value of SVGLocatable.getCTM.  But it doesn't say
if it should go in the animVal.

Perhaps if it doesn't affect the animated transform value it is because
'animateMotion' can be applied to elements that don't implement
SVGTransformable.  In the list of elements that can be animated with
'animateMotion', only one of them doesn't implement SVGTransformable:
'mask'.  But then, 'mask' doesn't implement SVGLocatable either, so I'm
not sure what it means to animate its motion when it doesn't have a CTM.

It would be great if this could be clarified for me.

Thanks,

Cameron

[1] http://www.w3.org/TR/SVG11/animate.html#AnimateTransformElement
[2] http://www.w3.org/TR/SVG11/animate.html#AnimateMotionElement

-- 
 Cameron McCormack			ICQ: 26955922
 cam (at) mcc.id.au			MSN: cam (at) mcc.id.au
 http://mcc.id.au/			JBR: heycam (at) jabber.org
Received on Monday, 9 January 2006 23:59:34 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:33 GMT