You are on page 1of 1

PImage a; // Declare variable "a" of type PImage

float zoom = 1;
int d = 40;
float xo;
float yo;
float zoom = 1;
float angle = 0;
void setup(){
size(1600,900);
smooth();
frameRate(10);
a = loadImage("waterfall.jpg");
noStroke();
}
void draw () {
scale(zoom);
translate (xo,yo);
image(a,0,0);
}

void keyPressed() {
if(key == '+') {
zoom += .05;
} else if (key == '-') {
zoom -= .05 ;
}
}
void mouseDragged() {
xo = xo + (mouseX - pmouseX);
yo = yo + (mouseY - pmouseY);
}

You might also like