Class GradientMapper

  • All Implemented Interfaces:
    Map<Double,​Color>, ContinuousColorMapper

    public class GradientMapper
    extends Object
    implements ContinuousColorMapper, Map<Double,​Color>
    Maps a set of real values onto a gradient. The real line is partitioned into segments [a,b). The endpoint of each segment is labeled with a color. Colors are linearly interpolated between finite endpoints. Endpoints implicitly exist for Double.NEGATIVE_INFINITY and Double.POSITIVE_INFINITY, representing default colors. Thus any point in the segment [-Inf,a) is labeled with the negInf color, and any point in [b,Inf] is labeled with the posInf color. If no endpoints are present, the posInf color is used as default. Common gradients are predefined an may be instantiated through GradientMapper.getGradientMapper().
    Spencer Bliven