j2d.filters
Class CellularFilter
java.lang.Object
j2d.filters.AbstractBufferedImageOp
j2d.filters.WholeImageFilter
j2d.filters.CellularFilter
- All Implemented Interfaces:
- MutatableFilter, ImageProcessorInterface, java.awt.image.BufferedImageOp, java.io.Serializable, java.lang.Cloneable, Function2D
- Direct Known Subclasses:
- CrystallizeFilter, PointillizeFilter
public class CellularFilter
- extends WholeImageFilter
- implements Function2D, MutatableFilter, java.lang.Cloneable, java.io.Serializable
- See Also:
- Serialized Form
Method Summary |
java.lang.Object |
clone()
|
float |
evaluate(float x,
float y)
|
int |
findColorMap()
|
float |
getAmount()
|
float |
getAngle()
|
float |
getAngleCoefficient()
|
float |
getCoefficient(int i)
|
Colormap |
getColormap()
|
float |
getDistancePower()
|
float |
getF1()
|
float |
getF2()
|
float |
getF3()
|
float |
getF4()
|
float |
getGradientCoefficient()
|
int |
getGridType()
|
int |
getPixel(int x,
int y,
int[] inPixels,
int width,
int height)
|
float |
getRandomness()
|
float |
getScale()
|
float |
getStretch()
|
float |
getTurbulence()
|
void |
mutate(float mutationLevel,
java.awt.image.BufferedImageOp d,
boolean keepShape,
boolean keepColors)
|
void |
setAmount(float amount)
|
void |
setAngle(float angle)
|
void |
setAngleCoefficient(float angleCoefficient)
|
void |
setCoefficient(int i,
float v)
|
void |
setColormap(int mapIndex)
|
void |
setDistancePower(float distancePower)
|
void |
setF1(float v)
|
void |
setF2(float v)
|
void |
setF3(float v)
|
void |
setF4(float v)
|
void |
setGradientCoefficient(float gradientCoefficient)
|
void |
setGridType(int gridType)
|
void |
setRandomness(float randomness)
|
void |
setScale(float scale)
|
void |
setStretch(float stretch)
|
void |
setTurbulence(float turbulence)
|
java.lang.String |
toString()
|
float |
turbulence2(float x,
float y,
float freq)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
amount
public float amount
turbulence
public float turbulence
gain
public float gain
bias
public float bias
distancePower
public float distancePower
useColor
public boolean useColor
RANDOM
public static final int RANDOM
- See Also:
- Constant Field Values
SQUARE
public static final int SQUARE
- See Also:
- Constant Field Values
HEXAGONAL
public static final int HEXAGONAL
- See Also:
- Constant Field Values
OCTAGONAL
public static final int OCTAGONAL
- See Also:
- Constant Field Values
TRIANGULAR
public static final int TRIANGULAR
- See Also:
- Constant Field Values
CellularFilter
public CellularFilter()
setScale
public void setScale(float scale)
getScale
public float getScale()
setStretch
public void setStretch(float stretch)
getStretch
public float getStretch()
setAngle
public void setAngle(float angle)
getAngle
public float getAngle()
setCoefficient
public void setCoefficient(int i,
float v)
getCoefficient
public float getCoefficient(int i)
setAngleCoefficient
public void setAngleCoefficient(float angleCoefficient)
getAngleCoefficient
public float getAngleCoefficient()
setGradientCoefficient
public void setGradientCoefficient(float gradientCoefficient)
getGradientCoefficient
public float getGradientCoefficient()
setF1
public void setF1(float v)
getF1
public float getF1()
setF2
public void setF2(float v)
getF2
public float getF2()
setF3
public void setF3(float v)
getF3
public float getF3()
setF4
public void setF4(float v)
getF4
public float getF4()
setColormap
public void setColormap(int mapIndex)
getColormap
public Colormap getColormap()
setRandomness
public void setRandomness(float randomness)
getRandomness
public float getRandomness()
setGridType
public void setGridType(int gridType)
getGridType
public int getGridType()
setDistancePower
public void setDistancePower(float distancePower)
getDistancePower
public float getDistancePower()
setTurbulence
public void setTurbulence(float turbulence)
getTurbulence
public float getTurbulence()
setAmount
public void setAmount(float amount)
getAmount
public float getAmount()
evaluate
public float evaluate(float x,
float y)
- Specified by:
evaluate
in interface Function2D
turbulence2
public float turbulence2(float x,
float y,
float freq)
getPixel
public int getPixel(int x,
int y,
int[] inPixels,
int width,
int height)
mutate
public void mutate(float mutationLevel,
java.awt.image.BufferedImageOp d,
boolean keepShape,
boolean keepColors)
- Specified by:
mutate
in interface MutatableFilter
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Overrides:
clone
in class java.lang.Object
- Throws:
java.lang.CloneNotSupportedException
findColorMap
public int findColorMap()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object