public void clip(CPRect rect) {
		if (isEmpty()) {
			return;
		}

		if (rect.isEmpty()) {
			makeEmpty();
		} else {
			left = Math.max(left, rect.left);
			top = Math.max(top, rect.top);
			right = Math.min(right, rect.right);
			bottom = Math.min(bottom, rect.bottom);
		}
	}