Package com.jhlabs.image
Class ShadowFilter
- java.lang.Object
-
- com.jhlabs.image.AbstractBufferedImageOp
-
- com.jhlabs.image.ShadowFilter
-
- All Implemented Interfaces:
java.awt.image.BufferedImageOp,java.lang.Cloneable
public class ShadowFilter extends AbstractBufferedImageOp
-
-
Constructor Summary
Constructors Constructor Description ShadowFilter()ShadowFilter(float radius, float xOffset, float yOffset, float opacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.BufferedImagefilter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)booleangetAddMargins()floatgetAngle()floatgetDistance()floatgetOpacity()floatgetRadius()Get the radius of the kernel.intgetShadowColor()booleangetShadowOnly()voidsetAddMargins(boolean addMargins)voidsetAngle(float angle)voidsetDistance(float distance)voidsetOpacity(float opacity)voidsetRadius(float radius)Set the radius of the kernel, and hence the amount of blur.voidsetShadowColor(int shadowColor)voidsetShadowOnly(boolean shadowOnly)java.lang.StringtoString()protected voidtransformSpace(java.awt.Rectangle r)-
Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
-
-
-
-
Method Detail
-
setAngle
public void setAngle(float angle)
-
getAngle
public float getAngle()
-
setDistance
public void setDistance(float distance)
-
getDistance
public float getDistance()
-
setRadius
public void setRadius(float radius)
Set the radius of the kernel, and hence the amount of blur. The bigger the radius, the longer this filter will take.- Parameters:
radius- the radius of the blur in pixels.
-
getRadius
public float getRadius()
Get the radius of the kernel.- Returns:
- the radius
-
setOpacity
public void setOpacity(float opacity)
-
getOpacity
public float getOpacity()
-
setShadowColor
public void setShadowColor(int shadowColor)
-
getShadowColor
public int getShadowColor()
-
setAddMargins
public void setAddMargins(boolean addMargins)
-
getAddMargins
public boolean getAddMargins()
-
setShadowOnly
public void setShadowOnly(boolean shadowOnly)
-
getShadowOnly
public boolean getShadowOnly()
-
transformSpace
protected void transformSpace(java.awt.Rectangle r)
-
filter
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-