类 GaussianFilter

    • 字段详细资料

      • radius

        protected float radius
        The blur radius.
      • kernel

        protected Kernel kernel
        The convolution kernel.
    • 构造器详细资料

      • GaussianFilter

        public GaussianFilter()
        Construct a Gaussian filter.
      • GaussianFilter

        public GaussianFilter​(float radius)
        Construct a Gaussian filter.
        参数:
        radius - blur radius in pixels
    • 方法详细资料

      • 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. min-value 0 max-value 100+
        另请参阅:
        getRadius()
      • getRadius

        public float getRadius()
        Get the radius of the kernel.
        返回:
        the radius
        另请参阅:
        setRadius(float)
      • convolveAndTranspose

        public static void convolveAndTranspose​(Kernel kernel,
                                                int[] inPixels,
                                                int[] outPixels,
                                                int width,
                                                int height,
                                                boolean alpha,
                                                boolean premultiply,
                                                boolean unpremultiply,
                                                int edgeAction)
        Blur and transpose a block of ARGB pixels.
        参数:
        kernel - the blur kernel
        inPixels - the input pixels
        outPixels - the output pixels
        width - the width of the pixel array
        height - the height of the pixel array
        alpha - whether to blur the alpha channel
        edgeAction - what to do at the edges
      • makeKernel

        public static Kernel makeKernel​(float radius)
        Make a Gaussian blur kernel.
        参数:
        radius - the blur radius
        返回:
        the kernel