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) float
Get the amount of noise to add.getBounds2D
(BufferedImage src) int
getColor()
Get the color of the metal.boolean
Get the type of noise to add.getPoint2D
(Point2D srcPt, Point2D dstPt) int
Get the horizontal size of the blur.float
getShine()
Get the amount of shine to add in the range 0..1.void
setAmount
(float amount) Set the amount of noise to add in the range 0..1.void
setColor
(int color) Set the color of the metal.void
setMonochrome
(boolean monochrome) Set the type of noise to add.void
setRadius
(int radius) Set the horizontal size of the blur.void
setShine
(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:
filter
in 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:
createCompatibleDestImage
in interfaceBufferedImageOp
-
getBounds2D
- Specified by:
getBounds2D
in interfaceBufferedImageOp
-
getPoint2D
- Specified by:
getPoint2D
in interfaceBufferedImageOp
-
getRenderingHints
- Specified by:
getRenderingHints
in interfaceBufferedImageOp
-
toString
-