|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.media.pictures.filters.ArrayColormap
org.jscience.media.pictures.filters.Gradient
public class Gradient
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:
| Field Summary | |
|---|---|
static int |
CIRCLE_DOWN
DOCUMENT ME! |
static int |
CIRCLE_UP
DOCUMENT ME! |
static int |
CONSTANT
DOCUMENT ME! |
static int |
HUE_CCW
DOCUMENT ME! |
static int |
HUE_CW
DOCUMENT ME! |
byte[] |
knotTypes
DOCUMENT ME! |
static int |
LINEAR
DOCUMENT ME! |
int |
numKnots
DOCUMENT ME! |
static int |
RGB
DOCUMENT ME! |
static int |
SPLINE
DOCUMENT ME! |
int[] |
xKnots
DOCUMENT ME! |
int[] |
yKnots
DOCUMENT ME! |
| Fields inherited from class org.jscience.media.pictures.filters.ArrayColormap |
|---|
map |
| Constructor Summary | |
|---|---|
Gradient()
Creates a new Gradient object. |
|
Gradient(int[] rgb)
Creates a new Gradient object. |
|
Gradient(int[] x,
int[] rgb)
Creates a new Gradient object. |
|
Gradient(int[] x,
int[] rgb,
byte[] types)
Creates a new Gradient object. |
|
| Method Summary | |
|---|---|
void |
addKnot(int x,
int color,
int type)
DOCUMENT ME! |
java.lang.Object |
clone()
DOCUMENT ME! |
void |
copyTo(Gradient g)
DOCUMENT ME! |
int |
getKnot(int n)
DOCUMENT ME! |
byte |
getKnotBlend(int n)
DOCUMENT ME! |
int |
getKnotType(int n)
DOCUMENT ME! |
int |
knotAt(int x)
DOCUMENT ME! |
static Gradient |
randomGradient()
DOCUMENT ME! |
void |
randomize()
DOCUMENT ME! |
void |
rebuild()
DOCUMENT ME! |
void |
removeKnot(int n)
DOCUMENT ME! |
void |
setColor(int n,
int color)
DOCUMENT ME! |
void |
setKnot(int n,
int color)
DOCUMENT ME! |
void |
setKnotBlend(int n,
int type)
DOCUMENT ME! |
void |
setKnotPosition(int n,
int x)
DOCUMENT ME! |
void |
setKnots(int[] x,
int[] rgb,
byte[] types)
|
void |
setKnots(int[] x,
int[] y,
byte[] types,
int offset,
int count)
DOCUMENT ME! |
void |
setKnotType(int n,
int type)
DOCUMENT ME! |
void |
splitSpan(int n)
DOCUMENT ME! |
| Methods inherited from class org.jscience.media.pictures.filters.ArrayColormap |
|---|
getColor, getMap, setColorInterpolated, setColorRange, setColorRange, setMap |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int RGB
public static final int HUE_CW
public static final int HUE_CCW
public static final int LINEAR
public static final int SPLINE
public static final int CIRCLE_UP
public static final int CIRCLE_DOWN
public static final int CONSTANT
public int numKnots
public int[] xKnots
public int[] yKnots
public byte[] knotTypes
| Constructor Detail |
|---|
public Gradient()
public Gradient(int[] rgb)
rgb - DOCUMENT ME!
public Gradient(int[] x,
int[] rgb)
x - DOCUMENT ME!rgb - DOCUMENT ME!
public Gradient(int[] x,
int[] rgb,
byte[] types)
x - DOCUMENT ME!rgb - DOCUMENT ME!types - DOCUMENT ME!| Method Detail |
|---|
public java.lang.Object clone()
clone in class ArrayColormappublic void copyTo(Gradient g)
g - DOCUMENT ME!
public void setColor(int n,
int color)
setColor in class ArrayColormapn - DOCUMENT ME!color - DOCUMENT ME!public int getKnot(int n)
n - DOCUMENT ME!
public void setKnot(int n,
int color)
n - DOCUMENT ME!color - DOCUMENT ME!
public void setKnotType(int n,
int type)
n - DOCUMENT ME!type - DOCUMENT ME!public int getKnotType(int n)
n - DOCUMENT ME!
public void setKnotBlend(int n,
int type)
n - DOCUMENT ME!type - DOCUMENT ME!public byte getKnotBlend(int n)
n - DOCUMENT ME!
public void addKnot(int x,
int color,
int type)
x - DOCUMENT ME!color - DOCUMENT ME!type - DOCUMENT ME!public void removeKnot(int n)
n - DOCUMENT ME!
public void setKnots(int[] x,
int[] rgb,
byte[] types)
public void setKnots(int[] x,
int[] y,
byte[] types,
int offset,
int count)
x - DOCUMENT ME!y - DOCUMENT ME!types - DOCUMENT ME!offset - DOCUMENT ME!count - DOCUMENT ME!public void splitSpan(int n)
n - DOCUMENT ME!
public void setKnotPosition(int n,
int x)
n - DOCUMENT ME!x - DOCUMENT ME!public int knotAt(int x)
x - DOCUMENT ME!
public void rebuild()
public void randomize()
public static Gradient randomGradient()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||