com.jhlabs.image

Class RotateFilter

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.

Field Summary

Fields inherited from class com.jhlabs.image.TransformFilter

BILINEAR, CLAMP, NEAREST_NEIGHBOUR, RGB_CLAMP, WRAP, ZERO, edgeAction, interpolation, originalSpace, transformedSpace

Constructor Summary

RotateFilter()
Construct a RotateFilter.
RotateFilter(float angle)
Construct a RotateFilter.
RotateFilter(float angle, boolean resize)
Construct a RotateFilter.

Method Summary

float
getAngle()
Returns the angle of rotation.
void
setAngle(float angle)
Specifies the angle of rotation.
String
toString()
protected void
transformInverse(int x, int y, float[] out)
protected void
transformSpace(Rectangle rect)

Methods inherited from class com.jhlabs.image.TransformFilter

filter, filterPixelsNN, getEdgeAction, getInterpolation, setEdgeAction, setInterpolation, transformInverse, transformSpace

Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp

clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRGB, getRenderingHints, setRGB

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

getAngle

public float getAngle()
Returns the angle of rotation.
Returns:
the angle of rotation.

setAngle

public void setAngle(float angle)
Specifies the angle of rotation.
Parameters:
angle - the angle of rotation.

toString

public String toString()

transformInverse

protected void transformInverse(int x,
                                int y,
                                float[] out)
Overrides:
transformInverse in interface TransformFilter

transformSpace

protected void transformSpace(Rectangle rect)
Overrides:
transformSpace in interface TransformFilter