Package com.jhlabs.math
Class ImageFunction2D
java.lang.Object
com.jhlabs.math.ImageFunction2D
- All Implemented Interfaces:
Function2D
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionImageFunction2D
(int[] pixels, int width, int height, int edgeAction, boolean alpha) ImageFunction2D
(Image image) ImageFunction2D
(BufferedImage image) ImageFunction2D
(BufferedImage image, boolean alpha) ImageFunction2D
(BufferedImage image, int edgeAction, boolean alpha) ImageFunction2D
(Image image, int edgeAction, boolean alpha) -
Method Summary
Modifier and TypeMethodDescriptionfloat
evaluate
(float x, float y) int
int
int[]
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)
-
Field Details
-
ZERO
public static final int ZERO- See Also:
-
CLAMP
public static final int CLAMP- See Also:
-
WRAP
public static final int WRAP- See Also:
-
pixels
protected int[] pixels -
width
protected int width -
height
protected int height -
edgeAction
protected int edgeAction -
alpha
protected boolean alpha
-
-
Constructor Details
-
ImageFunction2D
-
ImageFunction2D
-
ImageFunction2D
-
ImageFunction2D
public ImageFunction2D(int[] pixels, int width, int height, int edgeAction, boolean alpha) -
ImageFunction2D
-
ImageFunction2D
-
-
Method Details
-
getRGB
A convenience method for getting ARGB pixels from an image. This tries to avoid the performance penalty of BufferedImage.getRGB unmanaging the image. -
init
public void init(int[] pixels, int width, int height, int edgeAction, boolean alpha) -
evaluate
public float evaluate(float x, float y) - Specified by:
evaluate
in interfaceFunction2D
-
setEdgeAction
public void setEdgeAction(int edgeAction) -
getEdgeAction
public int getEdgeAction() -
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getPixels
public int[] getPixels()
-