Add translate method to Shape class.