|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metsci.glimpse.support.colormap.ColorGenerator
public class ColorGenerator
Picks colors from a given ColorGradient
. This is especially useful
when trying to get visually distinct colors and the number of colors is not
known a-priori.
The current implementation indexes into the ColorGradient
using the
following sequence (and allows for a max of ~1000 colors before wrapping):
0, 1, 0.5, 0.25, 0.75, 0.125, 0.375, 0.625, 0.875, 0.0625, ...
Constructor Summary | |
---|---|
ColorGenerator()
Creates a new ColorGenerator using the jet color gradient. |
|
ColorGenerator(ColorGradient colors)
Creates a new ColorGenerator using the given ColorGradient . |
Method Summary | |
---|---|
void |
next(float[] rgba)
Gets the next color in the series. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColorGenerator()
ColorGenerator
using the jet color gradient.
public ColorGenerator(ColorGradient colors)
ColorGenerator
using the given ColorGradient
.
Method Detail |
---|
public void next(float[] rgba)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |