Skip to content
  • ColorStop
  • class Esri::ArcGISRuntime::ColorStop

    A color and the position the color will be placed on a color ramp. More...

    Header: #include <ColorStop.h>
    Since: Esri::ArcGISRuntime 300.0
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    ColorStop(const QColor &color, double position, QObject *parent = nullptr)
    virtual ~ColorStop() override
    QColor color() const
    double position() const

    Detailed Description

    This object is used for creating custom color ramps.

    See also ColorRamp::createFromColorStops(const QList<Esri::ArcGISRuntime::ColorStop*>&, int, QObject*).

    Member Function Documentation

    ColorStop::ColorStop(const QColor &color, double position, QObject *parent = nullptr)

    Creates a ColorStop

    • color - The color of this ColorStop.
    • position - The position of this ColorStop. The value must be in the interval [0.0, 1.0].
    • parent - The optional parent QObject.

    [override virtual noexcept] ColorStop::~ColorStop()

    Destructor.

    QColor ColorStop::color() const

    Returns the shaded color of a pixel with a value at position on the color ramp.

    double ColorStop::position() const

    Returns the position the color will be placed on a color ramp. The value must be in the interval [0.0, 1.0].

    The absolute value for the position is calculated using the minimum and maximum values from MinMaxStretchParameters, using

    • minValue + (1.0 - position) * maxValue.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.