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
See also
OEColorStop class
OEExponentColorGradient class
The following methods are publicly inherited from OEColorGradientBase:
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.
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.