com.jhlabs.image

Class WoodFilter

Implemented Interfaces:
BufferedImageOp, 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

WoodFilter()
Construct a WoodFilter.

Method Summary

int
filterRGB(int x, int y, int rgb)
float
getAngle()
Returns the angle of the texture.
Colormap
getColormap()
Get the colormap to be used for the filter.
float
getFibres()
Returns the amount of fibres in the texture.
float
getGain()
Returns the gain of the texture.
float
getRings()
Returns the rings value.
float
getScale()
Returns the scale of the texture.
float
getStretch()
Returns the stretch factor of the texture.
float
getTurbulence()
Returns the turbulence of the texture.
void
setAngle(float angle)
Specifies the angle of the texture.
void
setColormap(Colormap colormap)
Set the colormap to be used for the filter.
void
setFibres(float fibres)
Specifies the amount of fibres in the texture.
void
setGain(float gain)
Specifies the gain of the texture.
void
setRings(float rings)
Specifies the rings value.
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()

Methods inherited from class com.jhlabs.image.PointFilter

filter, filterRGB, setDimensions

Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp

clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRGB, getRenderingHints, setRGB

Constructor Details

WoodFilter

public WoodFilter()
Construct a WoodFilter.

Method Details

filterRGB

public int filterRGB(int x,
                     int y,
                     int rgb)
Overrides:
filterRGB in interface PointFilter

getAngle

public float getAngle()
Returns the angle of the texture.
Returns:
the angle of the texture.

getColormap

public Colormap getColormap()
Get the colormap to be used for the filter.
Returns:
the colormap

getFibres

public float getFibres()
Returns the amount of fibres in the texture.
Returns:
the amount of fibres in the texture.

getGain

public float getGain()
Returns the gain of the texture.
Returns:
the gain of the texture.

getRings

public float getRings()
Returns the rings value.
Returns:
the rings value.

getScale

public float getScale()
Returns the scale of the texture.
Returns:
the scale of the texture.

getStretch

public float getStretch()
Returns the stretch factor of the texture.
Returns:
the stretch factor of the texture.

getTurbulence

public float getTurbulence()
Returns the turbulence of the texture.
Returns:
the turbulence of the texture.

setAngle

public void setAngle(float angle)
Specifies the angle of the texture.
Parameters:
angle - the angle of the texture.

setColormap

public void setColormap(Colormap colormap)
Set the colormap to be used for the filter.
Parameters:
colormap - the colormap
See Also:
getColormap()

setFibres

public void setFibres(float fibres)
Specifies the amount of fibres in the texture.
Parameters:
fibres - the amount of fibres in the texture.

setGain

public void setGain(float gain)
Specifies the gain of the texture.
Parameters:
gain - the gain of the texture.

setRings

public void setRings(float rings)
Specifies the rings value.
Parameters:
rings - the rings value.

setScale

public void setScale(float scale)
Specifies the scale of the texture.
Parameters:
scale - the scale of the texture.

setStretch

public void setStretch(float stretch)
Specifies the stretch factor of the texture.
Parameters:
stretch - the stretch factor of the texture.

setTurbulence

public void setTurbulence(float turbulence)
Specifies the turbulence of the texture.
Parameters:
turbulence - the turbulence of the texture.

toString

public String toString()