org.apache.tools.ant.types.optional.image

Class Rotate

public class Rotate extends TransformOperation implements DrawOperation

ImageOperation to rotate an image by a certain degree

See Also: Image

Field Summary
protected floatangle
Method Summary
PlanarImageexecuteDrawOperation()
Performs the image rotation when being handled as a DrawOperation.
PlanarImageexecuteTransformOperation(PlanarImage image)
Performs the image rotation when being handled as a TransformOperation.
PlanarImageperformRotate(PlanarImage image)
Rotate an image.
voidsetAngle(String ang)
Sets the angle of rotation in degrees.

Field Detail

angle

protected float angle

Method Detail

executeDrawOperation

public PlanarImage 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.

Returns: the image.

executeTransformOperation

public PlanarImage executeTransformOperation(PlanarImage image)
Performs the image rotation when being handled as a TransformOperation.

Parameters: image The image to perform the transformation on.

Returns: the transformed image.

performRotate

public PlanarImage performRotate(PlanarImage image)
Rotate an image.

Parameters: image the image to rotate.

Returns: the rotated image.

setAngle

public void setAngle(String ang)
Sets the angle of rotation in degrees.

Parameters: ang The angle at which to rotate the image