- From: ddailey <ddailey@zoominternet.net>
- Date: Sat, 13 Nov 2010 15:25:16 -0500
- To: "www-svg" <www-svg@w3.org>
Different browsers seem to have different ideas for where to put the rotated
text inside a tspan.
See http://srufaculty.sru.edu/david.dailey/svg/newstuff/text6.svg (sorry
about the claim that only IE/ASV handles dy="1em" -- that was true in 2007!
and I haven't had a chance to revise the code) but note how FF and the
others place the rotated text at different positions.
Okay, maybe this is okay, perhaps just a bug in FF? ...
But I'm not sure why we can't use an animateTransform on one of these
puppies.
Here's what I mean:
//var Oanim=document.createElementNS(xmlns, "animateTransform")
//Oanim.setAttribute("attributeName","transform")
//Oanim.setAttribute("type","rotate")
//Oanim.setAttribute("dur",2.5)
//Oanim.setAttribute("from","360,280,175")
//Oanim.setAttribute("to","0,280,175")
//Oanim.setAttribute("repeatCount","indefinite")
Above doesn't work (though it would allow me to set the center of rotation)
var Oanim=document.createElementNS(xmlns, "animate")
Oanim.setAttribute("attributeName","rotate")
Oanim.setAttribute("dur",2.5)
Oanim.setAttribute("from","360")
Oanim.setAttribute("to","0")
Oanim.setAttribute("repeatCount","indefinite")
This does work (at least in IE/ASV and Opera) but it doesn't allow me to set
the center of rotation. Basically I want letters to rotate about the centers
of their own bounding boxes.
Why do we have these rather funny "rotate" attributes on <tspan>s but
transform="rotate" on everything else?
Is there any way to animate the rotation of a tspan about a different
centroid?
I suppose I will have to build fonts and then after parsing a word into
animation-worthy subglyph sequences I'll swap back in the corresponding
paths of the letters of the substring for the duration of an animation??
Yuck -- not very declarative is it?!
regards
David
Received on Saturday, 13 November 2010 20:25:50 UTC