MRchildNEO / svgweb

Automatically exported from code.google.com/p/svgweb
Other
0 stars 0 forks source link

Support animateMotion #541

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem? Try viewing any svg file with an 
animateMotion element.
What is the expected output?  animated motion.
What do you see instead?  no animation.
Tested with r1230, Flash 10,  and forceflash=true.

The following examples test various animateMotion attributes and can be found 
in tests/svggen
animate-elem-04-t.svg - from/to
animate-elem-05-t.svg - values
animate-elem-06-t.svg - path attribute
animate-elem-07-t.svg - mpath element
animate-elem-09-t.svg - discrete
animate-elem-10-t.svg - linear
animate-elem-11-t.svg - paced
animate-elem-12-t.svg - keySplines
animate-elem-24-t.svg - with animateTransform
animate-elem-33-t.svg - keyPoints+keyTimes

None of these test cases work since animateMotion is not implemented in svg.swf.

Attached is a patch which implements animateMotion with the exception of the 
rotate attribute.

Much of the code in SVGAnimateMotionNode is very similar to that in 
SVGPathNode.  The difference being that the path is "drawn" into the 
SVGMotionPath class.  Bezier curves and elliptical arcs are approximated by a 
series of straight line segments.  The SVGMotionPath class is then kept for 
later execution of the animation.  The path is generated in initialize().

A few helper classes are introduced into utils -  SVGCoordinate, SVGMotionPath, 
SVGMotionPathSegment, SVGPathSegment, SVGLineSegment, SVGBezierSegment, 
SVGEllipticalArcSegment.

All the above test cases work with the patch.  Also fixes Issue 239.

Original issue reported on code.google.com by k...@svgmaker.com on 10 Aug 2010 at 4:45

Attachments:

GoogleCodeExporter commented 8 years ago
Issue 239; Issue 541; Support mpath and animateMotion.
Thanks for the patch go to Ken Stacey of svgmaker.com.

Original comment by grick23@gmail.com on 25 Nov 2010 at 6:52

GoogleCodeExporter commented 8 years ago
Excellent! Thanks, Rick.

Original comment by k...@svgmaker.com on 26 Nov 2010 at 1:52