com.jhlabs.image

Class ShapeFilter

Implemented Interfaces:
BufferedImageOp, Cloneable

public class ShapeFilter
extends WholeImageFilter

Field Summary

static int
CIRCLE_DOWN
static int
CIRCLE_UP
static int
LINEAR
static int
SMOOTH
protected Colormap
colormap

Fields inherited from class com.jhlabs.image.WholeImageFilter

originalSpace, transformedSpace

Constructor Summary

ShapeFilter()

Method Summary

int
distanceMap(int[] map, int width, int height)
protected int[]
filterPixels(int width, int height, int[] inPixels, Rectangle transformedSpace)
Colormap
getColormap()
Get the colormap to be used for the filter.
float
getFactor()
boolean
getInvert()
boolean
getMerge()
int
getType()
boolean
getUseAlpha()
void
setColormap(Colormap colormap)
Set the colormap to be used for the filter.
void
setFactor(float factor)
void
setInvert(boolean invert)
void
setMerge(boolean merge)
void
setType(int type)
void
setUseAlpha(boolean useAlpha)
String
toString()

Methods inherited from class com.jhlabs.image.WholeImageFilter

filter, filterPixels, transformSpace

Methods inherited from class com.jhlabs.image.AbstractBufferedImageOp

clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRGB, getRenderingHints, setRGB

Field Details

CIRCLE_DOWN

public static final int CIRCLE_DOWN
Field Value:
2

CIRCLE_UP

public static final int CIRCLE_UP
Field Value:
1

LINEAR

public static final int LINEAR
Field Value:
0

SMOOTH

public static final int SMOOTH
Field Value:
3

colormap

protected Colormap colormap

Constructor Details

ShapeFilter

public ShapeFilter()

Method Details

distanceMap

public int distanceMap(int[] map,
                       int width,
                       int height)

filterPixels

protected int[] filterPixels(int width,
                             int height,
                             int[] inPixels,
                             Rectangle transformedSpace)
Overrides:
filterPixels in interface WholeImageFilter

getColormap

public Colormap getColormap()
Get the colormap to be used for the filter.
Returns:
the colormap

getFactor

public float getFactor()

getInvert

public boolean getInvert()

getMerge

public boolean getMerge()

getType

public int getType()

getUseAlpha

public boolean getUseAlpha()

setColormap

public void setColormap(Colormap colormap)
Set the colormap to be used for the filter.
Parameters:
colormap - the colormap
See Also:
getColormap()

setFactor

public void setFactor(float factor)

setInvert

public void setInvert(boolean invert)

setMerge

public void setMerge(boolean merge)

setType

public void setType(int type)

setUseAlpha

public void setUseAlpha(boolean useAlpha)

toString

public String toString()