public class ShapeFilter extends WholeImageFilter
Modifier and Type | Field and Description |
---|---|
static int |
CIRCLE_DOWN |
static int |
CIRCLE_UP |
protected Colormap |
colormap |
private float |
factor |
private boolean |
invert |
static int |
LINEAR |
private boolean |
merge |
private static int |
one |
static int |
SMOOTH |
private static int |
sqrt2 |
private static int |
sqrt5 |
private int |
type |
private boolean |
useAlpha |
originalSpace, transformedSpace
Constructor and Description |
---|
ShapeFilter() |
Modifier and Type | Method and Description |
---|---|
private void |
applyMap(int[] map,
int[] pixels,
int width,
int height,
int max) |
int |
distanceMap(int[] map,
int width,
int height) |
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.
|
float |
getFactor() |
boolean |
getInvert() |
boolean |
getMerge() |
int |
getType() |
boolean |
getUseAlpha() |
private void |
makeMap(int[] pixels,
int[] map,
int width,
int height) |
void |
setColormap(Colormap colormap)
Set the colormap to be used for the filter.
|
private int |
setEdgeValue(int x,
int y,
int[] map,
int width,
int offset,
int xmax,
int ymax) |
void |
setFactor(float factor) |
void |
setInvert(boolean invert) |
void |
setMerge(boolean merge) |
void |
setType(int type) |
void |
setUseAlpha(boolean useAlpha) |
private int |
setValue(int[] map,
int width,
int offset) |
String |
toString() |
filter, transformSpace
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
public static final int LINEAR
public static final int CIRCLE_UP
public static final int CIRCLE_DOWN
public static final int SMOOTH
private float factor
private boolean useAlpha
private boolean invert
private boolean merge
private int type
private static final int one
private static final int sqrt2
private static final int sqrt5
public ShapeFilter()
public void setFactor(float factor)
public float getFactor()
public void setColormap(Colormap colormap)
colormap
- the colormapgetColormap()
public Colormap getColormap()
setColormap(com.jhlabs.image.Colormap)
public void setUseAlpha(boolean useAlpha)
public boolean getUseAlpha()
public void setType(int type)
public int getType()
public void setInvert(boolean invert)
public boolean getInvert()
public void setMerge(boolean merge)
public boolean getMerge()
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 boundspublic int distanceMap(int[] map, int width, int height)
private void makeMap(int[] pixels, int[] map, int width, int height)
private void applyMap(int[] map, int[] pixels, int width, int height, int max)
private int setEdgeValue(int x, int y, int[] map, int width, int offset, int xmax, int ymax)
private int setValue(int[] map, int width, int offset)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses