'Set the Format rotation property.
Args:
rotation: Rotation angle. No default.
Returns:
Nothing.'

def set_rotation(self, rotation):

    rotation = int(rotation)
    if (rotation == 270):
        rotation = 255
    elif ((-90) <= rotation <= 90):
        if (rotation < 0):
            rotation = ((- rotation) + 90)
    else:
        raise Exception('Rotation    rotation    outside    range:    -90    <=    angle    <=    90')
    self.rotation = rotation
