def METHOD_NAME(self):
    'Make sure w and h are non-negative, swapping coordinates as needed.'
    if self.w < 0:
        self.x1 += self.w
        self.w = -self.w
    if self.h < 0:
        self.y1 += self.h
        self.h = -self.h