com.jhlabs.image
Class SplineColormap
- Cloneable, Colormap
public class SplineColormap
A Colormap implemented using Catmull-Rom colour splines. The map has a variable number
of knots with a minimum of four. The first and last knots give the tangent at the end
of the spline, and colours are interpolated from the second to the second-last knots.
SplineColormap
public SplineColormap()
Construct a SplineColormap.
SplineColormap
public SplineColormap(int[] xKnots,
int[] yKnots) Construct a SplineColormap.
xKnots - the knot positionsyKnots - the knot colors
addKnot
public void addKnot(int x,
int color) Add a new knot.
x - the knot positioncolor - the color
getKnot
public int getKnot(int n)
Get a knot color.
removeKnot
public void removeKnot(int n)
Remove a knot.
setKnot
public void setKnot(int n,
int color) Set a knot color.
n - the knot indexcolor - the color
setKnotPosition
public void setKnotPosition(int n,
int x) Set a knot position.
n - the knot indexx - the knot position