public class AnimationTransparency extends Animation
CElement
to a given transparency level.
By default, The pacing function is linear.FUNCTION_LINEAR, FUNCTION_SIGMOID, INFINITE_NUMBER_OF_LAPS
Constructor and Description |
---|
AnimationTransparency(float t)
Builds a
AnimationTransparency that changes the transparency of both interior and outline of a CElement . |
AnimationTransparency(float tFill,
float tOutline)
Builds a
AnimationTransparency that changes the transparency of a CElement . |
Modifier and Type | Method and Description |
---|---|
void |
doStart()
Method called when this animation is started.
|
float |
getTransparencyFillTarget() |
float |
getTransparencyOutlineTarget() |
Animation |
setAnimatedElement(CElement ce)
Sets the
CElement that must be animated by this animation. |
AnimationTransparency |
setTransparencyFillTarget(float t)
Sets the final transparency value for interior.
|
AnimationTransparency |
setTransparencyOutlineTarget(float t)
Sets the final transparency value for outline.
|
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 AnimationTransparency(float t)
AnimationTransparency
that changes the transparency of both interior and outline of a CElement
.t
- The target transparency level.public AnimationTransparency(float tFill, float tOutline)
AnimationTransparency
that changes the transparency of a CElement
.tFill
- The target transparency level for interior.tOutline
- The target transparency level for interior.public void doStart()
doStart
in class Animation
Animation.start()
public void step(double t)
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 float getTransparencyFillTarget()
public AnimationTransparency setTransparencyFillTarget(float t)
t
- The final angle of rotation.public float getTransparencyOutlineTarget()
public AnimationTransparency setTransparencyOutlineTarget(float t)
t
- The final angle of rotation.