class OELogarithmicColorGradient : public OEColorGradientBase

The OELogarithmicColorGradient class interpolates between colors that are defined by using the OEColorStop class. The OELogarithmicColorGradient.TransformValue method defines the transformation that is performed before returning an interpolated color associated with a floating point value. The Figure: Example of linear and logarithmic color gradients illustrates the difference between a linear and a logarithmic colors gradients constructed with the same color stops.


Example of linear and logarithmic color gradients generated with (-4.0, OERed), (0.0, OEWhite) and (+4.0, OEBlue) color stops

This class represents OELogarithmicColorGradient.

The following methods are publicly inherited from OEColorGradientBase:

operator= GetMaxColor GetStops
AddStop GetMaxValue IsEmpty
DeleteStop GetMinColor NumStops
GetColorAt GetMinValue TransformValue



Default constructor that creates an “empty” color gradient.


An “empty” color gradient always returns the OEBlack color, when calling the OEColorGradientBase.GetColorAt, the OEColorGradientBase.GetMinColor or the OEColorGradientBase.GetMaxColor methods.

OELogarithmicColorGradient(const OEColorStop &oneStop)

Creates an OELogarithmicColorGradient object with one color stop. An OELogarithmicColorGradient object that has only one color stop will always return that color when calling the OEColorGradientBase.GetColorAt method.

OELogarithmicColorGradient(const OEColorStop &bgnStop,
                           const OEColorStop &endStop)

Creates an OELogarithmicColorGradient object with interpolation range between the two specified color stops.

OELogarithmicColorGradient(const OELogarithmicColorGradient &rhs)

Copy constructor.


OELogarithmicColorGradient &operator=(const OELogarithmicColorGradient &rhs)

Assignment operator.


double TransformValue(double value) const

Performs a \(f(x) = -log(-x+1.0)\) transformation when x is less than 0.0 and \(f(x) = log(x+1.0)\) transformation when x is greater than 0.0. This method is called by OEColorGradientBase.GetColorAt method to transform a value before performing color interpolation.