Added ability to resize windows from all sides and corners.
This commit is contained in:
parent
0785a228aa
commit
22e86812e8
3 changed files with 145 additions and 20 deletions
|
|
@ -81,6 +81,11 @@ class Position(StructureBase):
|
|||
other = Position.from_value(other)
|
||||
return Position(self.x-other.x, self.y-other.y)
|
||||
|
||||
def __mul__(self, value):
|
||||
if isinstance(value, (int, long, float)):
|
||||
return Position(self.x*value, self.y*value)
|
||||
raise Exception("Cannot multiply position by {}.".format(value.__class__.__name__))
|
||||
|
||||
def __iter__(self):
|
||||
yield self.x
|
||||
yield self.y
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue