@Immutable public final class EvaluatorColor extends java.lang.Object implements Evaluator<java.awt.Color>
Color
.Constructor and Description |
---|
EvaluatorColor() |
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
evaluate(java.awt.Color v0,
java.awt.Color v1,
double fraction)
Evaluates between two boundary values.
|
java.lang.Class<java.awt.Color> |
getEvaluatorClass()
Gets the class that the evaluator provides an implementation.
|
@RegionEffects(value="reads Instance, v0:Instance, v1:Instance") public java.awt.Color evaluate(java.awt.Color v0, java.awt.Color v1, double fraction)
Evaluator
v = v0 + (v1 - v0) * fractionImplementations of
Evaluator
will need to override this method and
do something similar for their own types.
Note that this mechanism may be used to create non-linear interpolators for
specific value types, although it may be simpler to just use the
linear/parametric interpolation technique here and perform non-linear
interpolation through a custom Interpolator
rather than perform
custom calculations in this method. The point of this class is to allow
calculations with new/unknown types, not to provide another mechanism for
non-linear interpolation.
@RegionEffects(value="none") public java.lang.Class<java.awt.Color> getEvaluatorClass()
Evaluator
getEvaluatorClass
in interface Evaluator<java.awt.Color>