public class PolarFilter extends TransformFilter
Modifier and Type | Field and Description |
---|---|
private float |
centreX |
private float |
centreY |
private float |
height |
static int |
INVERT_IN_CIRCLE
Invert the image in a circle.
|
static int |
POLAR_TO_RECT
Convert from polar to rectangular coordinates.
|
private float |
radius |
static int |
RECT_TO_POLAR
Convert from rectangular to polar coordinates.
|
private int |
type |
private float |
width |
BILINEAR, CLAMP, edgeAction, interpolation, NEAREST_NEIGHBOUR, originalSpace, RGB_CLAMP, transformedSpace, WRAP, ZERO
Constructor and Description |
---|
PolarFilter()
Construct a PolarFilter.
|
PolarFilter(int type)
Construct a PolarFilter.
|
Modifier and Type | Method and Description |
---|---|
BufferedImage |
filter(BufferedImage src,
BufferedImage dst) |
int |
getType()
Get the distortion type.
|
void |
setType(int type)
Set the distortion type.
|
private float |
sqr(float x) |
String |
toString() |
protected void |
transformInverse(int x,
int y,
float[] out)
Inverse transform a point.
|
filterPixelsNN, getEdgeAction, getInterpolation, setEdgeAction, setInterpolation, transformSpace
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
public static final int RECT_TO_POLAR
public static final int POLAR_TO_RECT
public static final int INVERT_IN_CIRCLE
private int type
private float width
private float height
private float centreX
private float centreY
private float radius
public PolarFilter()
public PolarFilter(int type)
type
- the distortion typepublic BufferedImage filter(BufferedImage src, BufferedImage dst)
filter
in interface BufferedImageOp
filter
in class TransformFilter
public void setType(int type)
type
- the distortion typegetType()
public int getType()
setType(int)
private float sqr(float x)
protected void transformInverse(int x, int y, float[] out)
TransformFilter
transformInverse
in class TransformFilter
x
- the X position of the pixel in the output imagey
- the Y position of the pixel in the output imageout
- the position of the pixel in the input imageWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses