public class GradientFilter extends AbstractBufferedImageOp
Modifier and Type | Field and Description |
---|---|
private float |
angle |
static int |
BICONICAL |
static int |
BILINEAR |
private int |
color1 |
private int |
color2 |
private Colormap |
colormap |
static int |
CONICAL |
private float |
dx |
private float |
dy |
static int |
INT_CIRCLE_DOWN |
static int |
INT_CIRCLE_UP |
static int |
INT_LINEAR |
static int |
INT_SMOOTH |
private int |
interpolation |
static int |
LINEAR |
private Point |
p1 |
private Point |
p2 |
private int |
paintMode |
static int |
RADIAL |
private boolean |
repeat |
static int |
SQUARE |
private int |
type |
private float |
x1 |
private float |
y1 |
Constructor and Description |
---|
GradientFilter() |
GradientFilter(Point p1,
Point p2,
int color1,
int color2,
boolean repeat,
int type,
int interpolation) |
Modifier and Type | Method and Description |
---|---|
private void |
conicalGradient(int[] pixels,
int y,
int w,
int h) |
private float |
distance(float a,
float b) |
BufferedImage |
filter(BufferedImage src,
BufferedImage dst) |
float |
getAngle()
Returns the angle of the texture.
|
Colormap |
getColormap()
Get the colormap to be used for the filter.
|
int |
getInterpolation() |
int |
getPaintMode() |
Point |
getPoint1() |
Point |
getPoint2() |
int |
getType() |
private void |
linearGradient(int[] pixels,
int y,
int w,
int h) |
private float |
map(float v) |
private void |
radialGradient(int[] pixels,
int y,
int w,
int h) |
private void |
repeatGradient(int[] pixels,
int w,
int h,
float rowrel,
float dx,
float dy) |
void |
setAngle(float angle)
Specifies the angle of the texture.
|
void |
setColormap(Colormap colormap)
Set the colormap to be used for the filter.
|
void |
setInterpolation(int interpolation) |
void |
setPaintMode(int paintMode) |
void |
setPoint1(Point point1) |
void |
setPoint2(Point point2) |
void |
setType(int type) |
private void |
singleGradient(int[] pixels,
int w,
int h,
float rowrel,
float dx,
float dy) |
private void |
squareGradient(int[] pixels,
int y,
int w,
int h) |
String |
toString() |
clone, createCompatibleDestImage, getBounds2D, getPoint2D, getRenderingHints, getRGB, setRGB
public static final int LINEAR
public static final int BILINEAR
public static final int RADIAL
public static final int CONICAL
public static final int BICONICAL
public static final int SQUARE
public static final int INT_LINEAR
public static final int INT_CIRCLE_UP
public static final int INT_CIRCLE_DOWN
public static final int INT_SMOOTH
private float angle
private int color1
private int color2
private boolean repeat
private float x1
private float y1
private float dx
private float dy
private int type
private int interpolation
private int paintMode
public GradientFilter()
public GradientFilter(Point p1, Point p2, int color1, int color2, boolean repeat, int type, int interpolation)
public void setType(int type)
public int getType()
public void setInterpolation(int interpolation)
public int getInterpolation()
public void setAngle(float angle)
angle
- the angle of the texture.getAngle()
public float getAngle()
setAngle(float)
public void setColormap(Colormap colormap)
colormap
- the colormapgetColormap()
public Colormap getColormap()
setColormap(com.jhlabs.image.Colormap)
public void setPaintMode(int paintMode)
public int getPaintMode()
public BufferedImage filter(BufferedImage src, BufferedImage dst)
private void repeatGradient(int[] pixels, int w, int h, float rowrel, float dx, float dy)
private void singleGradient(int[] pixels, int w, int h, float rowrel, float dx, float dy)
private void linearGradient(int[] pixels, int y, int w, int h)
private void radialGradient(int[] pixels, int y, int w, int h)
private void squareGradient(int[] pixels, int y, int w, int h)
private void conicalGradient(int[] pixels, int y, int w, int h)
private float map(float v)
private float distance(float a, float b)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses