All Implemented Interfaces:
java.lang.Cloneable, DrawOperation

public class Rotate
extends TransformOperation
implements DrawOperation
ImageOperation to rotate an image by a certain degree
See Also:
ImageIOTask
  • Constructor Details

  • Method Details

    • setAngle

      public void setAngle​(java.lang.String ang)
      Sets the angle of rotation in degrees.
      Parameters:
      ang - The angle at which to rotate the image
    • performRotate

      public java.awt.image.BufferedImage performRotate​(java.awt.image.BufferedImage image)
      Rotate an image.
      Parameters:
      image - the image to rotate.
      Returns:
      the rotated image.
    • executeTransformOperation

      public java.awt.image.BufferedImage executeTransformOperation​(java.awt.image.BufferedImage image)
      Performs the image rotation when being handled as a TransformOperation.
      Specified by:
      executeTransformOperation in class TransformOperation
      Parameters:
      image - The image to perform the transformation on.
      Returns:
      the transformed image.
    • executeDrawOperation

      public java.awt.image.BufferedImage executeDrawOperation()
      Performs the image rotation when being handled as a DrawOperation. It absolutely requires that there be a DrawOperation nested beneath it, but only the FIRST DrawOperation will be handled since it can only return ONE image.
      Specified by:
      executeDrawOperation in interface DrawOperation
      Returns:
      the image.