类 VariableBlurFilter

  • 所有已实现的接口:
    java.awt.image.BufferedImageOp, java.lang.Cloneable

    public class VariableBlurFilter
    extends AbstractBufferedImageOp
    A filter which performs a box blur with a different blur radius at each pixel. The radius can either be specified by providing a blur mask image or by overriding the blurRadiusAt method.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void blur​(int[] in, int[] out, int width, int height, int radius, int pass)  
      protected float blurRadiusAt​(int x, int y, int width, int height)
      Override this to get a different blur radius at eahc point.
      java.awt.image.BufferedImage createCompatibleDestImage​(java.awt.image.BufferedImage src, java.awt.image.ColorModel dstCM)  
      java.awt.image.BufferedImage filter​(java.awt.image.BufferedImage src, java.awt.image.BufferedImage dst)  
      java.awt.image.BufferedImage getBlurMask()
      Get the mask used to give the amount of blur at each point.
      java.awt.geom.Rectangle2D getBounds2D​(java.awt.image.BufferedImage src)  
      int getHRadius()
      Get the horizontal size of the blur.
      int getIterations()
      Get the number of iterations the blur is performed.
      java.awt.geom.Point2D getPoint2D​(java.awt.geom.Point2D srcPt, java.awt.geom.Point2D dstPt)  
      boolean getPremultiplyAlpha()
      Get whether to premultiply the alpha channel.
      int getRadius()
      Get the radius of the effect.
      java.awt.RenderingHints getRenderingHints()  
      int getVRadius()
      Get the vertical size of the blur.
      void setBlurMask​(java.awt.image.BufferedImage blurMask)
      Set the mask used to give the amount of blur at each point.
      void setHRadius​(int hRadius)
      Set the horizontal size of the blur.
      void setIterations​(int iterations)
      Set the number of iterations the blur is performed.
      void setPremultiplyAlpha​(boolean premultiplyAlpha)
      Set whether to premultiply the alpha channel.
      void setRadius​(int radius)
      Set the radius of the effect.
      void setVRadius​(int vRadius)
      Set the vertical size of the blur.
      java.lang.String toString()  
      • 从类继承的方法 java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 构造器详细资料

      • VariableBlurFilter

        public VariableBlurFilter()
    • 方法详细资料

      • setPremultiplyAlpha

        public void setPremultiplyAlpha​(boolean premultiplyAlpha)
        Set whether to premultiply the alpha channel.
        参数:
        premultiplyAlpha - true to premultiply the alpha
        另请参阅:
        getPremultiplyAlpha()
      • getPremultiplyAlpha

        public boolean getPremultiplyAlpha()
        Get whether to premultiply the alpha channel.
        返回:
        true to premultiply the alpha
        另请参阅:
        setPremultiplyAlpha(boolean)
      • filter

        public java.awt.image.BufferedImage filter​(java.awt.image.BufferedImage src,
                                                   java.awt.image.BufferedImage dst)
      • createCompatibleDestImage

        public java.awt.image.BufferedImage createCompatibleDestImage​(java.awt.image.BufferedImage src,
                                                                      java.awt.image.ColorModel dstCM)
        指定者:
        createCompatibleDestImage 在接口中 java.awt.image.BufferedImageOp
        覆盖:
        createCompatibleDestImage 在类中 AbstractBufferedImageOp
      • 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
      • getRenderingHints

        public java.awt.RenderingHints getRenderingHints()
        指定者:
        getRenderingHints 在接口中 java.awt.image.BufferedImageOp
        覆盖:
        getRenderingHints 在类中 AbstractBufferedImageOp
      • blur

        public void blur​(int[] in,
                         int[] out,
                         int width,
                         int height,
                         int radius,
                         int pass)
      • blurRadiusAt

        protected float blurRadiusAt​(int x,
                                     int y,
                                     int width,
                                     int height)
        Override this to get a different blur radius at eahc point.
        参数:
        x - the x coordinate
        y - the y coordinate
        width - the width of the image
        height - the height of the image
        返回:
        the blur radius
      • setHRadius

        public void setHRadius​(int hRadius)
        Set the horizontal size of the blur.
        参数:
        hRadius - the radius of the blur in the horizontal direction min-value 0
        另请参阅:
        getHRadius()
      • getHRadius

        public int getHRadius()
        Get the horizontal size of the blur.
        返回:
        the radius of the blur in the horizontal direction
        另请参阅:
        setHRadius(int)
      • setVRadius

        public void setVRadius​(int vRadius)
        Set the vertical size of the blur.
        参数:
        vRadius - the radius of the blur in the vertical direction min-value 0
        另请参阅:
        getVRadius()
      • getVRadius

        public int getVRadius()
        Get the vertical size of the blur.
        返回:
        the radius of the blur in the vertical direction
        另请参阅:
        setVRadius(int)
      • setRadius

        public void setRadius​(int radius)
        Set the radius of the effect.
        参数:
        radius - the radius min-value 0
        另请参阅:
        getRadius()
      • getRadius

        public int getRadius()
        Get the radius of the effect.
        返回:
        the radius
        另请参阅:
        setRadius(int)
      • setIterations

        public void setIterations​(int iterations)
        Set the number of iterations the blur is performed.
        参数:
        iterations - the number of iterations min-value 0
        另请参阅:
        getIterations()
      • getIterations

        public int getIterations()
        Get the number of iterations the blur is performed.
        返回:
        the number of iterations
        另请参阅:
        setIterations(int)
      • setBlurMask

        public void setBlurMask​(java.awt.image.BufferedImage blurMask)
        Set the mask used to give the amount of blur at each point.
        参数:
        blurMask - the mask
        另请参阅:
        getBlurMask()
      • toString

        public java.lang.String toString()
        覆盖:
        toString 在类中 java.lang.Object