Class GifImage
- java.lang.Object
-
- GifImage
-
public class GifImage extends java.lang.Object
This class can be used to read animated gif image files and extract the individual images of the animation sequence.- Author:
- Michael Berry, Neil Brown Copyright (c) 2011,2013,2014,2018
-
-
Constructor Summary
Constructors Constructor Description GifImage(java.lang.String file)
Set the image of the actor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description greenfoot.GreenfootImage
getCurrentImage()
java.util.List<greenfoot.GreenfootImage>
getImages()
Get all the images used in the animationboolean
isRunning()
Determines whether the animation is runningvoid
pause()
Pause the animation.void
resume()
Resume the animation.
-
-
-
Method Detail
-
getImages
public java.util.List<greenfoot.GreenfootImage> getImages()
Get all the images used in the animation- Returns:
- a list of GreenfootImages, corresponding to each frame.
-
pause
public void pause()
Pause the animation.
-
resume
public void resume()
Resume the animation.
-
isRunning
public boolean isRunning()
Determines whether the animation is running- Returns:
- true if the animation is running, false otherwise
-
getCurrentImage
public greenfoot.GreenfootImage getCurrentImage()
-
-