public class ElementLocationInfo extends Object
文件名:ElementLocation.java
用途: 用于存储截图元素的封装信息以及其在查找时的附加信息
编码时间:2021年12月27日 上午8:16:30
修改时间:2021年12月27日 上午8:16:30
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_SIMILAR
定义默认的相似度,-1.0
|
Constructor and Description |
---|
ElementLocationInfo(String screenFilePath)
初始化元素信息,并指定识别元素截图文件路径
|
ElementLocationInfo(String screenFilePath,
double similar)
初始化元素信息,并指定元素截图文件路径以及识别度
|
ElementLocationInfo(String screenFilePath,
org.sikuli.script.Location operateLocation)
初始化元素信息,并指定元素截图文件路径以及操作坐标
|
ElementLocationInfo(String screenFilePath,
org.sikuli.script.Location operateLocation,
double similar)
初始化元素信息,并指定元素截图文件路径以及操作坐标、识别度
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
org.sikuli.script.Location |
getOperateLocation()
该方法用于元素操作的坐标类对象
|
org.sikuli.script.Pattern |
getPattern()
该方法用于根据已有的信息,返回截图元素封装类对象
|
String |
getScreenFilePath()
该方法用于返回元素截图所在绝对路径
|
double |
getSimilar()
该方法用于返回元素识别的相似度
|
int |
hashCode() |
void |
setOperateLocation(org.sikuli.script.Location operateLocation)
该方法用于设置元素操作的坐标类对象
|
protected void |
setScreenFilePath(String screenFilePath)
该方法用于直接设置截图文件的存放路径
|
void |
setSimilar(double similar)
该方法用于设置元素识别的相似度
|
String |
toString() |
public static final double DEFAULT_SIMILAR
public ElementLocationInfo(String screenFilePath)
screenFilePath
- 元素截图文件类对象public ElementLocationInfo(String screenFilePath, double similar)
screenFilePath
- 元素截图文件类对象similar
- 识别度public ElementLocationInfo(String screenFilePath, org.sikuli.script.Location operateLocation)
screenFilePath
- 元素截图文件类对象operateLocation
- 元素操作坐标public ElementLocationInfo(String screenFilePath, org.sikuli.script.Location operateLocation, double similar)
screenFilePath
- 元素截图文件类对象operateLocation
- 元素操作坐标similar
- 识别度public org.sikuli.script.Location getOperateLocation()
public void setOperateLocation(org.sikuli.script.Location operateLocation)
operateLocation
- 坐标类对象public double getSimilar()
public void setSimilar(double similar)
similar
- 相似度protected void setScreenFilePath(String screenFilePath)
screenFilePath
- 截图文件所在路径public String getScreenFilePath()
public org.sikuli.script.Pattern getPattern()
Copyright © 2024. All rights reserved.