class OELinearColorGradient : public OEColorGradientBase

The OELinearColorGradient class interpolates between colors that are defined by using the OEColorStop class. See Figure Example of linear color gradient


Example of linear color gradient with (-1.0, OERed), (0.0, OEWhite) and (+1.0, OEBlue) color stops

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.

OELinearColorGradient(const OEColorStop &oneStop)

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

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

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

OELinearColorGradient(const OELinearColorGradient &rhs)

Copy constructor.


OELinearColorGradient &operator=(const OELinearColorGradient &rhs)

Assignment operator.


double TransformValue(double value) const

Performs a \(f(x) = x\) linear transformation. This method is called by OEColorGradientBase::GetColorAt method to transform a value before performing color interpolation.