public static void setBounds(int height, int x, int width, int y) {
		if (x < 0) {
			x = 0;
		}
		if (y < 0) {
			y = 0;
		}
		if (width > Graphics2D.width) {
			width = Graphics2D.width;
		}
		if (height > Graphics2D.height) {
			height = Graphics2D.height;
		}
		Graphics2D.topX = x;
		Graphics2D.topY = y;
		Graphics2D.bottomX = width;
		Graphics2D.bottomY = height;
		Graphics2D.endX = Graphics2D.bottomX;
		Graphics2D.middleX = Graphics2D.bottomX / 2;
		Graphics2D.middleY = Graphics2D.bottomY / 2;
	}