Package paintingcanvas.animation
Class RotationAnimation
- java.lang.Object
-
- paintingcanvas.animation.Animation
-
- paintingcanvas.animation.RotationAnimation
-
public class RotationAnimation extends Animation
Controls animation that is to do with rotation
-
-
Field Summary
Fields Modifier and Type Field Description doubleendbooleanrelativejava.lang.Doublestart-
Fields inherited from class paintingcanvas.animation.Animation
Modifier and Type Field Description intdurationThe length of the animation in framesEasingeasingThe easing function to useintstartFrameThe frame at which the animation should start
-
-
Constructor Summary
Constructors Constructor Description RotationAnimation(double end)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Animationcopy()protected voidinitAnimation(Drawable<? extends Drawable<?>> drawable)Initialize the animation with the affected drawableRotationAnimationrelative()protected voidupdateAnimation(Drawable<? extends Drawable<?>> drawable, double progress)update the animation with the progress (0-1) and affected drawable-
Methods inherited from class paintingcanvas.animation.Animation
Modifier and Type Method Description static ColorAnimationcolorTo(int hex)Create an animation that changes the color ofthisto the specifiedcolor.static ColorAnimationcolorTo(int r, int g, int b)Create an animation that changes the color ofthisto the specifiedcolor.static ColorAnimationcolorTo(int r, int g, int b, int a)Create an animation that changes the color ofthisto the specifiedcolor.static AnimationcolorTo(java.awt.Color color)Create an animation that changes the color ofthisto the specifiedcolor.static ColorAnimationcolorTo(java.lang.String name)Create an animation that changes the color ofthisto the specifiedcolor.static ColorAnimationcolorTo(Hue hue)Create an animation that changes the color ofthisto the specifiedcolor.abstract Animationcopy()Animationeasing(Easing easing)Sets the easing to be used by this animationbooleanended(int frame)static OpacityAnimationfadeIn()Create an animation that fadesthisin.static OpacityAnimationfadeOut()Create an animation that fadesthisout.protected abstract voidinitAnimation(Drawable<?> drawable)Initialize the animation with the affected drawablestatic MovementAnimationmoveBy(int x, int y)Create an animation that movesthisby the specifiedxandystatic MovementAnimationmoveHorizontalBy(int x)Create an animation that movesthisby the specifiedxhorizontally.static MovementAnimationmoveTo(int x, int y)Create an animation that movesthisto the specifiedxandystatic MovementAnimationmoveVerticalBy(int y)Create an animation that movesthisby the specifiedyvertically.static RotationAnimationrotateBy(double angle)Create an animation that rotatesthisbyangledegrees.static RotationAnimationrotateTo(double angle)Create an animation that rotatesthisto the specifiedangledegrees.voidupdate(int frame)Updates the animation with the current frameprotected abstract voidupdateAnimation(Drawable<?> drawable, double progress)update the animation with the progress (0-1) and affected drawable
-
-
-
-
Method Detail
-
relative
public RotationAnimation relative()
-
updateAnimation
protected void updateAnimation(Drawable<? extends Drawable<?>> drawable, double progress)
Description copied from class:Animationupdate the animation with the progress (0-1) and affected drawable- Specified by:
updateAnimationin classAnimation- Parameters:
drawable- The affected drawableprogress- Animation progress (0-1)
-
initAnimation
protected void initAnimation(Drawable<? extends Drawable<?>> drawable)
Description copied from class:AnimationInitialize the animation with the affected drawable- Specified by:
initAnimationin classAnimation- Parameters:
drawable- The affected drawable
-
-