.. oe:namespace:: OEGrapheme



.. meta::
   :keywords: OEColorGradientLabel, ColorGradientLabel


.. _OEGrapheme_OEColorGradientLabel:

.. oe:class:: OEColorGradientLabel

   .. oe:api::

      class OEColorGradientLabel

   The :ref:`OEColorGradientLabel <OEGrapheme_OEColorGradientLabel>` class stores a value
   (double) and label (string) pair that is used by the
   :ref:`OEColorGradientDisplayOptions <OEGrapheme_OEColorGradientDisplayOptions>` class to render
   user defined labels into the color gradients.

   .. _figure_ OEColorGradientLabel:

   .. figure:: ../images/OEColorGradientDisplayOptions_AddLabel.*
      :align:  center

      **Example of depicting labels above the color gradient**

   .. seealso::

      * :oe:meth:`OEGrapheme::OEColorGradientDisplayOptions::AddLabel` method


   .. oe:method:: Constructors

      .. oe:language:: c++ java csharp

         .. oe:api::

            OEColorGradientLabel(double value, const std::string& label)

      .. oe:language:: python

         .. oe:api:: python

            OEColorGradientLabel(value: float, label: str) -> OEColorGradientLabel

      *value*
        Defines the position of the string being rendered.

      *label*
        Defines the string being rendered.

      Constructor.

      .. oe:language:: c++ java csharp

         .. oe:api::

            OEColorGradientLabel(const OEColorGradientLabel& rhs)

      .. oe:language:: python

         .. oe:api:: python

            OEColorGradientLabel(arg2: OEColorGradientLabel) -> OEColorGradientLabel

      Copy constructor.


   .. oe:method:: operator=
      :language: c++

      .. oe:api::

         OEColorGradientLabel &operator=(const OEColorGradientLabel &rhs)

      Assignment operator.


   .. oe:method:: GetLabel

      .. oe:language:: c++ java csharp

         .. oe:api::

            std::string GetLabel() const

      .. oe:language:: python

         .. oe:api:: python

            GetLabel() -> str

      Returns the string stored in the :ref:`OEColorGradientLabel <OEGrapheme_OEColorGradientLabel>`
      object that will be rendered into the color gradient.


   .. oe:method:: GetValue

      .. oe:language:: c++ java csharp

         .. oe:api::

            double GetValue() const

      .. oe:language:: python

         .. oe:api:: python

            GetValue() -> float

      Returns the value stored in the :ref:`OEColorGradientLabel <OEGrapheme_OEColorGradientLabel>`
      object that defined the position of the associated label
      on the color gradient.
