def resize(self, width, height): self.scale(iff(width, sub, self.position.width), iff(height, sub, self.position.height))
def scale(self, dw, dh): self.resize(iff(dw, add, self.position.width), iff(dh, add, self.position.height))
def move(self, x, y): self.shift(iff(x, sub, self.position.x), iff(y, sub, self.position.y))
def shift(self, dx, dy): self.move(iff(dx, add, self.position.x), iff(dy, add, self.position.y))