A filter which produces an image with a cellular texture.
HEXAGONAL
public static final int HEXAGONAL
OCTAGONAL
public static final int OCTAGONAL
RANDOM
public static final int RANDOM
SQUARE
public static final int SQUARE
TRIANGULAR
public static final int TRIANGULAR
amount
public float amount
angle
protected float angle
angleCoefficient
protected float angleCoefficient
coefficients
protected float[] coefficients
distancePower
public float distancePower
gridType
protected int gridType
random
protected Random random
randomness
protected float randomness
scale
protected float scale
stretch
protected float stretch
turbulence
public float turbulence
useColor
public boolean useColor
filterPixels
protected int[] filterPixels(int width,
int height,
int[] inPixels,
Rectangle transformedSpace)
Actually filter the pixels.
- filterPixels in interface WholeImageFilter
width
- the image widthheight
- the image heightinPixels
- the image pixelstransformedSpace
- the output bounds
getAmount
public float getAmount()
Get the amount of texture.
getAngle
public float getAngle()
Returns the angle of the texture.
- the angle of the texture.
getAngleCoefficient
public float getAngleCoefficient()
getCoefficient
public float getCoefficient(int i)
getColormap
public Colormap getColormap()
Get the colormap to be used for the filter.
getDistancePower
public float getDistancePower()
getF1
public float getF1()
getF2
public float getF2()
getF3
public float getF3()
getF4
public float getF4()
getGradientCoefficient
public float getGradientCoefficient()
getGridType
public int getGridType()
getPixel
public int getPixel(int x,
int y,
int[] inPixels,
int width,
int height)
getRandomness
public float getRandomness()
getScale
public float getScale()
Returns the scale of the texture.
- the scale of the texture.
getStretch
public float getStretch()
Returns the stretch factor of the texture.
- the stretch factor of the texture.
getTurbulence
public float getTurbulence()
Returns the turbulence of the effect.
- the turbulence of the effect.
setAmount
public void setAmount(float amount)
Set the amount of effect.
setAngle
public void setAngle(float angle)
Specifies the angle of the texture.
angle
- the angle of the texture.
setAngleCoefficient
public void setAngleCoefficient(float angleCoefficient)
setCoefficient
public void setCoefficient(int i,
float v)
setColormap
public void setColormap(Colormap colormap)
Set the colormap to be used for the filter.
setDistancePower
public void setDistancePower(float distancePower)
setF1
public void setF1(float v)
setF2
public void setF2(float v)
setF3
public void setF3(float v)
setF4
public void setF4(float v)
setGradientCoefficient
public void setGradientCoefficient(float gradientCoefficient)
setGridType
public void setGridType(int gridType)
setRandomness
public void setRandomness(float randomness)
setScale
public void setScale(float scale)
Specifies the scale of the texture.
scale
- the scale of the texture.
setStretch
public void setStretch(float stretch)
Specifies the stretch factor of the texture.
stretch
- the stretch factor of the texture.
setTurbulence
public void setTurbulence(float turbulence)
Specifies the turbulence of the texture.
turbulence
- the turbulence of the texture.
toString
public String toString()
turbulence2
public float turbulence2(float x,
float y,
float freq)