public class CellularFilter extends WholeImageFilter implements Function2D, Cloneable
Modifier and Type | Class and Description |
---|---|
class |
CellularFilter.Point |
Modifier and Type | Field and Description |
---|---|
float |
amount |
protected float |
angle |
protected float |
angleCoefficient |
float |
bias |
protected float[] |
coefficients |
protected Colormap |
colormap |
float |
distancePower |
float |
gain |
protected int |
gridType |
static int |
HEXAGONAL |
protected float |
m00 |
protected float |
m01 |
protected float |
m10 |
protected float |
m11 |
static int |
OCTAGONAL |
protected Random |
random |
static int |
RANDOM |
protected float |
randomness |
protected CellularFilter.Point[] |
results |
protected float |
scale |
static int |
SQUARE |
protected float |
stretch |
static int |
TRIANGULAR |
float |
turbulence |
boolean |
useColor |
originalSpace, transformedSpace
filterListener
Constructor and Description |
---|
CellularFilter() |
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
float |
evaluate(float x,
float y) |
protected int[] |
filterPixels(int width,
int height,
int[] inPixels,
Rectangle transformedSpace)
Actually filter the pixels.
|
float |
getAmount()
Get the amount of texture.
|
float |
getAngle()
Returns the angle of the texture.
|
float |
getAngleCoefficient() |
float |
getCoefficient(int i) |
Colormap |
getColormap()
Get the colormap to be used for the filter.
|
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()
Returns the scale of the texture.
|
float |
getStretch()
Returns the stretch factor of the texture.
|
float |
getTurbulence()
Returns the turbulence of the effect.
|
void |
setAmount(float amount)
Set the amount of effect.
|
void |
setAngle(float angle)
Specifies the angle of the texture.
|
void |
setAngleCoefficient(float angleCoefficient) |
void |
setCoefficient(int i,
float v) |
void |
setColormap(Colormap colormap)
Set the colormap to be used for the filter.
|
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)
Specifies the scale of the texture.
|
void |
setStretch(float stretch)
Specifies the stretch factor of the texture.
|
void |
setTurbulence(float turbulence)
Specifies the turbulence of the texture.
|
String |
toString() |
float |
turbulence2(float x,
float y,
float freq) |
filter, transformSpace
createCompatibleDestImage, createCompatibleDestImage, filterDone, filterInitialize, filterProgress, filterStart, getBounds2D, getMetaData, getPoint2D, getRenderingHints, getRGB, setFilterListener, setRGB
protected float scale
protected float stretch
protected float angle
public float amount
public float turbulence
public float gain
public float bias
public float distancePower
public boolean useColor
protected Colormap colormap
protected float[] coefficients
protected float angleCoefficient
protected Random random
protected float m00
protected float m01
protected float m10
protected float m11
protected CellularFilter.Point[] results
protected float randomness
protected int gridType
public static final int RANDOM
public static final int SQUARE
public static final int HEXAGONAL
public static final int OCTAGONAL
public static final int TRIANGULAR
public void setScale(float scale)
scale
- the scale of the texture.getScale()
public float getScale()
setScale(float)
public void setStretch(float stretch)
stretch
- the stretch factor of the texture.getStretch()
public float getStretch()
setStretch(float)
public void setAngle(float angle)
angle
- the angle of the texture.getAngle()
public float getAngle()
setAngle(float)
public void setCoefficient(int i, float v)
public float getCoefficient(int i)
public void setAngleCoefficient(float angleCoefficient)
public float getAngleCoefficient()
public void setGradientCoefficient(float gradientCoefficient)
public float getGradientCoefficient()
public void setF1(float v)
public float getF1()
public void setF2(float v)
public float getF2()
public void setF3(float v)
public float getF3()
public void setF4(float v)
public float getF4()
public void setColormap(Colormap colormap)
colormap
- the colormapgetColormap()
public Colormap getColormap()
setColormap(org.zimowski.bambi.jhlabs.image.Colormap)
public void setRandomness(float randomness)
public float getRandomness()
public void setGridType(int gridType)
public int getGridType()
public void setDistancePower(float distancePower)
public float getDistancePower()
public void setTurbulence(float turbulence)
turbulence
- the turbulence of the texture.getTurbulence()
public float getTurbulence()
setTurbulence(float)
public void setAmount(float amount)
amount
- the amountgetAmount()
public float getAmount()
setAmount(float)
public float evaluate(float x, float y)
evaluate
in interface Function2D
public float turbulence2(float x, float y, float freq)
public int getPixel(int x, int y, int[] inPixels, int width, int height)
protected int[] filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace)
WholeImageFilter
filterPixels
in class WholeImageFilter
width
- the image widthheight
- the image heightinPixels
- the image pixelstransformedSpace
- the output boundspublic Object clone()
clone
in class AbstractBufferedImageOp
Copyright © 2012-2013 Bambi Software Foundation. All Rights Reserved.