Class MotionBlurFilter

  • All Implemented Interfaces:
    java.awt.image.BufferedImageOp, java.lang.Cloneable

    public class MotionBlurFilter
    extends AbstractBufferedImageOp
    A filter which produces motion blur the slow, but higher-quality way.
    • Constructor Detail

      • MotionBlurFilter

        public MotionBlurFilter()
        Construct a MotionBlurFilter.
      • MotionBlurFilter

        public MotionBlurFilter​(float distance,
                                float angle,
                                float rotation,
                                float zoom)
        Construct a MotionBlurFilter.
        Parameters:
        distance - the distance of blur.
        angle - the angle of blur.
        rotation - the angle of rotation.
        zoom - the zoom factor.
    • Method Detail

      • setAngle

        public void setAngle​(float angle)
        Specifies the angle of blur.
        Parameters:
        angle - the angle of blur.
        See Also:
        getAngle()
      • getAngle

        public float getAngle()
        Returns the angle of blur.
        Returns:
        the angle of blur.
        See Also:
        setAngle(float)
      • setDistance

        public void setDistance​(float distance)
        Set the distance of blur.
        Parameters:
        distance - the distance of blur.
        See Also:
        getDistance()
      • getDistance

        public float getDistance()
        Get the distance of blur.
        Returns:
        the distance of blur.
        See Also:
        setDistance(float)
      • setRotation

        public void setRotation​(float rotation)
        Set the blur rotation.
        Parameters:
        rotation - the angle of rotation.
        See Also:
        getRotation()
      • getRotation

        public float getRotation()
        Get the blur rotation.
        Returns:
        the angle of rotation.
        See Also:
        setRotation(float)
      • setZoom

        public void setZoom​(float zoom)
        Set the blur zoom.
        Parameters:
        zoom - the zoom factor.
        See Also:
        getZoom()
      • getZoom

        public float getZoom()
        Get the blur zoom.
        Returns:
        the zoom factor.
        See Also:
        setZoom(float)
      • setWrapEdges

        public void setWrapEdges​(boolean wrapEdges)
        Set whether to wrap at the image edges.
        Parameters:
        wrapEdges - true if it should wrap.
        See Also:
        getWrapEdges()
      • getWrapEdges

        public boolean getWrapEdges()
        Get whether to wrap at the image edges.
        Returns:
        true if it should wrap.
        See Also:
        setWrapEdges(boolean)
      • setPremultiplyAlpha

        public void setPremultiplyAlpha​(boolean premultiplyAlpha)
        Set whether to premultiply the alpha channel.
        Parameters:
        premultiplyAlpha - true to premultiply the alpha
        See Also:
        getPremultiplyAlpha()
      • getPremultiplyAlpha

        public boolean getPremultiplyAlpha()
        Get whether to premultiply the alpha channel.
        Returns:
        true to premultiply the alpha
        See Also:
        setPremultiplyAlpha(boolean)
      • filter

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object