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

showRectangle()

Description

Makes the animation-rectangle for an Animation visible.

(Since this is done by calling the Processing rect() method, fill and stroke settings affect how the rectangle is drawn. Also, rectMode() must be CORNER for this to work properly.)

Prototype

showRectangle();

Parameters (none)
Return   (none)
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);
}

void loop()
{
  background(127);
  test.draw();
  text("Click to show the rectangle.", 25, 25);
}

void mousePressed()
{
test.showRectangle(); // make the rectangle visible.
}