Animation Overview - News - Installation - Reference - Examples - FAQ  
 

image()

Description Returns the BImage an Animation is using, or null if none was defined.
Prototype

BImage image()

Parameters   (none)
Return BImage The BImage used by this Animation, or null if none exists.
Example

 

Animation test;
BFont font;

void setup()
{
  size(400,100);
  font = loadFont("RotisSanSer.vlw.gz");
  textFont(font, 20);
 
  test = new Animation(this, loadImage("image.gif"), 100,40, 200,40);
  test.showRectangle();
}

void loop()
{
  background(127);
  test.draw();
  BImage img = test.image(); // retrieve the image.
  text("Image: ", 10, 25);
  image(img, 60, 10);
}