com.jhlabs.image
Class BrushedMetalFilter
java.lang.Object
com.jhlabs.image.BrushedMetalFilter
- BufferedImageOp
public class BrushedMetalFilter
extends java.lang.Object
implements BufferedImageOp
A filter which produces an image simulating brushed metal.
BrushedMetalFilter() - Constructs a BrushedMetalFilter object.
|
BrushedMetalFilter(int color, int radius, float amount, boolean monochrome, float shine) - Constructs a BrushedMetalFilter object.
|
BufferedImage | createCompatibleDestImage(BufferedImage src, ColorModel dstCM)
|
BufferedImage | filter(BufferedImage src, BufferedImage dst)
|
float | getAmount() - Get the amount of noise to add.
|
Rectangle2D | getBounds2D(BufferedImage src)
|
int | getColor() - Get the color of the metal.
|
boolean | getMonochrome() - Get the type of noise to add.
|
Point2D | getPoint2D(Point2D srcPt, Point2D dstPt)
|
int | getRadius() - Get the horizontal size of the blur.
|
RenderingHints | getRenderingHints()
|
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.
|
String | toString()
|
BrushedMetalFilter
public BrushedMetalFilter()
Constructs a BrushedMetalFilter object.
BrushedMetalFilter
public BrushedMetalFilter(int color,
int radius,
float amount,
boolean monochrome,
float shine)
Constructs a BrushedMetalFilter object.
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
createCompatibleDestImage
public BufferedImage createCompatibleDestImage(BufferedImage src,
ColorModel dstCM)
filter
public BufferedImage filter(BufferedImage src,
BufferedImage dst)
getAmount
public float getAmount()
Get the amount of noise to add.
getBounds2D
public Rectangle2D getBounds2D(BufferedImage src)
getColor
public int getColor()
Get the color of the metal.
getMonochrome
public boolean getMonochrome()
Get the type of noise to add.
- true for monochrome noise
getPoint2D
public Point2D getPoint2D(Point2D srcPt,
Point2D dstPt)
getRadius
public int getRadius()
Get the horizontal size of the blur.
- the radius of the blur in the horizontal direction
getRenderingHints
public RenderingHints getRenderingHints()
getShine
public float getShine()
Get the amount of shine to add in the range 0..1.
setAmount
public void setAmount(float amount)
Set the amount of noise to add in the range 0..1.
amount
- the amount of noise
setColor
public void setColor(int color)
Set the color of the metal.
color
- the color in ARGB form
setMonochrome
public void setMonochrome(boolean monochrome)
Set the type of noise to add.
monochrome
- true for monochrome noise
setRadius
public void setRadius(int radius)
Set the horizontal size of the blur.
radius
- the radius of the blur in the horizontal direction
setShine
public void setShine(float shine)
Set the amount of shine to add to the range 0..1.
shine
- the amount of shine
toString
public String toString()