com.jhlabs.math
Class ImageFunction2D
java.lang.Object
com.jhlabs.math.ImageFunction2D
- Function2D
public class ImageFunction2D
extends java.lang.Object
float | evaluate(float x, float y)
|
int | getEdgeAction()
|
int | getHeight()
|
int[] | getPixels()
|
int[] | getRGB(BufferedImage image, int x, int y, int width, int height, int[] pixels) - A convenience method for getting ARGB pixels from an image.
|
int | getWidth()
|
void | init(int[] pixels, int width, int height, int edgeAction, boolean alpha)
|
void | setEdgeAction(int edgeAction)
|
CLAMP
public static final int CLAMP
WRAP
public static final int WRAP
ZERO
public static final int ZERO
alpha
protected boolean alpha
edgeAction
protected int edgeAction
height
protected int height
pixels
protected int[] pixels
ImageFunction2D
public ImageFunction2D(BufferedImage image)
ImageFunction2D
public ImageFunction2D(BufferedImage image,
boolean alpha)
ImageFunction2D
public ImageFunction2D(BufferedImage image,
int edgeAction,
boolean alpha)
ImageFunction2D
public ImageFunction2D(Image image)
ImageFunction2D
public ImageFunction2D(Image image,
int edgeAction,
boolean alpha)
ImageFunction2D
public ImageFunction2D(int[] pixels,
int width,
int height,
int edgeAction,
boolean alpha)
getEdgeAction
public int getEdgeAction()
getHeight
public int getHeight()
getPixels
public int[] getPixels()
getRGB
public int[] getRGB(BufferedImage image,
int x,
int y,
int width,
int height,
int[] pixels)
A convenience method for getting ARGB pixels from an image. This tries to avoid the performance
penalty of BufferedImage.getRGB unmanaging the image.
image
- a BufferedImage objectx
- the left edge of the pixel blocky
- the right edge of the pixel blockwidth
- the width of the pixel arryheight
- the height of the pixel arrypixels
- the array to hold the returned pixels. May be null.
getWidth
public int getWidth()
init
public void init(int[] pixels,
int width,
int height,
int edgeAction,
boolean alpha)
setEdgeAction
public void setEdgeAction(int edgeAction)