Java Class Name: VoltageImage
Notable APIs:
void Animate(boolean bLoop);
Starts your animation playing. Only necessary if you don’t have the “Auto Play” option checked.
void StartAnimation( AnimationMode animMode, boolean bLoopAnimation, int milsPerFrame, int startImage );
This also starts your animation playing.
void SetAnimateMode( AnimationMode animMode);
Sets the animation direction. Valid values for animMode are Forward
, Backward
, ForwardAndBack
, and BackAndForth
.
int GetNumberOfFrames();
Returns the number of frames (images) in your animation.
void SetCurrentFrame(int curFrame);
Sets the current foreground frame for the animation. curFrame is a zero-based index into the array of total frames in the animation.
void SetCurrentImage( String resourceName );
Also sets the current foreground frame, but takes a resource name instead of a frame index.
int GetCurrentFrame();
Returns the index of the current foreground frame.
void Clear();
Removes all frames from the animation.
void SetAnimationSpeed( int milsPerFrame, boolean bReset );
Sets the animation speed, in milliseconds per frame.
void AddNewImage( String resourceName );
Adds a new image to the animation.
void AddImageFromMemory( byte[] data );
Adds a new image to the animation from a memory buffer. The buffer should be the contents of an image file (PNG, JPG, etc.) rather than a table of pixels.