feat: TapByCV WithTapRandomRect

This commit is contained in:
lilong.129
2025-03-17 18:06:32 +08:00
parent 182de16751
commit 5e2f33b362
5 changed files with 29 additions and 8 deletions
+9
View File
@@ -249,6 +249,15 @@ func (box Box) Center() PointF {
}
}
func (box Box) RandomPoint() PointF {
width, height := float64(box.Width), float64(box.Height)
point := PointF{
X: box.Point.X + width*rand.Float64(),
Y: box.Point.Y + height*rand.Float64(),
}
return point
}
type UIResults []UIResult
func (u UIResults) FilterScope(scope option.AbsScope) (results UIResults) {