public static Dimension sanitizeSize(Dimension size) {
		if (size.width < 0) {
			size.width = 0;
		} else if (size.width > MAXIMUM_SIZE) {
			size.width = MAXIMUM_SIZE;
		}
		if (size.height < 0) {
			size.height = 0;
		} else if (size.height > MAXIMUM_SIZE) {
			size.height = MAXIMUM_SIZE;
		}
		return size;
	}