@Override
	public void drawTile(int x, int y, BufferedImage tile, TileFlip flippstate, 
			float alpha) {
		if (this.alpha != alpha) {
			setAlpha(alpha);
		}
		
		AffineTransform xform;
		int w = tile.getWidth();
		int h = tile.getHeight();
		
		switch (flippstate) {

		case H:
			xform = new AffineTransform(-1, 0, 0,  1, x+w, y  ); 
			break;
		case V:
			xform = new AffineTransform( 1, 0, 0, -1, x  , y+h);
			break;
		case D:
			xform = new AffineTransform( 1, 0, 0, -1, x  , y  ); 
			xform.quadrantRotate(3); break;
		case HV:
			xform = new AffineTransform(-1, 0, 0, -1, x+w, y+h); 
			break;
		case VD:
			xform = new AffineTransform(-1, 0, 0, -1, x  , y+h); 
			xform.quadrantRotate(1); break;
		case HD:
			xform = new AffineTransform(-1, 0, 0, -1, x+w, y  ); 
			xform.quadrantRotate(3); break;
		case HVD:
			xform = new AffineTransform( 1, 0, 0, -1, x+w, y+h); 
			xform.quadrantRotate(1); break;
		default: //case NONE:
			xform = new AffineTransform( 1, 0, 0,  1, x  , y  );
			break;
		}
		
		g.drawImage(tile, xform, null);
	}