com.depthexplorer.animation
Class SVGInterpolate

java.lang.Object
  extended by com.depthexplorer.animation.XMLinterpolator
      extended by com.depthexplorer.animation.SVGInterpolate

public class SVGInterpolate
extends XMLinterpolator

Author:
Administrator

Constructor Summary
SVGInterpolate()
           
 
Method Summary
 boolean afterAnimate(String result, int imageCount)
          This function will be called after a single frame has been animated.
 String interpolateItem(String tagName, String attrName, String valueStart, String valueEnd, double fraction)
          Interpolates an item.
static double roundTwoDecimals(double val)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SVGInterpolate

public SVGInterpolate()
Method Detail

interpolateItem

public String interpolateItem(String tagName,
                              String attrName,
                              String valueStart,
                              String valueEnd,
                              double fraction)
Description copied from class: XMLinterpolator
Interpolates an item.

Specified by:
interpolateItem in class XMLinterpolator
Parameters:
tagName - Name of the tag.
attrName - Name of the attribute.
valueStart - Starting value.
valueEnd - Ending value.
fraction - Fraction of the animation to perform.
Returns:
The new value of the attribute.

afterAnimate

public boolean afterAnimate(String result,
                            int imageCount)
Description copied from class: XMLinterpolator
This function will be called after a single frame has been animated.

Specified by:
afterAnimate in class XMLinterpolator
Parameters:
result - The current XML of the animator.
Returns:
True on success. False on error.

roundTwoDecimals

public static double roundTwoDecimals(double val)