Пример #1
0
 def union_ip(self, rect):
     """
     Change this rect to represent the union of rect and this rect.
     """
     r = Rectangle.union(self, rect)
     self.setLocation(r.x, r.y)
     self.setSize(r.width, r.height)
     return None
Пример #2
0
 def unionall(self, rect_list):
     """
     Return Rect representing the union of rect list and this rect.
     """
     r = self
     for rect in rect_list:
         r = Rectangle.union(r, rect)
     return Rect(r.x, r.y, r.width, r.height)
Пример #3
0
 def unionall_ip(self, rect_list):
     """
     Change this rect to represent the union of rect list and this rect.
     """
     r = self
     for rect in rect_list:
         r = Rectangle.union(r, rect)
     self.setLocation(r.x, r.y)
     self.setSize(r.width, r.height)
     return None
Пример #4
0
 def union(self, rect):
     """
     Return Rect representing the union of rect and this rect.
     """
     r = Rectangle.union(self, rect)
     return Rect(r.x, r.y, r.width, r.height)