OELinearColorGradient

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

../../_images/OELinearColorGradient.png

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

Constructors

OELinearColorGradient()

Default constructor that creates an “empty” color gradient.

Note

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.

operator=

OELinearColorGradient &operator=(const OELinearColorGradient &rhs)

Assignment operator.

TransformValue

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.