|
PApplet | app = null |
|
int | currFrame = 0 |
|
int | height = 0 |
|
PImage[] | img = null |
|
int | nbrFrames = 0 |
|
GAbstractControl | owner = null |
|
int | width = 0 |
|
Class for the creation of non-animated icons to be used with GButton, GLabel, GCheckbox and GOption controls.
Introduced in v4.1
- Author
- Peter Lager
g4p_controls.GIcon.GIcon |
( |
| ) |
|
|
protected |
This constructor is not to be used.
g4p_controls.GIcon.GIcon |
( |
PApplet |
papp, |
|
|
String |
fname, |
|
|
int |
nbrCols, |
|
|
int |
nbrRows |
|
) |
| |
Create an icon
- Parameters
-
papp | the PApplet object that will be used to display this icon |
fname | the name of the file containing the tiled image. Create an icon |
papp | the PApplet object that will be used to display this icon |
fname | the name of the file containing the tiled image. |
nbrCols | number of horizontal tiles |
nbrRows | number of vertical tiles |
g4p_controls.GIcon.GIcon |
( |
PApplet |
papp, |
|
|
PImage |
image, |
|
|
int |
nbrCols, |
|
|
int |
nbrRows |
|
) |
| |
Create an icon.
- Parameters
-
papp | the PApplet object that will be used to display this icon |
image | the tiled image containing the frames. Create an icon. |
papp | the PApplet object that will be used to display this icon |
image | the tiled image containing the frames. |
nbrCols | number of horizontal tiles |
nbrRows | number of vertical tiles |
GIcon g4p_controls.GIcon.copy |
( |
| ) |
|
- Returns
- a copy of this icon to be used with another control.
PImage g4p_controls.GIcon.getFrame |
( |
int |
fn | ) |
|
Get the image to be displayed for the specified frame number. The supplied frame number will be constrained to a valid value.
- Parameters
-
fn | the frame image to retrieve. |
- Returns
- this icon
PImage g4p_controls.GIcon.getFrame |
( |
| ) |
|
- Returns
- the image for the current frame to be displayed.
GIcon g4p_controls.GIcon.getThis |
( |
| ) |
|
- Returns
- returns this icon.
int g4p_controls.GIcon.height |
( |
| ) |
|
- Returns
- the height of the icon
int g4p_controls.GIcon.width |
( |
| ) |
|
- Returns
- the width of the icon