Add loc= method to Shape class.