public class Mask extends ImageSource
The mask for the filtering of the samples during comparison.
Required options are type, source and id.
Optional settings are alignment of the mask (for types which requires this settings).
| Modifier and Type | Field and Description |
|---|---|
protected HorizontalAlign |
horizontalAlign
The horizontal align.
|
protected String |
id
The id.
|
protected MaskType |
type
The type.
|
protected VerticalAlign |
verticalAlign
The vertical align.
|
sourceany| Constructor and Description |
|---|
Mask() |
| Modifier and Type | Method and Description |
|---|---|
HorizontalAlign |
getHorizontalAlign()
Gets the horizontal alignment.
|
String |
getId()
Gets the id.
|
MaskType |
getType()
Gets the type.
|
VerticalAlign |
getVerticalAlign()
Gets the vertical alignment.
|
boolean |
isPixelMasked(BufferedImage pattern,
int x,
int y)
Checks if is pixel masked.
|
BufferedImage |
retrieve()
Retrieve the image from defined source.
|
void |
setHorizontalAlign(HorizontalAlign value)
Sets the horizontal alignment.
|
void |
setId(String value)
Sets the id.
|
void |
setMaskRetriever(MaskRetriever maskRetriever)
Sets the mask retriever.
|
void |
setType(MaskType value)
Sets the type.
|
void |
setVerticalAlign(VerticalAlign value)
Sets the vertical alignment.
|
get, getSource, run, setSourcegetAny, getProperty, getProperty, getProperty, include, setProperty, sizeprotected String id
protected MaskType type
protected VerticalAlign verticalAlign
protected HorizontalAlign horizontalAlign
public String getId()
public void setId(String value)
value - the new idpublic MaskType getType()
public void setType(MaskType value)
value - the new typepublic VerticalAlign getVerticalAlign()
public void setVerticalAlign(VerticalAlign value)
value - the new vertical alignmentpublic HorizontalAlign getHorizontalAlign()
public void setHorizontalAlign(HorizontalAlign value)
value - the new horizontal alignmentpublic BufferedImage retrieve() throws Exception
ImageSourceretrieve in class ImageSourceException - the exceptionpublic boolean isPixelMasked(BufferedImage pattern, int x, int y)
pattern - the patternx - the xy - the ypublic void setMaskRetriever(MaskRetriever maskRetriever)
maskRetriever - the new mask retrieverCopyright © 2017 JBoss by Red Hat. All rights reserved.