Class RotateFilter

All Implemented Interfaces:
BufferedImageOp, 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 Details

    • 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 Details

    • setAngle

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

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

      protected void transformSpace(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 String toString()
      Overrides:
      toString in class Object