def set_rotation(rotation)
      if rotation == 270
        rotation = 255
      elsif rotation >= -90 || rotation <= 90
        rotation = -rotation + 90 if rotation < 0
      else
        raise "Rotation #{rotation} outside range: -90 <= angle <= 90"
        rotation = 0
      end

      @rotation = rotation
    end
def set_rotation(rotation)
      if rotation == 270
        rotation = 255
      elsif rotation >= -90 || rotation <= 90
        rotation = -rotation + 90 if rotation < 0
      else
        raise "Rotation #{rotation} outside range: -90 <= angle <= 90"
        rotation = 0
      end

      @rotation = rotation
    end
Set the rotation angle of the text. An alignment property.