- From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
- Date: Wed, 11 Jul 2007 12:32:32 +0200
- To: j.chetwynd@btinternet.com, www-svg@w3.org
> thanks for your suggestions, I'm not sure we understand each other on > this. What I understand is, that you are looking for methods to reuse parts of the source code as one problem. Because you cannot use the use element for animation elements directly, you can use entities to do this or to reuse attributes or parts of values of attributes or complete elements. The other problem seems to be to move or to scale somehow some objects or a symbol. This can be done inside the symbol or can be done outside the use element, referencing the symbol. Thats your choice and depends on your needs and preferences. > > the problem with using <g> is that it doesn't have x or y No, for g you either animateTransform of the type translate or you animateMotion to do the translation, this combines motion in x and y direction to save some source code or it is possible to use a smooth (or not smooth) path with animateMotion. Or if you need to change the size, you can use type scale for animateTransform, maybe combined with translations, if the objects are not centered around zero. > > I'd like to animate the viewbox directly, but other than through > <use> i cant find a method... <symbol ...> <animate attributeName="viewBox" values="0 0 150 150; 50 70 50 30; -50 -50 300 300" dur="10s" /> <!-- symbol content or use element to reference something --> </symbol> In your example the use has x, y, width and height, therefore if you animate the viewBox of the symbol, the content is transformed somehow.
Received on Wednesday, 11 July 2007 10:44:08 UTC