
Today I tryied (again) to animate an SVG using javascript. I wanted to simply move a star by offseting its x,y coordinates on screen. So, I created a star in Inkscape and then opened the SVG in Firefox. Looking at the xml (using FireBug) I noticed that d attribute of the star uses absolute coordinates. Thus, it is not practical to change it's position dinamically since I would have to set transform:translate(x-x0,y-y0) guessing the correct values of x0 and y0.
It would be much better (for scripting purposes) to have shapes always created with relative coordinates around (0,0) and then translated to x0,y0 using the transform attribute. The x0,y0 coordinate should be the rotation center of the object (which is represented by a little cross in inkscape ui)
Maybe we should modify sp_svg_write_path to do that. Or maybe create a sp_svg_write_path_relative. Or maybe there is a better place in the code where we could place the proposed new behaviour... I am just guessing. Please tell me what you think about it.
Juca