类 BrushedMetalFilter

    • 构造器详细资料

      • BrushedMetalFilter

        public BrushedMetalFilter()
        Constructs a BrushedMetalFilter object.
      • BrushedMetalFilter

        public BrushedMetalFilter​(int color,
                                  int radius,
                                  float amount,
                                  boolean monochrome,
                                  float shine)
        Constructs a BrushedMetalFilter object.
        参数:
        color - an int specifying the metal color
        radius - an int specifying the blur size
        amount - a float specifying the amount of texture
        monochrome - a boolean -- true for monochrome texture
        shine - a float specifying the shine to add
    • 方法详细资料

      • blur

        public void blur​(int[] in,
                         int[] out,
                         int width,
                         int radius)
      • setRadius

        public void setRadius​(int radius)
        Set the horizontal size of the blur.
        参数:
        radius - the radius of the blur in the horizontal direction
        另请参阅:
        getRadius()
      • getRadius

        public int getRadius()
        Get the horizontal size of the blur.
        返回:
        the radius of the blur in the horizontal direction
        另请参阅:
        setRadius(int)
      • setAmount

        public void setAmount​(float amount)
        Set the amount of noise to add in the range 0..1.
        参数:
        amount - the amount of noise
        另请参阅:
        getAmount()
      • getAmount

        public float getAmount()
        Get the amount of noise to add.
        返回:
        the amount of noise
        另请参阅:
        setAmount(float)
      • setShine

        public void setShine​(float shine)
        Set the amount of shine to add to the range 0..1.
        参数:
        shine - the amount of shine
        另请参阅:
        getShine()
      • getShine

        public float getShine()
        Get the amount of shine to add in the range 0..1.
        返回:
        the amount of shine
        另请参阅:
        setShine(float)
      • setColor

        public void setColor​(int color)
        Set the color of the metal.
        参数:
        color - the color in ARGB form
        另请参阅:
        getColor()
      • getColor

        public int getColor()
        Get the color of the metal.
        返回:
        the color in ARGB form
        另请参阅:
        setColor(int)
      • setMonochrome

        public void setMonochrome​(boolean monochrome)
        Set the type of noise to add.
        参数:
        monochrome - true for monochrome noise
        另请参阅:
        getMonochrome()
      • getMonochrome

        public boolean getMonochrome()
        Get the type of noise to add.
        返回:
        true for monochrome noise
        另请参阅:
        setMonochrome(boolean)