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
Example of linear color gradient with (-1.0, OERed), (0.0, OEWhite) and (+1.0, OEBlue) color stops
See also
OEColorStop class
OEExponentColorGradient class
The following methods are publicly inherited from OEColorGradientBase:
Constructors
OELinearColorGradient() -> 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(oneStop: OEColorStop) -> OELinearColorGradient
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(bgnStop: OEColorStop, endStop: OEColorStop) -> OELinearColorGradient
Creates an OELinearColorGradient object with interpolation range between the two specified color stops.
OELinearColorGradient(rhs: OELinearColorGradient) -> OELinearColorGradient
Copy constructor.
TransformValue
TransformValue(value: float) -> float
Performs a \(f(x) = x\) linear transformation.
This method is called by OEColorGradientBase.GetColorAt
method to transform a value before performing color interpolation.