类 ArrayColormap
- java.lang.Object
-
- org.meteoinfo.image.filter.ArrayColormap
-
- 所有已实现的接口:
java.lang.Cloneable,Colormap
- 直接已知子类:
Gradient,SplineColormap
public class ArrayColormap extends java.lang.Object implements Colormap, java.lang.Cloneable
A colormap implemented with an array of colors. This corresponds to the IndexColorModel class.
-
-
字段概要
字段 修饰符和类型 字段 说明 protected int[]mapThe array of colors.
-
构造器概要
构造器 构造器 说明 ArrayColormap()Construct an all-black colormap.ArrayColormap(int[] map)Construct a colormap with the given map.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 java.lang.Objectclone()intgetColor(float v)Convert a value in the range 0..1 to an RGB color.int[]getMap()Get the array of colors for the colormap.voidsetColor(int index, int color)Set one element of the colormap to a given color.voidsetColorInterpolated(int index, int firstIndex, int lastIndex, int color)Set the color at "index" to "color".Entries are interpolated linearly from the existing entries at "firstIndex" and "lastIndex" to the new entry.voidsetColorRange(int firstIndex, int lastIndex, int color)Set a range of the colormap to a single color.voidsetColorRange(int firstIndex, int lastIndex, int color1, int color2)Set a range of the colormap, interpolating between two colors.voidsetMap(int[] map)Set the array of colors for the colormap.
-
-
-
方法详细资料
-
clone
public java.lang.Object clone()
- 覆盖:
clone在类中java.lang.Object
-
setMap
public void setMap(int[] map)
Set the array of colors for the colormap.- 参数:
map- the colors- 另请参阅:
getMap()
-
getMap
public int[] getMap()
Get the array of colors for the colormap.- 返回:
- the colors
- 另请参阅:
setMap(int[])
-
getColor
public int getColor(float v)
Convert a value in the range 0..1 to an RGB color.- 指定者:
getColor在接口中Colormap- 参数:
v- a value in the range 0..1- 返回:
- an RGB color
- 另请参阅:
setColor(int, int)
-
setColorInterpolated
public void setColorInterpolated(int index, int firstIndex, int lastIndex, int color)Set the color at "index" to "color".Entries are interpolated linearly from the existing entries at "firstIndex" and "lastIndex" to the new entry.- 参数:
index- The indexfirstIndex- the position of the first color from which to interpolatelastIndex- the position of the second color from which to interpolatecolor- the color to set
-
setColorRange
public void setColorRange(int firstIndex, int lastIndex, int color1, int color2)Set a range of the colormap, interpolating between two colors.- 参数:
firstIndex- the position of the first colorlastIndex- the position of the second colorcolor1- the first colorcolor2- the second color
-
setColorRange
public void setColorRange(int firstIndex, int lastIndex, int color)Set a range of the colormap to a single color.- 参数:
firstIndex- the position of the first colorlastIndex- the position of the second colorcolor- the color
-
setColor
public void setColor(int index, int color)Set one element of the colormap to a given color.- 参数:
index- the position of the colorcolor- the color- 另请参阅:
getColor(float)
-
-