All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.jhlabs.image.Gradient

java.lang.Object
   |
   +----com.jhlabs.image.ArrayColormap
           |
           +----com.jhlabs.image.Gradient

public class Gradient
extends com.jhlabs.image.ArrayColormap
implements java.lang.Cloneable, java.io.Serializable
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. Each knot can be given a type of interpolation. These are:


Variable Index

 o CIRCLE_DOWN
 o CIRCLE_UP
 o CONSTANT
 o HUE_CCW
 o HUE_CW
 o knotTypes
 o LINEAR
 o numKnots
 o RGB
 o SPLINE
 o xKnots
 o yKnots

Constructor Index

 o Gradient()

Method Index

 o addKnot(int, int, int)
 o clone()
 o copyTo(Gradient)
 o getKnot(int)
 o getKnotBlend(int)
 o getKnotType(int)
 o knotAt(int)
 o randomGradient()
 o randomize()
 o removeKnot(int)
 o setColor(int, int)
 o setKnot(int, int)
 o setKnotBlend(int, int)
 o setKnotPosition(int, int)
 o setKnotType(int, int)
 o splitSpan(int)

Variables

 o RGB
 public static final int RGB
 o HUE_CW
 public static final int HUE_CW
 o HUE_CCW
 public static final int HUE_CCW
 o LINEAR
 public static final int LINEAR
 o SPLINE
 public static final int SPLINE
 o CIRCLE_UP
 public static final int CIRCLE_UP
 o CIRCLE_DOWN
 public static final int CIRCLE_DOWN
 o CONSTANT
 public static final int CONSTANT
 o numKnots
 public int numKnots
 o xKnots
 public int xKnots[]
 o yKnots
 public int yKnots[]
 o knotTypes
 public byte knotTypes[]

Constructors

 o Gradient
 public Gradient()

Methods

 o clone
 public java.lang.Object clone()
Overrides:
clone in class com.jhlabs.image.ArrayColormap
 o copyTo
 public void copyTo(com.jhlabs.image.Gradient g)
 o setColor
 public void setColor(int n,
                      int color)
 o getKnot
 public int getKnot(int n)
 o setKnot
 public void setKnot(int n,
                     int color)
 o setKnotType
 public void setKnotType(int n,
                         int type)
 o getKnotType
 public int getKnotType(int n)
 o setKnotBlend
 public void setKnotBlend(int n,
                          int type)
 o getKnotBlend
 public byte getKnotBlend(int n)
 o addKnot
 public void addKnot(int x,
                     int color,
                     int type)
 o removeKnot
 public void removeKnot(int n)
 o splitSpan
 public void splitSpan(int n)
 o setKnotPosition
 public void setKnotPosition(int n,
                             int x)
 o knotAt
 public int knotAt(int x)
 o randomize
 public void randomize()
 o randomGradient
 public static com.jhlabs.image.Gradient randomGradient()

All Packages  Class Hierarchy  This Package  Previous  Next  Index