com.alee.graphics.filters
Class ShadowFilter
java.lang.Object
com.alee.graphics.filters.AbstractBufferedImageOp
com.alee.graphics.filters.ShadowFilter
- All Implemented Interfaces:
- java.awt.image.BufferedImageOp
public class ShadowFilter
- extends AbstractBufferedImageOp
A filter which draws a drop shadow based on the alpha channel of the image.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShadowFilter
public ShadowFilter()
ShadowFilter
public ShadowFilter(int radius,
int xOffset,
int yOffset,
float opacity)
setXOffset
public void setXOffset(int xOffset)
getXOffset
public int getXOffset()
setYOffset
public void setYOffset(int yOffset)
getYOffset
public int getYOffset()
setRadius
public void setRadius(int 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 int 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)