(self, x)
| 14553 | return Rect(self.x0 + p[0], self.y0 + p[1], self.x1 + p[2], self.y1 + p[3]) |
| 14554 | |
| 14555 | def __and__(self, x): |
| 14556 | if not hasattr(x, "__len__"): |
| 14557 | raise ValueError("bad operand 2") |
| 14558 | |
| 14559 | r1 = Rect(x) |
| 14560 | r = Rect(self) |
| 14561 | return r.intersect(r1) |
| 14562 | |
| 14563 | def __bool__(self): |
| 14564 | return not (max(self) == min(self) == 0) |