Skip to content

Commit 7f50cb1

Browse files
committed
Address 4575 missing "contains" method in IRect
1 parent 722b67a commit 7f50cb1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12723,6 +12723,10 @@ def bottom_right(self):
1272312723
def height(self):
1272412724
return max(0, self.y1 - self.y0)
1272512725

12726+
def contains(self, x):
12727+
"""Check if x is in the rectangle."""
12728+
return self.__contains__(x)
12729+
1272612730
def include_point(self, p):
1272712731
"""Extend rectangle to include point p."""
1272812732
rect = self.rect.include_point(p)

0 commit comments

Comments
 (0)