mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-07 00:17:37 +08:00
feat: get size for OCRText
This commit is contained in:
@@ -71,6 +71,13 @@ type OCRText struct {
|
||||
Rect image.Rectangle
|
||||
}
|
||||
|
||||
func (t OCRText) Size() Size {
|
||||
return Size{
|
||||
Width: t.Rect.Dx(),
|
||||
Height: t.Rect.Dy(),
|
||||
}
|
||||
}
|
||||
|
||||
func (t OCRText) Center() PointF {
|
||||
return getRectangleCenterPoint(t.Rect)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user