BufferedImageOp, CloneableCircleFilter, CurlFilter, DiffuseFilter, DisplaceFilter, FieldWarpFilter, KaleidoscopeFilter, MapFilter, MarbleFilter, OffsetFilter, PerspectiveFilter, PinchFilter, PolarFilter, RippleFilter, RotateFilter, ShearFilter, SphereFilter, SwimFilter, TwirlFilter, WaterFilterpublic abstract class TransformFilter extends AbstractBufferedImageOp
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
BILINEAR |
Use bilinear interpolation.
|
static int |
CLAMP |
Clamp pixels to the image edges.
|
protected int |
edgeAction |
The action to take for pixels off the image edge.
|
protected int |
interpolation |
The type of interpolation to use.
|
static int |
NEAREST_NEIGHBOUR |
Use nearest-neighbout interpolation.
|
protected Rectangle |
originalSpace |
The input image rectangle.
|
static int |
RGB_CLAMP |
Clamp pixels RGB to the image edges, but zero the alpha.
|
protected Rectangle |
transformedSpace |
The output image rectangle.
|
static int |
WRAP |
Wrap pixels off the edge onto the oppsoite edge.
|
static int |
ZERO |
Treat pixels off the edge as zero.
|
| 构造器 | 说明 |
|---|---|
TransformFilter() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
BufferedImage |
filter(BufferedImage src,
BufferedImage dst) |
|
protected BufferedImage |
filterPixelsNN(BufferedImage dst,
int width,
int height,
int[] inPixels,
Rectangle transformedSpace) |
|
int |
getEdgeAction() |
Get the action to perform for pixels off the edge of the image.
|
int |
getInterpolation() |
Get the type of interpolation to perform.
|
void |
setEdgeAction(int edgeAction) |
Set the action to perform for pixels off the edge of the image.
|
void |
setInterpolation(int interpolation) |
Set the type of interpolation to perform.
|
protected abstract void |
transformInverse(int x,
int y,
float[] out) |
Inverse transform a point.
|
protected void |
transformSpace(Rectangle rect) |
Forward transform a rectangle.
|
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGBpublic static final int ZERO
public static final int CLAMP
public static final int WRAP
public static final int RGB_CLAMP
public static final int NEAREST_NEIGHBOUR
public static final int BILINEAR
protected int edgeAction
protected int interpolation
protected Rectangle transformedSpace
protected Rectangle originalSpace
public void setEdgeAction(int edgeAction)
edgeAction - one of ZERO, CLAMP or WRAPgetEdgeAction()public int getEdgeAction()
setEdgeAction(int)public void setInterpolation(int interpolation)
interpolation - one of NEAREST_NEIGHBOUR or BILINEARgetInterpolation()public int getInterpolation()
setInterpolation(int)protected abstract void transformInverse(int x,
int y,
float[] out)
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 imageprotected void transformSpace(Rectangle rect)
rect - the rectangle to transformpublic BufferedImage filter(BufferedImage src, BufferedImage dst)
protected BufferedImage filterPixelsNN(BufferedImage dst, int width, int height, int[] inPixels, Rectangle transformedSpace)
Copyright © 2019. All rights reserved.