/********************************************************************
Class ImageCanvas
 --holds image to be placed on game window

Authors: Kristi Garner, Mary Garland    
CS406: Java and Internet Programming
*******************************************************************/
import java.awt.*;

class ImageCanvas extends Canvas {
	private Image myimage;
	private int a;
	
	public ImageCanvas (Image image, int a) {
		myimage = image;
		this.a = a;
	//	Util.waitForImage(this, image);
		if (a == 1)
			resize(100,200);
	//	resize(myimage.getWidth(this), myimage.getHeight(this));
		else if (a == 2)
			resize (144,288);
		else if( a == 3)
			resize(288,173);
	}
	
	public void paint(Graphics g) {
		g.drawImage(myimage, 0, 0, this);
	}
	public void update(Graphics g) {
		paint(g);
	}
}
