|
|
|
@ -444,7 +444,6 @@ public abstract class JMacro {
|
|
|
|
}, timeout, TimeUnit.SECONDS);
|
|
|
|
}, timeout, TimeUnit.SECONDS);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 图例组合匹配,图例区域结果和入参长度一致,任意图例检测到后则会返回,其他未检测到的区域则为null
|
|
|
|
* 图例组合匹配,图例区域结果和入参长度一致,任意图例检测到后则会返回,其他未检测到的区域则为null
|
|
|
|
* <p>
|
|
|
|
* <p>
|
|
|
|
@ -501,6 +500,26 @@ public abstract class JMacro {
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 等待并查找图例,发现任意一个即返回
|
|
|
|
|
|
|
|
* <p>
|
|
|
|
|
|
|
|
* 通常用于同样的图例但是在不通版本上有细微区别的情况(增加不通版本的兼容处理)
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param legends 图例组
|
|
|
|
|
|
|
|
* @param minSimilar 最低相似度
|
|
|
|
|
|
|
|
* @param seconds 最长等待秒数
|
|
|
|
|
|
|
|
* @return 匹配区域
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public Region waitAndFindAny(String[] legends, double minSimilar, long seconds) {
|
|
|
|
|
|
|
|
Region[] result = waitAndFindLegends(legends, minSimilar, seconds);
|
|
|
|
|
|
|
|
for (Region viewRect : result) {
|
|
|
|
|
|
|
|
if (viewRect != null) {
|
|
|
|
|
|
|
|
return viewRect;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查找并点击图例
|
|
|
|
* 查找并点击图例
|
|
|
|
*
|
|
|
|
*
|
|
|
|
@ -528,17 +547,6 @@ public abstract class JMacro {
|
|
|
|
return Legend.inflate(legend);
|
|
|
|
return Legend.inflate(legend);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 将相对坐标转为绝对坐标
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @return 绝对坐标
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public Location of(int x, int y) {
|
|
|
|
|
|
|
|
int ox = getWorkRegion().getX();
|
|
|
|
|
|
|
|
int oy = getWorkRegion().getY();
|
|
|
|
|
|
|
|
return new Location(x + ox, y + oy);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 将相对坐标转为色值坐标
|
|
|
|
* 将相对坐标转为色值坐标
|
|
|
|
*
|
|
|
|
*
|
|
|
|
|