org.opensha.commons.util.cpt
Class LinearBlender

java.lang.Object
  extended by org.opensha.commons.util.cpt.LinearBlender
All Implemented Interfaces:
Serializable, Blender

public class LinearBlender
extends Object
implements Blender

See Also:
Serialized Form

Constructor Summary
LinearBlender()
          Constructs a blender which interpolates linearly between the smallColor and BigColor
 
Method Summary
 Color blend(Color small, Color big, float bias)
           
 int[] blend(int smallR, int smallG, int smallB, int bigR, int bigG, int bigB, float bias)
          Linearly interpolates a new color between smallColor and bigColor with a bias in range[0,1] For example bias = .5 means a value between half of smallColor and half of bigColor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearBlender

public LinearBlender()
Constructs a blender which interpolates linearly between the smallColor and BigColor

Method Detail

blend

public int[] blend(int smallR,
                   int smallG,
                   int smallB,
                   int bigR,
                   int bigG,
                   int bigB,
                   float bias)
Linearly interpolates a new color between smallColor and bigColor with a bias in range[0,1] For example bias = .5 means a value between half of smallColor and half of bigColor


blend

public Color blend(Color small,
                   Color big,
                   float bias)
Specified by:
blend in interface Blender