    def __init__(self, height, width, emitter, intensity, spot, colours,
                 bg=False):
        """
        :param height: Height of the box to contain the flames.
        :param width: Width of the box to contain the flames.
        :param emitter: Heat source for the flames.  Any non-whitespace
            character is treated as part of the heat source.
        :param intensity: The strength of the flames.  The bigger the number,
            the hotter the fire.  0 <= intensity <= 1.0.
        :param spot: Heat of each spot source.  Must be an integer > 0.
        :param colours: Number of colours the screen supports.
        :param bg: (Optional) Whether to render background colours only.
        """
        super().__init__(height, width)
        self._emitter = emitter
        self._intensity = intensity
        self._spot_heat = spot
        self._count = len([c for c in emitter if c not in " \n"])
        line = [0 for _ in range(self._canvas.width)]
        self._buffer = [copy.deepcopy(line) for _ in range(self._canvas.width * 2)]
        self._colours = self._COLOURS_256 if colours >= 256 else \
            self._COLOURS_16
        self._bg_too = bg

        # Figure out offset of emitter to centre at the bottom of the buffer
        e_width = 0
        e_height = 0
        for line in self._emitter.split("\n"):
            e_width = max(e_width, len(line))
            e_height += 1
        self._x = (width - e_width) // 2
        self._y = height - e_height
:param height: Height of the box to contain the flames.
:param width: Width of the box to contain the flames.
:param emitter: Heat source for the flames.  Any non-whitespace
character is treated as part of the heat source.
:param intensity: The strength of the flames.  The bigger the number,
the hotter the fire.  0 <= intensity <= 1.0.
:param spot: Heat of each spot source.  Must be an integer > 0.
:param colours: Number of colours the screen supports.
:param bg: (Optional) Whether to render background colours only.
asciimatics/renderers/fire.py