
##########
Background
##########

.. js:class:: cee.Background

   Background configuration
   
   The class defines the view background settings. The background can either be single colored or be a gradient between a top and a bottom color. Image backgrounds are also supported, in which case the image will be rendered on top of the specified background color.
   
   You can access the background object from the view with the :js:func:`View.background <cee.View.background>` property.
   
   
   Index
   =====
   
   .. rubric:: Accessors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~cee.Background.bottomColor`
   * :js:func:`~cee.Background.image`
   * :js:func:`~cee.Background.topColor`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~cee.Background.setImage`
   * :js:meth:`~cee.Background.setSingleColor`
   * :js:meth:`~cee.Background.setTopAndBottomColor`
   
   



.. rst-class:: kind-group kind-accessors

.. rubric:: Accessors
   :class: kind-group-title


.. js:method:: cee.Background.bottomColor

      .. rst-class:: sig-pretty-signature
      
         | *get* bottomColor(): :js:class:`Color4 <cee.Color4>`
      
      The bottom color of the background.
      
      If background is single color, the topColor and bottomColor properties are equal
      
      **Returns**\ : :js:class:`Color4 <cee.Color4>`
      



.. js:method:: cee.Background.image

      .. rst-class:: sig-pretty-signature
      
         | *get* image(): :js:class:`Texture <cee.Texture>`
      
      If image background is in use it returns the image uses as a background.
      
      **Returns**\ : :js:class:`Texture <cee.Texture>`
      



.. js:method:: cee.Background.topColor

      .. rst-class:: sig-pretty-signature
      
         | *get* topColor(): :js:class:`Color4 <cee.Color4>`
      
      The top color of the background.
      
      If background is single color, the topColor and bottomColor properties are equal
      
      **Returns**\ : :js:class:`Color4 <cee.Color4>`
      



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: cee.Background.setImage

      .. rst-class:: sig-pretty-signature
      
         | setImage(**texture**\ : :js:class:`Texture <cee.Texture>`\ ): *void*
      
      Use the given image as the background of the view
      
      Specify null to clear any previously specified background image.
      
      **Parameters**
      
      
         **texture**\ : :js:class:`Texture <cee.Texture>`
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.Background.setSingleColor

      .. rst-class:: sig-pretty-signature
      
         | setSingleColor(**color**\ : :js:class:`Color4Like <cee.Color4Like>`\ ): *void*
      
      Sets the background color to the given color (single color)
      
      The background of the view will be cleared with the given color, and no graded background will be rendered. This is the default mode.
      
      **Parameters**
      
      
         **color**\ : :js:class:`Color4Like <cee.Color4Like>`
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.Background.setTopAndBottomColor

      .. rst-class:: sig-pretty-signature
      
         | setTopAndBottomColor(**topColor**\ : :js:class:`Color4Like <cee.Color4Like>`\ , **bottomColor**\ : :js:class:`Color4Like <cee.Color4Like>`\ ): *void*
      
      Sets the background color to a gradient defined by a top color and a bottom color
      
      **Parameters**
      
      
         **topColor**\ : :js:class:`Color4Like <cee.Color4Like>`
      
         **bottomColor**\ : :js:class:`Color4Like <cee.Color4Like>`
      
      
      **Returns**\ : *void*
      




