public class GIcon
extends java.lang.Object
Constructor and Description |
---|
GIcon(processing.core.PApplet papp,
processing.core.PImage image,
int nbrCols,
int nbrRows)
Create an animated icon.
|
GIcon(processing.core.PApplet papp,
java.lang.String fname,
int nbrCols,
int nbrRows)
Create an animated icon
|
Modifier and Type | Method and Description |
---|---|
GIcon |
copy()
Returns a copy of this icon to be used with another control.
|
processing.core.PImage |
getFrame()
Get the image for the current frame to be displayed.
|
processing.core.PImage |
getFrame(int fn)
Get the image to be displayed for the specified frame number.
|
public GIcon(processing.core.PApplet papp, java.lang.String fname, int nbrCols, int nbrRows)
papp
- the PApplet object that will be used to display this iconfname
- the name of the file containing the tiled image.nbrCols
- number of horizontal tilesnbrRows
- number of vertical tilespublic GIcon(processing.core.PApplet papp, processing.core.PImage image, int nbrCols, int nbrRows)
papp
- the PApplet object that will be used to display this iconimage
- the tiled image containing the frames.nbrCols
- number of horizontal tilesnbrRows
- number of vertical tilespublic GIcon copy()
public processing.core.PImage getFrame(int fn)
fn
- the frame image to retrieve.public processing.core.PImage getFrame()
Processing library G4P by Peter Lager. (c) 2017