public class LinearColormap extends java.lang.Object implements Colormap, java.io.Serializable
| Constructor and Description |
|---|
LinearColormap()
Construct a color map with a grayscale ramp from black to white
|
LinearColormap(int color1,
int color2)
Construct a linear color map
|
| Modifier and Type | Method and Description |
|---|---|
int |
getColor(float v)
Convert a value in the range 0..1 to an RGB color.
|
int |
getColor1()
Get the first color
|
int |
getColor2()
Get the second color
|
void |
setColor1(int color1)
Set the first color
|
void |
setColor2(int color2)
Set the second color
|
public LinearColormap()
public LinearColormap(int color1,
int color2)
color1 - the color corresponding to value 0 in the colormapcolor2 - the color corresponding to value 1 in the colormappublic void setColor1(int color1)
color1 - the color corresponding to value 0 in the colormappublic int getColor1()
public void setColor2(int color2)
color2 - the color corresponding to value 1 in the colormappublic int getColor2()