strokes
Class BeautifyAnimation

java.lang.Object
  extended by fr.lri.swingstates.animations.Animation
      extended by strokes.BeautifyAnimation

public class BeautifyAnimation
extends fr.lri.swingstates.animations.Animation

An animation to transform an input gesture into a template. The input gesture is smoothly modified to become a scaled version of the template (so the template bounding box matches the input gesture bounding box).

Author:
Caroline Appert

Field Summary
 
Fields inherited from class fr.lri.swingstates.animations.Animation
FUNCTION_LINEAR, FUNCTION_SIGMOID, INFINITE_NUMBER_OF_LAPS
 
Constructor Summary
BeautifyAnimation(java.lang.String className, fr.lri.swingstates.canvas.CPolyLine initialGestureInk, java.util.Vector<java.awt.geom.Point2D> source, java.util.Vector<java.awt.geom.Point2D> dest, java.awt.Color colorFeedback)
          Builds an animation to beautify the ink of an input stroke.
 
Method Summary
 void doStart()
          
 void doStop()
          
 java.lang.String getClassName()
           
 void step(double t)
          
 
Methods inherited from class fr.lri.swingstates.animations.Animation
addTag, addTag, doResume, doSuspend, getAnimated, getDelay, getLapDuration, getNbLaps, getPacingFunction, hasTag, hasTag, isStarted, isSuspended, removeTag, removeTag, resetAnimationManager, resume, setAnimatedElement, setCanvas, setDelay, setFunction, setLapDuration, setNbLaps, start, stop, suspend
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeautifyAnimation

public BeautifyAnimation(java.lang.String className,
                         fr.lri.swingstates.canvas.CPolyLine initialGestureInk,
                         java.util.Vector<java.awt.geom.Point2D> source,
                         java.util.Vector<java.awt.geom.Point2D> dest,
                         java.awt.Color colorFeedback)
Builds an animation to beautify the ink of an input stroke.

Parameters:
className - The name of the template class
initialGestureInk - The ink to beautify
source - The input gesture points (sampled to N points)
dest - The template gesture points (sampled to N points)
colorFeedback - The color used to draw the animated ink
Method Detail

doStart

public void doStart()

Overrides:
doStart in class fr.lri.swingstates.animations.Animation

step

public void step(double t)

Specified by:
step in class fr.lri.swingstates.animations.Animation

doStop

public void doStop()

Overrides:
doStop in class fr.lri.swingstates.animations.Animation

getClassName

public java.lang.String getClassName()
Returns:
The name of the template class.