Class RotateFilter

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

    public class RotateFilter
    extends TransformFilter
    A filter which rotates an image. These days this is easier done with Java2D, but this filter remains.
    • Constructor Detail

      • RotateFilter

        public RotateFilter()
        Construct a RotateFilter.
      • RotateFilter

        public RotateFilter​(float angle)
        Construct a RotateFilter.
        Parameters:
        angle - the angle to rotate
      • RotateFilter

        public RotateFilter​(float angle,
                            boolean resize)
        Construct a RotateFilter.
        Parameters:
        angle - the angle to rotate
        resize - true if the output image should be resized
    • Method Detail

      • setAngle

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

        public float getAngle()
        Returns the angle of rotation.
        Returns:
        the angle of rotation.
        See Also:
        setAngle(float)
      • transformSpace

        protected void transformSpace​(java.awt.Rectangle rect)
        Description copied from class: TransformFilter
        Forward transform a rectangle. Used to determine the size of the output image.
        Overrides:
        transformSpace in class TransformFilter
        Parameters:
        rect - the rectangle to transform
      • transformInverse

        protected void transformInverse​(int x,
                                        int y,
                                        float[] out)
        Description copied from class: TransformFilter
        Inverse transform a point. This method needs to be overriden by all subclasses.
        Specified by:
        transformInverse in class TransformFilter
        Parameters:
        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()
        Overrides:
        toString in class java.lang.Object