public class ArrayColormap extends java.lang.Object implements Colormap, java.lang.Cloneable, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
map
The array of colors.
|
| Constructor and Description |
|---|
ArrayColormap()
Construct an all-black colormap
|
ArrayColormap(int[] map)
Construct a colormap with the given map
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
int |
getColor(float v)
Convert a value in the range 0..1 to an RGB color.
|
int[] |
getMap() |
void |
setColor(int index,
int color) |
void |
setColorInterpolated(int index,
int firstIndex,
int lastIndex,
int color)
Set the color at "index" to "color".
|
void |
setColorRange(int firstIndex,
int lastIndex,
int color) |
void |
setColorRange(int firstIndex,
int lastIndex,
int color1,
int color2) |
void |
setMap(int[] map) |
public ArrayColormap()
public ArrayColormap(int[] map)
map - the array of ARGB colorspublic java.lang.Object clone()
clone in class java.lang.Objectpublic int getColor(float v)
public int[] getMap()
public void setColor(int index,
int color)
public void setColorInterpolated(int index,
int firstIndex,
int lastIndex,
int color)
public void setColorRange(int firstIndex,
int lastIndex,
int color)
public void setColorRange(int firstIndex,
int lastIndex,
int color1,
int color2)
public void setMap(int[] map)