java.lang.Object | ||
↳ | sofia.graphics.Shape.Animator<AnimatorType extends sofia.graphics.Shape.Animator<AnimatorType>> | |
↳ | sofia.graphics.TextShape.Animator<AnimatorType extends sofia.graphics.TextShape.Animator<AnimatorType>> |
Provides animation support for shapes. Most uses of this class will not need to reference it directly; for example, an animation can be constructed and played by chaining method calls directly:
shape.animate(500).color(Color.BLUE).alpha(128).play();In situations where the type of the class must be referenced directly (for example, when one is passed to an event handler like
onAnimationDone
), referring to the name of that type can be
somewhat awkward due to the use of some Java generics tricks to ensure
that the methods chain properly. In nearly all cases, it is reasonable
to use a "?" wildcard in place of the generic parameter:
Shape.Animator<?> anim = shape.animate(500).color(Color.BLUE); anim.play();
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TextShape.Animator(long duration)
Creates a new animator for the specified shape.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
TextShape |
getShape()
Gets the shape that the receiver is animating.
| ||||||||||
AnimatorType |
typeSize(double typeSize)
Sets the final type size of the shape when the animation ends.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
sofia.graphics.Shape.Animator
| |||||||||||
From class
java.lang.Object
|
Creates a new animator for the specified shape. Users cannot call call this constructor directly; instead, they need to use the StrokedShape#animate(long) method to get an animator object.
duration | the length of one pass of the animation, in milliseconds |
---|
Gets the shape that the receiver is animating.
Sets the final type size of the shape when the animation ends.
typeSize | the final type size of the shape when the animation ends |
---|