public class ShadowFilter extends AbstractBufferedImageOp
filterListener
Constructor and Description |
---|
ShadowFilter()
Construct a ShadowFilter.
|
ShadowFilter(float radius,
float xOffset,
float yOffset,
float opacity)
Construct a ShadowFilter.
|
Modifier and Type | Method and Description |
---|---|
BufferedImage |
filter(BufferedImage src,
BufferedImage dst) |
boolean |
getAddMargins()
Get whether to increase the size of the output image to accomodate the shadow.
|
float |
getAngle()
Returns the angle of the shadow.
|
Rectangle2D |
getBounds2D(BufferedImage src) |
float |
getDistance()
Get the distance of the shadow.
|
float |
getOpacity()
Get the opacity of the shadow.
|
Point2D |
getPoint2D(Point2D srcPt,
Point2D dstPt) |
float |
getRadius()
Get the radius of the kernel.
|
int |
getShadowColor()
Get the color of the shadow.
|
boolean |
getShadowOnly()
Get whether to only draw the shadow without the original image.
|
void |
setAddMargins(boolean addMargins)
Set whether to increase the size of the output image to accomodate the shadow.
|
void |
setAngle(float angle)
Specifies the angle of the shadow.
|
void |
setDistance(float distance)
Set the distance of the shadow.
|
void |
setOpacity(float opacity)
Set the opacity of the shadow.
|
void |
setRadius(float radius)
Set the radius of the kernel, and hence the amount of blur.
|
void |
setShadowColor(int shadowColor)
Set the color of the shadow.
|
void |
setShadowOnly(boolean shadowOnly)
Set whether to only draw the shadow without the original image.
|
String |
toString() |
clone, createCompatibleDestImage, createCompatibleDestImage, filterDone, filterInitialize, filterProgress, filterStart, getMetaData, getRenderingHints, getRGB, setFilterListener, setRGB
public ShadowFilter()
public ShadowFilter(float radius, float xOffset, float yOffset, float opacity)
radius
- the radius of the shadowxOffset
- the X offset of the shadowyOffset
- the Y offset of the shadowopacity
- the opacity of the shadowpublic void setAngle(float angle)
angle
- the angle of the shadow.getAngle()
public float getAngle()
setAngle(float)
public void setDistance(float distance)
distance
- the distance.getDistance()
public float getDistance()
setDistance(float)
public void setRadius(float radius)
radius
- the radius of the blur in pixels.getRadius()
public float getRadius()
setRadius(float)
public void setOpacity(float opacity)
opacity
- the opacity.getOpacity()
public float getOpacity()
setOpacity(float)
public void setShadowColor(int shadowColor)
shadowColor
- the color.getShadowColor()
public int getShadowColor()
setShadowColor(int)
public void setAddMargins(boolean addMargins)
addMargins
- true to add margins.getAddMargins()
public boolean getAddMargins()
setAddMargins(boolean)
public void setShadowOnly(boolean shadowOnly)
shadowOnly
- true to only draw the shadow.getShadowOnly()
public boolean getShadowOnly()
setShadowOnly(boolean)
public Rectangle2D getBounds2D(BufferedImage src)
getBounds2D
in interface BufferedImageOp
getBounds2D
in class AbstractBufferedImageOp
public Point2D getPoint2D(Point2D srcPt, Point2D dstPt)
getPoint2D
in interface BufferedImageOp
getPoint2D
in class AbstractBufferedImageOp
public BufferedImage filter(BufferedImage src, BufferedImage dst)
filter
in interface BufferedImageOp
filter
in class AbstractBufferedImageOp
Copyright © 2012-2013 Bambi Software Foundation. All Rights Reserved.