public class Pattern extends Object
| Constructor and Description |
|---|
Pattern()
creates empty Pattern object
at least setFilename() or setImage() must be used before
the Pattern object is ready for anything
|
Pattern(BufferedImage bimg)
A Pattern from a BufferedImage
** not tested yet totally **
|
Pattern(Pattern p)
create a new Pattern from another (attribs are copied)
|
Pattern(ScreenImage simg)
A Pattern from a ScreenImage
** not tested yet totally **
|
Pattern(String imgpath)
create a Pattern with an image file name
checked only when used see checkFile() |
| Modifier and Type | Method and Description |
|---|---|
String |
checkFile()
check for a valid image file
|
Pattern |
exact()
sets the minimum Similarity to 0.99 which means exact match
|
String |
getFilename()
the current image absolute filepath if any
|
BufferedImage |
getImage()
return the image if any
|
float |
getSimilar() |
Location |
getTargetOffset() |
Pattern |
setFilename(String imgURL_)
set the Patterns image file name
It is only checked if Pattern is used or with getFilename()
|
Pattern |
setImage(BufferedImage bimg)
sets the Pattern's image
|
Pattern |
setImage(ScreenImage simg)
sets the Pattern's image
|
int |
setTimeAfter()
get the seconds to wait, after this pattern is acted on
|
void |
setTimeAfter(int secs)
set the seconds to wait, after this pattern is acted on
|
Pattern |
similar(float sim)
sets the minimum Similarity to use with find
|
Pattern |
targetOffset(int dx,
int dy)
set the offset from the match's center to be used with mouse actions
|
Pattern |
targetOffset(Location loc)
set the offset from the match's center to be used with mouse actions
|
String |
toString() |
public Pattern()
public Pattern(Pattern p)
p - public Pattern(String imgpath)
imgpath - public Pattern(BufferedImage bimg)
bimg - public Pattern(ScreenImage simg)
simg - public Pattern similar(float sim)
sim - public Pattern exact()
public float getSimilar()
public Pattern targetOffset(int dx, int dy)
dx - dy - public Pattern targetOffset(Location loc)
loc - public Location getTargetOffset()
public Pattern setFilename(String imgURL_)
imgURL_ - public String getFilename()
public String checkFile()
public BufferedImage getImage()
public Pattern setImage(BufferedImage bimg)
bimg - public Pattern setImage(ScreenImage simg)
simg - public void setTimeAfter(int secs)
secs - public int setTimeAfter()