} else {  one2oneImage.setRGB(tile.x - mapX, tile.y - mapY, 0xff000000);
    private void refresh() {	/* free up memory used by the old image */	if (mapImage != null)	    mapImage.flush();	if (one2oneImage != null)	    one2oneImage.flush();	if (mapGraphics != null)	    mapGraphics.dispose();	/* generate a 1:1 map of the terrain layer */	one2oneImage =	    defaultConfiguration.createCompatibleImage(mapWidth, mapHeight);	mapImage = defaultConfiguration.createCompatibleImage(imageWidth,		imageHeight);	mapGraphics = mapImage.createGraphics();        Point tile = new Point();        for (tile.x = mapX; tile.x < mapWidth + mapX; tile.x++) {            for (tile.y = mapY; tile.y < mapHeight + mapY; tile.y++) {		int rgb;		FreerailsTile tt = w.getTile(tile.x, tile.y);		if (tt.getTrackTile() == null) {		    int typeNumber = tt.getTerrainTypeNumber();		    TerrainType terrainType = (TerrainType)w.get(KEY.TERRAIN_TYPES,			    typeNumber);		    one2oneImage.setRGB(tile.x - mapX, tile.y - mapY,			    terrainType.getRGB());		} else {		    /* black with alpha of 1 */		    one2oneImage.setRGB(tile.x - mapX,			    tile.y - mapY, 0xff000000);		}            }        }	mapGraphics.setClip(0, 0, imageWidth, imageHeight);	mapGraphics.drawImage(one2oneImage, affineTransform,  null);    }