|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jhlabs.image.LinearColormap
public class LinearColormap
A colormap which interpolates linearly between two colors.
Constructor Summary | |
---|---|
LinearColormap()
Construct a color map with a grayscale ramp from black to white |
|
LinearColormap(int color1,
int color2)
Construct a linear color map |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 colormapMethod Detail |
---|
public 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()
public int getColor(float v)
getColor
in interface Colormap
v
- a value in the range 0..1
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |