public class AnimationScaleTo extends Animation
CElement
to a given factor by scaling smoothly this CElement
every 40 milliseconds.FUNCTION_LINEAR, FUNCTION_SIGMOID, INFINITE_NUMBER_OF_LAPS
Constructor and Description |
---|
AnimationScaleTo(double sxTarget,
double syTarget)
Builds a "scaleTo" animation.
|
Modifier and Type | Method and Description |
---|---|
void |
doStart()
Method called when this animation is started.
|
double |
getScaleXTarget() |
double |
getScaleYTarget() |
Animation |
setAnimatedElement(CElement ce)
Sets the
CElement that must be animated by this animation. |
AnimationScaleTo |
setScaleTarget(double sxTarget,
double syTarget)
Sets the final scale factors along the x-axis and the y-axis.
|
void |
step(double t)
Override this abstract to specify the effect of this animation.
|
addTag, addTag, doResume, doStop, doSuspend, getAnimated, getDelay, getLapDuration, getNbLaps, getPacingFunction, hasTag, hasTag, isStarted, isSuspended, removeTag, removeTag, resetAnimationManager, resume, setCanvas, setDelay, setFunction, setLapDuration, setNbLaps, start, stop, suspend
public AnimationScaleTo(double sxTarget, double syTarget)
sxTarget
- The final scale factor along the x-axis.syTarget
- The final scale factor along the y-axis.public void step(double t)
public void doStart()
doStart
in class Animation
Animation.start()
public Animation setAnimatedElement(CElement ce)
CElement
that must be animated by this animation.
If the canvas that must received animation events has not yet been set,
it is set to the canvas to which belongs this CElement
.setAnimatedElement
in class Animation
ce
- The CElement
to animate.public double getScaleXTarget()
public double getScaleYTarget()
public AnimationScaleTo setScaleTarget(double sxTarget, double syTarget)
sxTarget
- The final scale factor along the x-axis.syTarget
- The final scale factor along the y-axis.