类 CausticsFilter

  • 所有已实现的接口:
    BufferedImageOp, Cloneable

    public class CausticsFilter
    extends WholeImageFilter
    A filter which simulates underwater caustics. This can be animated to get a bottom-of-the-swimming-pool effect.
    • 构造器详细资料

      • CausticsFilter

        public CausticsFilter()
    • 方法详细资料

      • setScale

        public void setScale​(float scale)
        Specifies the scale of the texture.
        参数:
        scale - the scale of the texture.
        另请参阅:
        getScale()
      • getScale

        public float getScale()
        Returns the scale of the texture.
        返回:
        the scale of the texture.
        另请参阅:
        setScale(float)
      • setBrightness

        public void setBrightness​(int brightness)
        Set the brightness.
        参数:
        brightness - the brightness.
        另请参阅:
        getBrightness()
      • getBrightness

        public int getBrightness()
        Get the brightness.
        返回:
        the brightness.
        另请参阅:
        setBrightness(int)
      • setTurbulence

        public void setTurbulence​(float turbulence)
        Specifies the turbulence of the texture.
        参数:
        turbulence - the turbulence of the texture.
        另请参阅:
        getTurbulence()
      • getTurbulence

        public float getTurbulence()
        Returns the turbulence of the effect.
        返回:
        the turbulence of the effect.
        另请参阅:
        setTurbulence(float)
      • setAmount

        public void setAmount​(float amount)
        Set the amount of effect.
        参数:
        amount - the amount
        另请参阅:
        getAmount()
      • getAmount

        public float getAmount()
        Get the amount of effect.
        返回:
        the amount
        另请参阅:
        setAmount(float)
      • setDispersion

        public void setDispersion​(float dispersion)
        Set the dispersion.
        参数:
        dispersion - the dispersion min-value 0 max-value 1
        另请参阅:
        getDispersion()
      • getDispersion

        public float getDispersion()
        Get the dispersion.
        返回:
        the dispersion
        另请参阅:
        setDispersion(float)
      • setTime

        public void setTime​(float time)
        Set the time. Use this to animate the effect.
        参数:
        time - the time
        另请参阅:
        getTime()
      • getTime

        public float getTime()
        Set the time.
        返回:
        the time
        另请参阅:
        setTime(float)
      • setSamples

        public void setSamples​(int samples)
        Set the number of samples per pixel. More samples means better quality, but slower rendering.
        参数:
        samples - the number of samples
        另请参阅:
        getSamples()
      • getSamples

        public int getSamples()
        Get the number of samples per pixel.
        返回:
        the number of samples
        另请参阅:
        setSamples(int)
      • setBgColor

        public void setBgColor​(int c)
        Set the background color.
        参数:
        c - the color
        另请参阅:
        getBgColor()
      • getBgColor

        public int getBgColor()
        Get the background color.
        返回:
        the color
        另请参阅:
        setBgColor(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