Package com.jhlabs.image
Class FBMFilter
java.lang.Object
com.jhlabs.image.AbstractBufferedImageOp
com.jhlabs.image.PointFilter
com.jhlabs.image.FBMFilter
- All Implemented Interfaces:
BufferedImageOp,Cloneable
A filter which produces textures from fractal Brownian motion.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intprotected Randomstatic final intstatic final intstatic final intFields inherited from class com.jhlabs.image.PointFilter
canFilterIndexColorModel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfilter(BufferedImage src, BufferedImage dst) intfilterRGB(int x, int y, int rgb) floatGet the amount of texture.floatgetAngle()Returns the angle of the texture.getBasis()intfloatgetBias()Get the colormap to be used for the filter.floatgetGain()floatgetH()floatfloatintfloatgetScale()Returns the scale of the texture.floatReturns the stretch factor of the texture.protected FBMmakeFBM(float H, float lacunarity, float octaves) voidsetAmount(float amount) Set the amount of effect.voidsetAngle(float angle) Specifies the angle of the texture.voidsetBasis(Function2D basis) voidsetBasisType(int basisType) voidsetBias(float bias) voidsetColormap(Colormap colormap) Set the colormap to be used for the filter.voidsetGain(float gain) voidsetH(float H) voidsetLacunarity(float lacunarity) voidsetOctaves(float octaves) voidsetOperation(int operation) voidsetScale(float scale) Specifies the scale of the texture.voidsetStretch(float stretch) Specifies the stretch factor of the texture.toString()Methods inherited from class com.jhlabs.image.PointFilter
setDimensionsMethods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
Field Details
-
NOISE
public static final int NOISE- See Also:
-
RIDGED
public static final int RIDGED- See Also:
-
VLNOISE
public static final int VLNOISE- See Also:
-
SCNOISE
public static final int SCNOISE- See Also:
-
CELLULAR
public static final int CELLULAR- See Also:
-
random
-
-
Constructor Details
-
FBMFilter
public FBMFilter()
-
-
Method Details
-
setAmount
public void setAmount(float amount) Set the amount of effect.- Parameters:
amount- the amount- See Also:
-
getAmount
public float getAmount()Get the amount of texture.- Returns:
- the amount
- See Also:
-
setOperation
public void setOperation(int operation) -
getOperation
public int getOperation() -
setScale
public void setScale(float scale) Specifies the scale of the texture.- Parameters:
scale- the scale of the texture.- See Also:
-
getScale
public float getScale()Returns the scale of the texture.- Returns:
- the scale of the texture.
- See Also:
-
setStretch
public void setStretch(float stretch) Specifies the stretch factor of the texture.- Parameters:
stretch- the stretch factor of the texture.- See Also:
-
getStretch
public float getStretch()Returns the stretch factor of the texture.- Returns:
- the stretch factor of the texture.
- See Also:
-
setAngle
public void setAngle(float angle) Specifies the angle of the texture.- Parameters:
angle- the angle of the texture.- See Also:
-
getAngle
public float getAngle()Returns the angle of the texture.- Returns:
- the angle of the texture.
- See Also:
-
setOctaves
public void setOctaves(float octaves) -
getOctaves
public float getOctaves() -
setH
public void setH(float H) -
getH
public float getH() -
setLacunarity
public void setLacunarity(float lacunarity) -
getLacunarity
public float getLacunarity() -
setGain
public void setGain(float gain) -
getGain
public float getGain() -
setBias
public void setBias(float bias) -
getBias
public float getBias() -
setColormap
Set the colormap to be used for the filter.- Parameters:
colormap- the colormap- See Also:
-
getColormap
Get the colormap to be used for the filter.- Returns:
- the colormap
- See Also:
-
setBasisType
public void setBasisType(int basisType) -
getBasisType
public int getBasisType() -
setBasis
-
getBasis
-
makeFBM
-
filter
- Specified by:
filterin interfaceBufferedImageOp- Overrides:
filterin classPointFilter
-
filterRGB
public int filterRGB(int x, int y, int rgb) - Specified by:
filterRGBin classPointFilter
-
toString
-