This commit is contained in:
Will McGugan
2022-05-06 16:13:34 +01:00
parent a970193184
commit 4a2588068c
3 changed files with 23 additions and 10 deletions

View File

@@ -259,16 +259,19 @@ class Region(NamedTuple):
@property
def bottom_left(self) -> Offset:
"""Bottom left offset of the region."""
x, y, _width, height = self
return Offset(x, y + height)
@property
def top_right(self) -> Offset:
"""Top right offset of the region."""
x, y, width, _height = self
return Offset(x + width, y)
@property
def bottom_right(self) -> Offset:
"""Bottom right of the region."""
x, y, width, height = self
return Offset(x + width, y + height)