类 DiffusionFilter

    • 构造器详细资料

      • DiffusionFilter

        public DiffusionFilter()
        Construct a DiffusionFilter.
    • 方法详细资料

      • setSerpentine

        public void setSerpentine​(boolean serpentine)
        Set whether to use a serpentine pattern for return or not. This can reduce 'avalanche' artifacts in the output.
        参数:
        serpentine - true to use serpentine pattern
        另请参阅:
        getSerpentine()
      • getSerpentine

        public boolean getSerpentine()
        Return the serpentine setting.
        返回:
        the current setting
        另请参阅:
        setSerpentine(boolean)
      • setColorDither

        public void setColorDither​(boolean colorDither)
        Set whether to use a color dither.
        参数:
        colorDither - true to use a color dither
        另请参阅:
        getColorDither()
      • getColorDither

        public boolean getColorDither()
        Get whether to use a color dither.
        返回:
        true to use a color dither
        另请参阅:
        setColorDither(boolean)
      • setMatrix

        public void setMatrix​(int[] matrix)
        Set the dither matrix.
        参数:
        matrix - the dither matrix
        另请参阅:
        getMatrix()
      • getMatrix

        public int[] getMatrix()
        Get the dither matrix.
        返回:
        the dither matrix
        另请参阅:
        setMatrix(int[])
      • setLevels

        public void setLevels​(int levels)
        Set the number of dither levels.
        参数:
        levels - the number of levels
        另请参阅:
        getLevels()
      • getLevels

        public int getLevels()
        Get the number of dither levels.
        返回:
        the number of levels
        另请参阅:
        setLevels(int)
      • filterPixels

        protected int[] filterPixels​(int width,
                                     int height,
                                     int[] inPixels,
                                     Rectangle transformedSpace)
        从类复制的说明: WholeImageFilter
        Actually filter the pixels.
        指定者:
        filterPixels 在类中 WholeImageFilter
        参数:
        width - the image width
        height - the image height
        inPixels - the image pixels
        transformedSpace - the output bounds
        返回:
        the output pixels