public class MarvinImageMask
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static MarvinImageMask |
NULL_MASK |
| Constructor and Description |
|---|
MarvinImageMask()
Constructor for null mask
|
MarvinImageMask(boolean[][] mask) |
MarvinImageMask(int w,
int h)
Contructor
|
MarvinImageMask(int maskWidth,
int maskHeight,
int startX,
int startY,
int regionWidth,
int regionHeight) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPixel(int x,
int y)
Add a point to the mask.
|
void |
addRectRegion(int startX,
int startY,
int regionWidth,
int regionHeight) |
void |
clear()
Clear the mask for a new selection
|
int |
getHeight() |
boolean[][] |
getMask() |
int |
getWidth() |
void |
removePixel(int x,
int y)
Remove point from the mask.
|
public static MarvinImageMask NULL_MASK
public MarvinImageMask()
public MarvinImageMask(int w,
int h)
w - width of the image referenced by the maskh - height of the image referenced by the maskpublic MarvinImageMask(boolean[][] mask)
public MarvinImageMask(int maskWidth,
int maskHeight,
int startX,
int startY,
int regionWidth,
int regionHeight)
maskWidth - width of the image referenced by the maskmaskHeight - height of the image referenced by the maskstartX - start pixel of the region in x axesstartY - start pixel of the region in y axesregionWidth - width of the regionregionHeight - height of the regionpublic int getWidth()
public int getHeight()
public void addPixel(int x,
int y)
x - y - public void removePixel(int x,
int y)
x - y - public void clear()
public boolean[][] getMask()
public void addRectRegion(int startX,
int startY,
int regionWidth,
int regionHeight)
startX - Start pixel of the region in x axesstartY - Start pixel of the region in y axesregionWidth - Width of the regionregionHeight - Height of the region