public void setZoom(int zoom) {
		this.zoom = zoom;
		offsetPaint=createImage((256*zoom)+1, (256*zoom)+1);
		image = (BufferedImage) createImage(cache.getWidth()*zoom, cache.getHeight()*zoom);
		Graphics g = image.getGraphics();
		g.drawImage(cache, 0, 0, image.getWidth(), image.getHeight(), null);
		toRefresh=true;
		repaint();
	}