类 DisplaceFilter

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

    public class DisplaceFilter
    extends TransformFilter
    A filter which simulates the appearance of looking through glass. A separate grayscale displacement image is provided and pixels in the source image are displaced according to the gradient of the displacement map.
    • 构造器详细资料

      • DisplaceFilter

        public DisplaceFilter()
    • 方法详细资料

      • setDisplacementMap

        public void setDisplacementMap​(java.awt.image.BufferedImage displacementMap)
        Set the displacement map.
        参数:
        displacementMap - an image representing the displacment at each point
        另请参阅:
        getDisplacementMap()
      • setAmount

        public void setAmount​(float amount)
        Set the amount of distortion.
        参数:
        amount - the amount min-value 0 max-value 1
        另请参阅:
        getAmount()
      • getAmount

        public float getAmount()
        Get the amount of distortion.
        返回:
        the amount
        另请参阅:
        setAmount(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