Rotate (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.types.optional.imageio, class: Rotate

Package org.apache.tools.ant.types.optional.imageio

# Class Rotate

java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.optional.imageio.ImageOperation
org.apache.tools.ant.types.optional.imageio.TransformOperation
org.apache.tools.ant.types.optional.imageio.Rotate

All Implemented Interfaces:
  `Cloneable`, `DrawOperation`

public class Rotate extends TransformOperation implements DrawOperation
ImageOperation to rotate an image by a certain degree

See Also:
  - `ImageIOTask`

- ## Field Summary

  ### Fields inherited from class org.apache.tools.ant.types.optional.imageio.ImageOperation

  `instructions`

  ### Fields inherited from class org.apache.tools.ant.types.DataType

  `checked, ref`

  ### Fields inherited from class org.apache.tools.ant.ProjectComponent

  `description, location, project`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Rotate()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `BufferedImage`
  `executeDrawOperation()`
  Performs the image rotation when being handled as a DrawOperation.
  `BufferedImage`
  `executeTransformOperation(BufferedImage image)`
  Performs the image rotation when being handled as a TransformOperation.
  `BufferedImage`
  `performRotate(BufferedImage image)`
  Rotate an image.
  `void`
  `setAngle(String ang)`
  Sets the angle of rotation in degrees.

  ### Methods inherited from class org.apache.tools.ant.types.optional.imageio.ImageOperation

  `addDraw, addRotate, addScale`

  ### Methods inherited from class org.apache.tools.ant.types.DataType

  `checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, setRefid, tooManyAttributes, toString`

  ### Methods inherited from class org.apache.tools.ant.ProjectComponent

  `getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject`

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Rotate

    public Rotate()

- ## Method Details

  - ### setAngle

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

  - ### performRotate

    public BufferedImage performRotate(BufferedImage image)
    Rotate an image.
    Parameters:
      `image` - the image to rotate.
    Returns:
      the rotated image.

  - ### executeTransformOperation

    public BufferedImage executeTransformOperation(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 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.