com.jhlabs.image

Class FlipFilter

Implemented Interfaces:
BufferedImageOp, Cloneable

public class FlipFilter
extends AbstractBufferedImageOp

A filter which flips images or rotates by multiples of 90 degrees.

Field Summary

static int
FLIP_180
Rotate the image 180 degrees.
static int
FLIP_90CCW
Rotate the image 90 degrees counter-clockwise.
static int
FLIP_90CW
Rotate the image 90 degrees clockwise.
static int
FLIP_H
Flip the image horizontally.
static int
FLIP_HV
Flip the image horizontally and vertically.
static int
FLIP_V
Flip the image vertically.

Constructor Summary

FlipFilter()
Construct a FlipFilter which flips horizontally and vertically.
FlipFilter(int operation)
Construct a FlipFilter.

Method Summary

BufferedImage
filter(BufferedImage src, BufferedImage dst)
int
getOperation()
Get the filter operation.
void
setOperation(int operation)
Set the filter operation.
String
toString()

Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp

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

Field Details

FLIP_180

public static final int FLIP_180
Rotate the image 180 degrees.
Field Value:
6

FLIP_90CCW

public static final int FLIP_90CCW
Rotate the image 90 degrees counter-clockwise.
Field Value:
5

FLIP_90CW

public static final int FLIP_90CW
Rotate the image 90 degrees clockwise.
Field Value:
4

FLIP_H

public static final int FLIP_H
Flip the image horizontally.
Field Value:
1

FLIP_HV

public static final int FLIP_HV
Flip the image horizontally and vertically.
Field Value:
3

FLIP_V

public static final int FLIP_V
Flip the image vertically.
Field Value:
2

Constructor Details

FlipFilter

public FlipFilter()
Construct a FlipFilter which flips horizontally and vertically.

FlipFilter

public FlipFilter(int operation)
Construct a FlipFilter.
Parameters:
operation - the filter operation

Method Details

filter

public BufferedImage filter(BufferedImage src,
                            BufferedImage dst)

getOperation

public int getOperation()
Get the filter operation.
Returns:
the filter operation

setOperation

public void setOperation(int operation)
Set the filter operation.
Parameters:
operation - the filter operation

toString

public String toString()