|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectscenic.LinearColorFunction
public class LinearColorFunction
This class is used for creating color slides in gradients. The gradient color is defined using two or more nodes. Each node has a position and a color. The colors between two consecutive nodes are linearely interpolated to produce a smooth color slide.
| Constructor Summary | |
|---|---|
LinearColorFunction()
Constructs a LinearColorFunction object. |
|
| Method Summary | |
|---|---|
void |
addNode(double position,
ScenicColor color)
Adds a new node to this object. |
double |
max()
Returns the maximum position of the function. |
double |
min()
Returns the minimum position of the function. |
ScenicColor |
value(double x)
Returns the color value at the given position. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LinearColorFunction()
| Method Detail |
|---|
public void addNode(double position,
ScenicColor color)
position - the position of the node.color - the color of the node.public ScenicColor value(double x)
ColorFunction
value in interface ColorFunctionx - the argument.
public double min()
ColorFunction
min in interface ColorFunctionpublic double max()
ColorFunction
max in interface ColorFunction
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||