public class PlasmaFilter extends WholeImageFilter
Modifier and Type | Field and Description |
---|---|
private Colormap |
colormap |
private Random |
randomGenerator |
private float |
scaling |
private long |
seed |
float |
turbulence |
private boolean |
useColormap |
private boolean |
useImageColors |
originalSpace, transformedSpace
Constructor and Description |
---|
PlasmaFilter() |
Modifier and Type | Method and Description |
---|---|
private int |
average(int rgb1,
int rgb2) |
private int |
displace(int rgb,
float amount) |
private boolean |
doPixel(int x1,
int y1,
int x2,
int y2,
int[] pixels,
int stride,
int depth,
int scale) |
protected int[] |
filterPixels(int width,
int height,
int[] inPixels,
Rectangle transformedSpace)
Actually filter the pixels.
|
Colormap |
getColormap()
Get the colormap to be used for the filter.
|
private int |
getPixel(int x,
int y,
int[] pixels,
int stride) |
float |
getScaling() |
int |
getSeed() |
float |
getTurbulence()
Returns the turbulence of the effect.
|
boolean |
getUseColormap() |
boolean |
getUseImageColors() |
private void |
putPixel(int x,
int y,
int rgb,
int[] pixels,
int stride) |
void |
randomize() |
private int |
randomRGB(int[] inPixels,
int x,
int y) |
void |
setColormap(Colormap colormap)
Set the colormap to be used for the filter.
|
void |
setScaling(float scaling) |
void |
setSeed(int seed) |
void |
setTurbulence(float turbulence)
Specifies the turbulence of the texture.
|
void |
setUseColormap(boolean useColormap) |
void |
setUseImageColors(boolean useImageColors) |
String |
toString() |
filter, transformSpace
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
public float turbulence
private float scaling
private Random randomGenerator
private long seed
private boolean useColormap
private boolean useImageColors
public PlasmaFilter()
public void setTurbulence(float turbulence)
turbulence
- the turbulence of the texture.getTurbulence()
public float getTurbulence()
setTurbulence(float)
public void setScaling(float scaling)
public float getScaling()
public void setColormap(Colormap colormap)
colormap
- the colormapgetColormap()
public Colormap getColormap()
setColormap(com.jhlabs.image.Colormap)
public void setUseColormap(boolean useColormap)
public boolean getUseColormap()
public void setUseImageColors(boolean useImageColors)
public boolean getUseImageColors()
public void setSeed(int seed)
public int getSeed()
public void randomize()
private int randomRGB(int[] inPixels, int x, int y)
private int displace(int rgb, float amount)
private int average(int rgb1, int rgb2)
private int getPixel(int x, int y, int[] pixels, int stride)
private void putPixel(int x, int y, int rgb, int[] pixels, int stride)
private boolean doPixel(int x1, int y1, int x2, int y2, int[] pixels, int stride, int depth, int scale)
protected 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 boundsWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses