类 TwirlFilter

  • 所有已实现的接口:
    java.awt.image.BufferedImageOp, java.lang.Cloneable

    public class TwirlFilter
    extends TransformFilter
    A Filter which distorts an image by twisting it from the centre out. The twisting is centred at the centre of the image and extends out to the smallest of the width and height. Pixels outside this radius are unaffected.
    • 构造器详细资料

      • TwirlFilter

        public TwirlFilter()
        Construct a TwirlFilter with no distortion.
    • 方法详细资料

      • setAngle

        public void setAngle​(float angle)
        Set the angle of twirl in radians. 0 means no distortion.
        参数:
        angle - the angle of twirl. This is the angle by which pixels at the nearest edge of the image will move.
        另请参阅:
        getAngle()
      • getAngle

        public float getAngle()
        Get the angle of twist.
        返回:
        the angle in radians.
        另请参阅:
        setAngle(float)
      • setCentreX

        public void setCentreX​(float centreX)
        Set the centre of the effect in the X direction as a proportion of the image size.
        参数:
        centreX - the center
        另请参阅:
        getCentreX()
      • getCentreX

        public float getCentreX()
        Get the centre of the effect in the X direction as a proportion of the image size.
        返回:
        the center
        另请参阅:
        setCentreX(float)
      • setCentreY

        public void setCentreY​(float centreY)
        Set the centre of the effect in the Y direction as a proportion of the image size.
        参数:
        centreY - the center
        另请参阅:
        getCentreY()
      • getCentreY

        public float getCentreY()
        Get the centre of the effect in the Y direction as a proportion of the image size.
        返回:
        the center
        另请参阅:
        setCentreY(float)
      • setCentre

        public void setCentre​(java.awt.geom.Point2D centre)
        Set the centre of the effect as a proportion of the image size.
        参数:
        centre - the center
        另请参阅:
        getCentre()
      • getCentre

        public java.awt.geom.Point2D getCentre()
        Get the centre of the effect as a proportion of the image size.
        返回:
        the center
        另请参阅:
        setCentre(java.awt.geom.Point2D)
      • setRadius

        public void setRadius​(float radius)
        Set the radius of the effect.
        参数:
        radius - the radius min-value 0
        另请参阅:
        getRadius()
      • getRadius

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

        public java.awt.image.BufferedImage filter​(java.awt.image.BufferedImage src,
                                                   java.awt.image.BufferedImage dst)
        指定者:
        filter 在接口中 java.awt.image.BufferedImageOp
        覆盖:
        filter 在类中 TransformFilter
      • transformInverse

        protected void transformInverse​(int x,
                                        int y,
                                        float[] out)
        从类复制的说明: TransformFilter
        Inverse transform a point. This method needs to be overriden by all subclasses.
        指定者:
        transformInverse 在类中 TransformFilter
        参数:
        x - the X position of the pixel in the output image
        y - the Y position of the pixel in the output image
        out - the position of the pixel in the input image
      • toString

        public java.lang.String toString()
        覆盖:
        toString 在类中 java.lang.Object