Added the rubber banding function for region select.