Re: Accessing the animated position of an SVG element


Hi Cam,

--Original Message--:
>Alex Danilo:
>> getCTM() says "Returns the transformation matrix from current
>> user units (i.e., after application of the ‘transform’ attribute,
>> if any) to the viewport coordinate system for the
>> nearestViewportElement."
>
>Hmm, if getCTM() should take into account motion animations I think it
>should say so explicitly.

Yes I agree.

>> So if there's an animateMotion happening, the transform from
>> user to device space is changing and so should getCTM() for
>> the rect for sure.
>
>Although animate.html 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.

Yes, and it's the CTM on the <g> that gets the supplemental transform,
so for the <g> getCTM() probably(?) doesn't need to change for the motion.

I did say "rect" in the above quoted text, not <g>.

Once you get inside the <g> and look at the CTM being applied to
the <rect> it's taken the animateMotion into account, otherwise what
gets returned from getCTM isn't much use.

Anyway, I'll stop there. Too many emails this week:-)

Alex

>-- 
>Cameron McCormack ≝ http://mcc.id.au/
>
>
>

Received on Wednesday, 20 October 2010 05:02:51 UTC