类 ShadowFilter
- java.lang.Object
-
- org.meteoinfo.image.filter.AbstractBufferedImageOp
-
- org.meteoinfo.image.filter.ShadowFilter
-
- 所有已实现的接口:
java.awt.image.BufferedImageOp,java.lang.Cloneable
public class ShadowFilter extends AbstractBufferedImageOp
A filter which draws a drop shadow based on the alpha channel of the image.
-
-
构造器概要
构造器 构造器 说明 ShadowFilter()Construct a ShadowFilter.ShadowFilter(float radius, float xOffset, float yOffset, float opacity)Construct a ShadowFilter.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 java.awt.image.BufferedImagefilter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)booleangetAddMargins()Get whether to increase the size of the output image to accomodate the shadow.floatgetAngle()Returns the angle of the shadow.java.awt.geom.Rectangle2DgetBounds2D(java.awt.image.BufferedImage src)floatgetDistance()Get the distance of the shadow.floatgetOpacity()Get the opacity of the shadow.java.awt.geom.Point2DgetPoint2D(java.awt.geom.Point2D srcPt, java.awt.geom.Point2D dstPt)floatgetRadius()Get the radius of the kernel.intgetShadowColor()Get the color of the shadow.booleangetShadowOnly()Get whether to only draw the shadow without the original image.voidsetAddMargins(boolean addMargins)Set whether to increase the size of the output image to accomodate the shadow.voidsetAngle(float angle)Specifies the angle of the shadow.voidsetDistance(float distance)Set the distance of the shadow.voidsetOpacity(float opacity)Set the opacity of the shadow.voidsetRadius(float radius)Set the radius of the kernel, and hence the amount of blur.voidsetShadowColor(int shadowColor)Set the color of the shadow.voidsetShadowOnly(boolean shadowOnly)Set whether to only draw the shadow without the original image.java.lang.StringtoString()-
从类继承的方法 org.meteoinfo.image.filter.AbstractBufferedImageOp
clone, createCompatibleDestImage, getRenderingHints, getRGB, setRGB
-
-
-
-
构造器详细资料
-
ShadowFilter
public ShadowFilter()
Construct a ShadowFilter.
-
ShadowFilter
public ShadowFilter(float radius, float xOffset, float yOffset, float opacity)Construct a ShadowFilter.- 参数:
radius- the radius of the shadowxOffset- the X offset of the shadowyOffset- the Y offset of the shadowopacity- the opacity of the shadow
-
-
方法详细资料
-
setAngle
public void setAngle(float angle)
Specifies the angle of the shadow.- 参数:
angle- the angle of the shadow.- 另请参阅:
getAngle()
-
getAngle
public float getAngle()
Returns the angle of the shadow.- 返回:
- the angle of the shadow.
- 另请参阅:
setAngle(float)
-
setDistance
public void setDistance(float distance)
Set the distance of the shadow.- 参数:
distance- the distance.- 另请参阅:
getDistance()
-
getDistance
public float getDistance()
Get the distance of the shadow.- 返回:
- the distance.
- 另请参阅:
setDistance(float)
-
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.- 参数:
radius- the radius of the blur in pixels.- 另请参阅:
getRadius()
-
getRadius
public float getRadius()
Get the radius of the kernel.- 返回:
- the radius
- 另请参阅:
setRadius(float)
-
setOpacity
public void setOpacity(float opacity)
Set the opacity of the shadow.- 参数:
opacity- the opacity.- 另请参阅:
getOpacity()
-
getOpacity
public float getOpacity()
Get the opacity of the shadow.- 返回:
- the opacity.
- 另请参阅:
setOpacity(float)
-
setShadowColor
public void setShadowColor(int shadowColor)
Set the color of the shadow.- 参数:
shadowColor- the color.- 另请参阅:
getShadowColor()
-
getShadowColor
public int getShadowColor()
Get the color of the shadow.- 返回:
- the color.
- 另请参阅:
setShadowColor(int)
-
setAddMargins
public void setAddMargins(boolean addMargins)
Set whether to increase the size of the output image to accomodate the shadow.- 参数:
addMargins- true to add margins.- 另请参阅:
getAddMargins()
-
getAddMargins
public boolean getAddMargins()
Get whether to increase the size of the output image to accomodate the shadow.- 返回:
- true to add margins.
- 另请参阅:
setAddMargins(boolean)
-
setShadowOnly
public void setShadowOnly(boolean shadowOnly)
Set whether to only draw the shadow without the original image.- 参数:
shadowOnly- true to only draw the shadow.- 另请参阅:
getShadowOnly()
-
getShadowOnly
public boolean getShadowOnly()
Get whether to only draw the shadow without the original image.- 返回:
- true to only draw the shadow.
- 另请参阅:
setShadowOnly(boolean)
-
getBounds2D
public java.awt.geom.Rectangle2D getBounds2D(java.awt.image.BufferedImage src)
- 指定者:
getBounds2D在接口中java.awt.image.BufferedImageOp- 覆盖:
getBounds2D在类中AbstractBufferedImageOp
-
getPoint2D
public java.awt.geom.Point2D getPoint2D(java.awt.geom.Point2D srcPt, java.awt.geom.Point2D dstPt)- 指定者:
getPoint2D在接口中java.awt.image.BufferedImageOp- 覆盖:
getPoint2D在类中AbstractBufferedImageOp
-
filter
public java.awt.image.BufferedImage filter(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)
-
toString
public java.lang.String toString()
- 覆盖:
toString在类中java.lang.Object
-
-