Package com.jhlabs.image
Class BrushedMetalFilter
java.lang.Object
com.jhlabs.image.BrushedMetalFilter
- All Implemented Interfaces:
BufferedImageOp
A filter which produces an image simulating brushed metal.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a BrushedMetalFilter object.BrushedMetalFilter(int color, int radius, float amount, boolean monochrome, float shine) Constructs a BrushedMetalFilter object. -
Method Summary
Modifier and TypeMethodDescriptioncreateCompatibleDestImage(BufferedImage src, ColorModel dstCM) filter(BufferedImage src, BufferedImage dst) floatGet the amount of noise to add.getBounds2D(BufferedImage src) intgetColor()Get the color of the metal.booleanGet the type of noise to add.getPoint2D(Point2D srcPt, Point2D dstPt) intGet the horizontal size of the blur.floatgetShine()Get the amount of shine to add in the range 0..1.voidsetAmount(float amount) Set the amount of noise to add in the range 0..1.voidsetColor(int color) Set the color of the metal.voidsetMonochrome(boolean monochrome) Set the type of noise to add.voidsetRadius(int radius) Set the horizontal size of the blur.voidsetShine(float shine) Set the amount of shine to add to the range 0..1.toString()
-
Constructor Details
-
BrushedMetalFilter
public BrushedMetalFilter()Constructs a BrushedMetalFilter object. -
BrushedMetalFilter
public BrushedMetalFilter(int color, int radius, float amount, boolean monochrome, float shine) Constructs a BrushedMetalFilter object.- Parameters:
color- an int specifying the metal colorradius- an int specifying the blur sizeamount- a float specifying the amount of texturemonochrome- a boolean -- true for monochrome textureshine- a float specifying the shine to add
-
-
Method Details
-
filter
- Specified by:
filterin interfaceBufferedImageOp
-
setRadius
public void setRadius(int radius) Set the horizontal size of the blur.- Parameters:
radius- the radius of the blur in the horizontal direction- See Also:
-
getRadius
public int getRadius()Get the horizontal size of the blur.- Returns:
- the radius of the blur in the horizontal direction
- See Also:
-
setAmount
public void setAmount(float amount) Set the amount of noise to add in the range 0..1.- Parameters:
amount- the amount of noise- See Also:
-
getAmount
public float getAmount()Get the amount of noise to add.- Returns:
- the amount of noise
- See Also:
-
setShine
public void setShine(float shine) Set the amount of shine to add to the range 0..1.- Parameters:
shine- the amount of shine- See Also:
-
getShine
public float getShine()Get the amount of shine to add in the range 0..1.- Returns:
- the amount of shine
- See Also:
-
setColor
public void setColor(int color) Set the color of the metal.- Parameters:
color- the color in ARGB form- See Also:
-
getColor
public int getColor()Get the color of the metal.- Returns:
- the color in ARGB form
- See Also:
-
setMonochrome
public void setMonochrome(boolean monochrome) Set the type of noise to add.- Parameters:
monochrome- true for monochrome noise- See Also:
-
getMonochrome
public boolean getMonochrome()Get the type of noise to add.- Returns:
- true for monochrome noise
- See Also:
-
createCompatibleDestImage
- Specified by:
createCompatibleDestImagein interfaceBufferedImageOp
-
getBounds2D
- Specified by:
getBounds2Din interfaceBufferedImageOp
-
getPoint2D
- Specified by:
getPoint2Din interfaceBufferedImageOp
-
getRenderingHints
- Specified by:
getRenderingHintsin interfaceBufferedImageOp
-
toString
-