Abstract base class for IColorRamp implementations.
abstract class
|
ColorRampBase
|
implements
|
IColorRamp
|
||
extends
|
SerializableBase
|
||||
base of
|
ColorRamp
|
Returns the configuration value that describes this object.
public
abstract
method
|
ToConfig
()
|
||
type
|
ConfigValue
|
||
returns
|
|
The configuration value. | |
implements
|
IConfigurable.ToConfig
|
Remarks:
All configurable objects need to implement this interface. For simple types, it is preferable to delegate to ToValue.
The returned value may be of type Invalid, which means that this object in its current state cannot be described with the configuration API.
Before returning the resulting configuration value, Cache must be called on it, passing this IConfigurable object as parameter.
Returns the coordinate range of this color ramp.
public
abstract
property
|
Range
{
get
}
|
||
type
|
RangeD
|
||
value
|
The coordinate range. | ||
implements
|
IColorRamp.Range
|
Returns the serial type of this object.
public
property
|
SerialType
{
get
}
|
||
type
|
ISerialTypeInfo
|
||
value
|
|
The serial type. | |
inherited
|
SerializableBase.SerialType
|
Returns the serial data version.
public
virtual
property
|
SerialVersion
{
get
}
|
||
type
|
int32
|
||
value
|
|
The serial data version tag. | |
inherited
|
SerializableBase.SerialVersion
|
Remarks:
An ISerializable implementation is required to support all versions up to the one returned by SerialVersion.
See also:
ISerializable.SerializeInitializes the state of this object from the given data stream.
public
virtual
method
|
Deserialize
(int32 serialVersion,
ISerializer data)
|
||
type
|
ISerializable
|
||
params
|
serialVersion
|
[>=1]
|
The serial data version. |
data
|
[not-null]
|
The serial data stream. | |
returns
|
|
The
deserialized
object.
This
will
typically
be
this ,
but
in
some
circumstances,
another
instance
may
be
returned
(e.g.
singletons).
|
|
inherited
|
SerializableBase.Deserialize
|
Remarks:
The Deserialize method will be called immediately after the object has been instantiated via its default constructor.
The provided serialVersion number is guaranteed to be equal to or less than the SerialVersion returned by this object (i.e. ISerializable object must provide backwards compatibility).
See also:
ISerializable.SerializeCompares this object with the given one.
[Pure]
|
||||
public
abstract
method
|
Equals
(IColorRamp other)
|
|||
type
|
bool
|
|||
params
|
other
|
The object to compare to. | ||
returns
|
true
if
this
object
is
equal
to
other,
false
if
not.
|
|||
implements
|
IEquatable.Equals
|
Returns an interpolated color on this color ramp.
public
abstract
method
|
Get
(float64 x)
|
||
type
|
int64
|
||
params
|
x
|
Coordinate of color to return. | |
returns
|
The color value. | ||
implements
|
IColorRamp.Get
|
Returns a color index on this color ramp.
public
abstract
method
|
Index
(float64 x)
|
||
type
|
float64
|
||
params
|
x
|
Coordinate of color to return. | |
returns
|
The color index. | ||
implements
|
IColorRamp.Index
|
Modulates the colors in this color ramp.
public
virtual
method
|
Modulate
(int64 color)
|
||
type
|
IColorRamp
|
||
params
|
color
|
The color to modulate with. | |
returns
|
|
The resulting color ramp. | |
implements
|
IColorRamp.Modulate
|
Serializes the current state of this object to the given data stream.
public
virtual
method
|
Serialize
(ISerializer data)
|
||
params
|
data
|
[not-null]
|
The serial data stream. |
inherited
|
SerializableBase.Serialize
|
See also:
ISerializable.DeserializeTransforms the input coordinate of this color ramp.
public
virtual
method
|
Transform
(float64 offset,
float64 scale = 1)
|
||
type
|
IColorRamp
|
||
params
|
offset
|
Offset value to add to scaled input X-coordinates. | |
scale
|
Scale
factor
to
apply
to
input
X-coordinates.
Defaults
to
1 .
|
||
returns
|
|
The resulting color ramp. | |
implements
|
IColorRamp.Transform
|
Remarks:
Input X-coordinates are transformed as follows:
xOut = offset + scale * xIn xIn = (xOut - offset) / scale = xOut / scale - offset / scalewhere
xIn
refers
to
the
coordinate
passed
to
the
returned
color
ramp
and
xOut
is
the
coordinate
that
is
passed
to
this
color
ramp.
Creates a new instance of ColorRampBase.
protected
constructor
|
ColorRampBase
(ISerialTypeInfo serialType)
|
||
params
|
serialType
|
[not-null]
|
The serial ID. |