Check if rectangle contains points or other rectangles.