Package com.jhlabs.image
Class WoodFilter
- java.lang.Object
-
- com.jhlabs.image.AbstractBufferedImageOp
-
- com.jhlabs.image.PointFilter
-
- com.jhlabs.image.WoodFilter
-
- All Implemented Interfaces:
java.awt.image.BufferedImageOp,java.lang.Cloneable
public class WoodFilter extends PointFilter
A filter which produces a simulated wood texture. This is a bit of a hack, but might be usefult to some people.
-
-
Field Summary
-
Fields inherited from class com.jhlabs.image.PointFilter
canFilterIndexColorModel
-
-
Constructor Summary
Constructors Constructor Description WoodFilter()Construct a WoodFilter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intfilterRGB(int x, int y, int rgb)floatgetAngle()Returns the angle of the texture.ColormapgetColormap()Get the colormap to be used for the filter.floatgetFibres()Returns the amount of fibres in the texture.floatgetGain()Returns the gain of the texture.floatgetRings()Returns the rings value.floatgetScale()Returns the scale of the texture.floatgetStretch()Returns the stretch factor of the texture.floatgetTurbulence()Returns the turbulence of the texture.voidsetAngle(float angle)Specifies the angle of the texture.voidsetColormap(Colormap colormap)Set the colormap to be used for the filter.voidsetFibres(float fibres)Specifies the amount of fibres in the texture.voidsetGain(float gain)Specifies the gain of the texture.voidsetRings(float rings)Specifies the rings value.voidsetScale(float scale)Specifies the scale of the texture.voidsetStretch(float stretch)Specifies the stretch factor of the texture.voidsetTurbulence(float turbulence)Specifies the turbulence of the texture.java.lang.StringtoString()-
Methods inherited from class com.jhlabs.image.PointFilter
filter, setDimensions
-
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB, stringToColor
-
-
-
-
Method Detail
-
setRings
public void setRings(float rings)
Specifies the rings value.- Parameters:
rings- the rings value. Minimum value: 0, maximum value: 1- See Also:
getRings()
-
getRings
public float getRings()
Returns the rings value.- Returns:
- the rings value.
- See Also:
setRings(float)
-
setScale
public void setScale(float scale)
Specifies the scale of the texture.- Parameters:
scale- the scale of the texture. Minimum value: 1, maximum value: 300+- See Also:
getScale()
-
getScale
public float getScale()
Returns the scale of the texture.- Returns:
- the scale of the texture.
- See Also:
setScale(float)
-
setStretch
public void setStretch(float stretch)
Specifies the stretch factor of the texture.- Parameters:
stretch- the stretch factor of the texture. Minimum value: 1, maximum value: 50+- See Also:
getStretch()
-
getStretch
public float getStretch()
Returns the stretch factor of the texture.- Returns:
- the stretch factor of the texture.
- See Also:
setStretch(float)
-
setAngle
public void setAngle(float angle)
Specifies the angle of the texture.- Parameters:
angle- the angle of the texture.- See Also:
getAngle()
-
getAngle
public float getAngle()
Returns the angle of the texture.- Returns:
- the angle of the texture.
- See Also:
setAngle(float)
-
setTurbulence
public void setTurbulence(float turbulence)
Specifies the turbulence of the texture.- Parameters:
turbulence- the turbulence of the texture. Minimum value: 0, maximum value: 1- See Also:
getTurbulence()
-
getTurbulence
public float getTurbulence()
Returns the turbulence of the texture.- Returns:
- the turbulence of the texture.
- See Also:
setTurbulence(float)
-
setFibres
public void setFibres(float fibres)
Specifies the amount of fibres in the texture.- Parameters:
fibres- the amount of fibres in the texture. Minimum value: 0, maximum value: 1- See Also:
getFibres()
-
getFibres
public float getFibres()
Returns the amount of fibres in the texture.- Returns:
- the amount of fibres in the texture.
- See Also:
setFibres(float)
-
setGain
public void setGain(float gain)
Specifies the gain of the texture.- Parameters:
gain- the gain of the texture. Minimum value: 0, maximum value: 1- See Also:
getGain()
-
getGain
public float getGain()
Returns the gain of the texture.- Returns:
- the gain of the texture.
- See Also:
setGain(float)
-
setColormap
public void setColormap(Colormap colormap)
Set the colormap to be used for the filter.- Parameters:
colormap- the colormap- See Also:
getColormap()
-
getColormap
public Colormap getColormap()
Get the colormap to be used for the filter.- Returns:
- the colormap
- See Also:
setColormap(Colormap)
-
filterRGB
public int filterRGB(int x, int y, int rgb)- Specified by:
filterRGBin classPointFilter
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-