|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfpp.fractal.DiscreteColorizer
public final class DiscreteColorizer
The DiscreteColorizer class is the simplest implementation of the Colorizer interface.
Constructor Summary | |
---|---|
DiscreteColorizer(int maxIterations)
Constructs a new DiscreteColorizer using the colors black and white. |
|
DiscreteColorizer(int maxIterations,
java.awt.Color convergenceColor,
java.awt.Color divergenceColor)
Constructs a new DiscreteColorizer using the specified colors. |
Method Summary | |
---|---|
java.awt.Color |
calculateColor(int numberOfIterations)
Returns convergenceColor or divergenceColor depending on the given number of required iterations. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DiscreteColorizer(int maxIterations)
maxIterations
- the specified maximum number of iterationspublic DiscreteColorizer(int maxIterations, java.awt.Color convergenceColor, java.awt.Color divergenceColor)
maxIterations
- the specified maximum number of iterationsconvergenceColor
- the color to be used whenever the number of
required iterations indicates convergencedivergenceColor
- the color to be used whenever the number of
required iterations indicates divergenceMethod Detail |
---|
public java.awt.Color calculateColor(int numberOfIterations)
calculateColor
in interface Colorizer
numberOfIterations
- the given number of required iterations
Colorizer.calculateColor(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |