类 TransformFilter

    • 字段详细资料

      • ZERO

        public static final int ZERO
        Treat pixels off the edge as zero.
        另请参阅:
        常量字段值
      • CLAMP

        public static final int CLAMP
        Clamp pixels to the image edges.
        另请参阅:
        常量字段值
      • WRAP

        public static final int WRAP
        Wrap pixels off the edge onto the oppsoite edge.
        另请参阅:
        常量字段值
      • RGB_CLAMP

        public static final int RGB_CLAMP
        Clamp pixels RGB to the image edges, but zero the alpha. This prevents gray borders on your image.
        另请参阅:
        常量字段值
      • NEAREST_NEIGHBOUR

        public static final int NEAREST_NEIGHBOUR
        Use nearest-neighbout interpolation.
        另请参阅:
        常量字段值
      • BILINEAR

        public static final int BILINEAR
        Use bilinear interpolation.
        另请参阅:
        常量字段值
      • edgeAction

        protected int edgeAction
        The action to take for pixels off the image edge.
      • interpolation

        protected int interpolation
        The type of interpolation to use.
      • transformedSpace

        protected Rectangle transformedSpace
        The output image rectangle.
      • originalSpace

        protected Rectangle originalSpace
        The input image rectangle.
    • 构造器详细资料

      • TransformFilter

        public TransformFilter()
    • 方法详细资料

      • setEdgeAction

        public void setEdgeAction​(int edgeAction)
        Set the action to perform for pixels off the edge of the image.
        参数:
        edgeAction - one of ZERO, CLAMP or WRAP
        另请参阅:
        getEdgeAction()
      • getEdgeAction

        public int getEdgeAction()
        Get the action to perform for pixels off the edge of the image.
        返回:
        one of ZERO, CLAMP or WRAP
        另请参阅:
        setEdgeAction(int)
      • setInterpolation

        public void setInterpolation​(int interpolation)
        Set the type of interpolation to perform.
        参数:
        interpolation - one of NEAREST_NEIGHBOUR or BILINEAR
        另请参阅:
        getInterpolation()
      • getInterpolation

        public int getInterpolation()
        Get the type of interpolation to perform.
        返回:
        one of NEAREST_NEIGHBOUR or BILINEAR
        另请参阅:
        setInterpolation(int)
      • transformInverse

        protected abstract void transformInverse​(int x,
                                                 int y,
                                                 float[] out)
        Inverse transform a point. This method needs to be overriden by all subclasses.
        参数:
        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
      • transformSpace

        protected void transformSpace​(Rectangle rect)
        Forward transform a rectangle. Used to determine the size of the output image.
        参数:
        rect - the rectangle to transform