public class

TextShape.Animator

extends Shape.Animator<AnimatorType extends Animator<AnimatorType>>
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>>

Class Overview

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();

Summary

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

Protected Constructors

protected TextShape.Animator (long duration)

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.

Parameters
duration the length of one pass of the animation, in milliseconds

Public Methods

public TextShape getShape ()

Gets the shape that the receiver is animating.

Returns
  • the shape that the receiver is animating

public AnimatorType typeSize (double typeSize)

Sets the final type size of the shape when the animation ends.

Parameters
typeSize the final type size of the shape when the animation ends
Returns
  • this animator, for method chaining