Class Rotation


  • public class Rotation
    extends java.lang.Object
    A class containing rotation filters.

    Aside from the three Rotation.Rotators provided as class constants, a Rotation.Rotator which performs a rotation by an arbituary angle can be obtained through the newRotator(double) method.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Rotation.Rotator
      An ImageFilter which applies a rotation to an image.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Rotation()
      This class is not intended to be instantiated.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Rotation.Rotator newRotator​(double angle)
      Creates a new instance of Rotator which rotates an image at the specified angle.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LEFT_90_DEGREES

        public static final Rotation.Rotator LEFT_90_DEGREES
        A Rotator which will rotate a specified image to the left 90 degrees.
      • RIGHT_90_DEGREES

        public static final Rotation.Rotator RIGHT_90_DEGREES
        A Rotator which will rotate a specified image to the right 90 degrees.
      • ROTATE_180_DEGREES

        public static final Rotation.Rotator ROTATE_180_DEGREES
        A Rotator which will rotate a specified image to the 180 degrees.
    • Constructor Detail

      • Rotation

        private Rotation()
        This class is not intended to be instantiated.
    • Method Detail

      • newRotator

        public static Rotation.Rotator newRotator​(double angle)
        Creates a new instance of Rotator which rotates an image at the specified angle.

        When the Rotation.Rotator returned by this method is applied, the image will be rotated clockwise by the specified angle.

        Parameters:
        angle - The angle at which the instance of Rotator is to rotate a image it acts upon.
        Returns:
        An instance of Rotator which will rotate a given image.