add popup close_status=found

This commit is contained in:
buyuxiang
2023-08-29 17:59:12 +08:00
parent 67088469c5
commit 20b2fa51af
4 changed files with 28 additions and 3 deletions
+7
View File
@@ -5,6 +5,7 @@ import (
"fmt"
"image"
"io/ioutil"
"math"
"mime/multipart"
"net/http"
"regexp"
@@ -463,6 +464,12 @@ func (box Box) IsEmpty() bool {
return builtin.IsZeroFloat64(box.Width) && builtin.IsZeroFloat64(box.Height)
}
func (box Box) IsIdentical(box2 Box) bool {
return box.Point.IsIdentical(box2.Point) &&
builtin.IsZeroFloat64(math.Abs(box.Width-box2.Width)) &&
builtin.IsZeroFloat64(math.Abs(box.Height-box2.Height))
}
func (box Box) Center() PointF {
return PointF{
X: box.Point.X + box.Width*0.5,