// Displaying // by REAS // Images can be displayed to the screen at their actual size // or any other size. Only JPG and GIF images may be loaded. // The hint(SMOOTH_IMAGES) function presents images in // a higher quality. // Created 2 November 2002 BImage a; // Declare variable "a" of type BImage float vanishX=85.0; float vanishY=69.0; void setup(){ size(400, 300); a = loadImage("Image726.jpg"); // Load the images into the program } void loop(){ float pic1Width=((400-mouseX)/400.0)*400; float pic1height=((400-mouseX)/400.0)*300; float pic2Width=((300-mouseY)/300.0)*400; float pic2height=((300-mouseY)/300.0)*300; image(a,0,0,width,height ); image(a,((width-pic2Width)*vanishX)/width,((height-pic2height)*vanishY)/height,pic2Width,pic2height ); image(a,((width-pic1Width)*vanishX)/width,((height-pic1height)*vanishY)/height,pic1Width,pic1height ); }