The former text can be cleared in the processing?
in
Programming Questions
•
2 years ago
Hi, boys, I want to show the time evolved with drawing the different pictures, but the former time is still left. I want to know if the forrmer time can be cleared.
int numFrames = 19; // The number of frames in the animation
int frame = 0;
PImage[] images = new PImage[numFrames];
PFont plotFont;
void setup()
{
size(417, 250);
frameRate(2.5);
images[0] = loadImage("0.bmp");
images[1] = loadImage("1.bmp");
images[2] = loadImage("2.bmp");
images[3] = loadImage("3.bmp");
images[4] = loadImage("4.bmp");
images[5] = loadImage("5.bmp");
images[6] = loadImage("6.bmp");
images[7] = loadImage("7.bmp");
images[8] = loadImage("8.bmp");
images[9] = loadImage("9.bmp");
images[10] = loadImage("10.bmp");
images[11] = loadImage("11.bmp");
images[12] = loadImage("12.bmp");
images[13] = loadImage("13.bmp");
images[14] = loadImage("14.bmp");
images[15] = loadImage("15.bmp");
images[16] = loadImage("16.bmp");
images[17] = loadImage("17.bmp");
images[18] = loadImage("18.bmp");
plotFont= createFont("Geogeria",20);
textFont(plotFont);
smooth();
}
void draw()
{
frame = (frame+1) % numFrames; // Use % to cycle through frames
image(images[frame], 0, 0);
fill(0);
textSize(20);
String title= nf(frame,2)+":00"; -------- Here!
text(title, 10,240);
String label= "Unique interaction";
text(label, 210,240);
}
int numFrames = 19; // The number of frames in the animation
int frame = 0;
PImage[] images = new PImage[numFrames];
PFont plotFont;
void setup()
{
size(417, 250);
frameRate(2.5);
images[0] = loadImage("0.bmp");
images[1] = loadImage("1.bmp");
images[2] = loadImage("2.bmp");
images[3] = loadImage("3.bmp");
images[4] = loadImage("4.bmp");
images[5] = loadImage("5.bmp");
images[6] = loadImage("6.bmp");
images[7] = loadImage("7.bmp");
images[8] = loadImage("8.bmp");
images[9] = loadImage("9.bmp");
images[10] = loadImage("10.bmp");
images[11] = loadImage("11.bmp");
images[12] = loadImage("12.bmp");
images[13] = loadImage("13.bmp");
images[14] = loadImage("14.bmp");
images[15] = loadImage("15.bmp");
images[16] = loadImage("16.bmp");
images[17] = loadImage("17.bmp");
images[18] = loadImage("18.bmp");
plotFont= createFont("Geogeria",20);
textFont(plotFont);
smooth();
}
void draw()
{
frame = (frame+1) % numFrames; // Use % to cycle through frames
image(images[frame], 0, 0);
fill(0);
textSize(20);
String title= nf(frame,2)+":00"; -------- Here!
text(title, 10,240);
String label= "Unique interaction";
text(label, 210,240);
}
1