public class WarpFilter extends WholeImageFilter
Modifier and Type | Field and Description |
---|---|
private WarpGrid |
destGrid |
private int |
frames |
private BufferedImage |
morphImage |
private WarpGrid |
sourceGrid |
private float |
time |
originalSpace, transformedSpace
Constructor and Description |
---|
WarpFilter()
Create a WarpFilter.
|
WarpFilter(WarpGrid sourceGrid,
WarpGrid destGrid)
Create a WarpFilter with two warp grids.
|
Modifier and Type | Method and Description |
---|---|
void |
crossDissolve(int[] pixels1,
int[] pixels2,
int width,
int height,
float t) |
protected int[] |
filterPixels(int width,
int height,
int[] inPixels,
Rectangle transformedSpace)
Actually filter the pixels.
|
WarpGrid |
getDestGrid()
Get the destination warp grid.
|
int |
getFrames() |
BufferedImage |
getMorphImage() |
WarpGrid |
getSourceGrid()
Get the source warp grid.
|
float |
getTime() |
void |
morph(int[] srcPixels,
int[] destPixels,
int[] outPixels,
WarpGrid srcGrid,
WarpGrid destGrid,
int width,
int height,
float t) |
void |
setDestGrid(WarpGrid destGrid)
Set the destination warp grid.
|
void |
setFrames(int frames) |
void |
setMorphImage(BufferedImage morphImage)
For morphing, sets the image we're morphing to.
|
void |
setSourceGrid(WarpGrid sourceGrid)
Set the source warp grid.
|
void |
setTime(float time) |
String |
toString() |
protected void |
transformSpace(Rectangle r)
Calculate output bounds for given input bounds.
|
filter
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
private WarpGrid sourceGrid
private int frames
private BufferedImage morphImage
private float time
public WarpFilter()
public WarpFilter(WarpGrid sourceGrid, WarpGrid destGrid)
sourceGrid
- the source griddestGrid
- the destination gridpublic void setSourceGrid(WarpGrid sourceGrid)
sourceGrid
- the source gridgetSourceGrid()
public WarpGrid getSourceGrid()
setSourceGrid(com.jhlabs.image.WarpGrid)
public void setDestGrid(WarpGrid destGrid)
destGrid
- the destination gridgetDestGrid()
public WarpGrid getDestGrid()
setDestGrid(com.jhlabs.image.WarpGrid)
public void setFrames(int frames)
public int getFrames()
public void setMorphImage(BufferedImage morphImage)
public BufferedImage getMorphImage()
public void setTime(float time)
public float getTime()
protected void transformSpace(Rectangle r)
WholeImageFilter
transformSpace
in class WholeImageFilter
r
- input and output rectangleprotected int[] filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace)
WholeImageFilter
filterPixels
in class WholeImageFilter
width
- the image widthheight
- the image heightinPixels
- the image pixelstransformedSpace
- the output boundspublic void morph(int[] srcPixels, int[] destPixels, int[] outPixels, WarpGrid srcGrid, WarpGrid destGrid, int width, int height, float t)
public void crossDissolve(int[] pixels1, int[] pixels2, int width, int height, float t)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses