.. role:: ts-api-decorator

##########################
ScalarMapperFilledContours
##########################

.. js:module:: cee
   :noindex:

.. container:: ts-api-section

   .. js:class:: ScalarMapperFilledContours

      Maps scalar values to texture coordinates/colors using a filled contours style color map with
      levels of uniform size.

      Configured by specifying the colors and their values with the method ``setColorsAtValues``.

      To show a color legend in the view representing this mapper, use the ``Overlay.addCustomColorLegendForScalarMapper`` 
      function.



.. container:: api-index-section

   .. rubric:: Constructors

   .. rst-class:: api-index-list-item api-kind-constructor api-parent-kind-class

   * :js:meth:`~cee.ScalarMapperFilledContours.constructor`



.. container:: api-index-section

   .. rubric:: Accessors

   .. rst-class:: api-index-list-item api-kind-accessor api-parent-kind-class

   * :js:attr:`~cee.ScalarMapperFilledContours.aboveRangeColor`
   * :js:attr:`~cee.ScalarMapperFilledContours.belowRangeColor`
   * :js:attr:`~cee.ScalarMapperFilledContours.rangeMaximum`
   * :js:attr:`~cee.ScalarMapperFilledContours.rangeMinimum`
   * :js:attr:`~cee.ScalarMapperFilledContours.undefinedColor`



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :js:meth:`~cee.ScalarMapperFilledContours.createTexture`
   * :js:meth:`~cee.ScalarMapperFilledContours.domainValue`
   * :js:meth:`~cee.ScalarMapperFilledContours.mapToColor`
   * :js:meth:`~cee.ScalarMapperFilledContours.mapToTextureCoordinate`
   * :js:meth:`~cee.ScalarMapperFilledContours.normalizedValue`
   * :js:meth:`~cee.ScalarMapperFilledContours.setColorsAtValues`
   * :js:meth:`~cee.ScalarMapperFilledContours.tickValuesHint`
   * :js:meth:`~cee.ScalarMapperFilledContours.version`





------------

Constructors
============

.. container:: ts-api-section

   .. js:function:: ScalarMapperFilledContours.constructor()



      :rtype: ScalarMapperFilledContours



Accessors
=========

.. container:: ts-api-section

   .. js:function:: ScalarMapperFilledContours.aboveRangeColor()



      The color to assign values that are above the given range.

      Default is undefined, which indicates that the last color in the color array will be used.


      :rtype: Color4Like

   .. js:function:: ScalarMapperFilledContours.aboveRangeColor( color)

      :param color: None
      :type color: Color4Like


      :rtype: void



.. container:: ts-api-section

   .. js:function:: ScalarMapperFilledContours.belowRangeColor()



      The color to assign values that are below the given range.

      Default is null, which indicates that the first color in the color array will be used.


      :rtype: Color4Like

   .. js:function:: ScalarMapperFilledContours.belowRangeColor( color)

      :param color: None
      :type color: Color4Like


      :rtype: void



.. container:: ts-api-section

   .. js:function:: ScalarMapperFilledContours.rangeMaximum()



      The maximum range of the mapper


      :rtype: number



.. container:: ts-api-section

   .. js:function:: ScalarMapperFilledContours.rangeMinimum()



      The minimum range of the mapper


      :rtype: number



.. container:: ts-api-section

   .. js:function:: ScalarMapperFilledContours.undefinedColor()



      The color used for undefined values.


      :rtype: Color4Like

   .. js:function:: ScalarMapperFilledContours.undefinedColor( color)

      :param color: None
      :type color: Color4Like


      :rtype: void



Methods
=======

.. rst-class:: ts-api-section

createTexture
-------------

.. js:method:: ScalarMapperFilledContours.createTexture()



   Creates and returns texture for this scalar mapper


   :rtype: Texture

.. rst-class:: ts-api-section

domainValue
-----------

.. js:method:: ScalarMapperFilledContours.domainValue( normalizedPosition)

   :param normalizedPosition: None
   :type normalizedPosition: number


   Map normalized value (0 -> 1) into a domain value (range_min -> range_max)


   :rtype: number

.. rst-class:: ts-api-section

mapToColor
----------

.. js:method:: ScalarMapperFilledContours.mapToColor( scalarValue)

   :param scalarValue: None
   :type scalarValue: number


   Maps the given domain value to a color using the current range and color array.


   :rtype: Color4Like

.. rst-class:: ts-api-section

mapToTextureCoordinate
----------------------

.. js:method:: ScalarMapperFilledContours.mapToTextureCoordinate( scalarValue)

   :param scalarValue: None
   :type scalarValue: number


   Maps the given domain value to a color using the current range and color array.


   :rtype: Vec2Like

.. rst-class:: ts-api-section

normalizedValue
---------------

.. js:method:: ScalarMapperFilledContours.normalizedValue( domainValue)

   :param domainValue: None
   :type domainValue: number


   Map domain value (range_min -> range_max) into a normalized value (0 -> 1)


   :rtype: number

.. rst-class:: ts-api-section

setColorsAtValues
-----------------

.. js:method:: ScalarMapperFilledContours.setColorsAtValues( colorArr, valueArr)

   :param colorArr: None
   :type colorArr: ArrayLike <Color4Like>
   :param valueArr: None
   :type valueArr: ArrayLike <number>


   Sets the scalar mapper level colors from an array of colors at the given values


   :rtype: void

.. rst-class:: ts-api-section

tickValuesHint
--------------

.. js:method:: ScalarMapperFilledContours.tickValuesHint()



   Returns the suggest tick values (the values of the color changes)


   :rtype: ArrayLike <number>

.. rst-class:: ts-api-section

version
-------

.. js:method:: ScalarMapperFilledContours.version()



   Returns the version of the scalar mapper. Version is increased whenever the mapper is changed.


   :rtype: number

