change: make ocr as optional build tags

This commit is contained in:
debugtalk
2022-09-21 17:27:54 +08:00
parent a742b575fa
commit 937b48236e
8 changed files with 65 additions and 33 deletions
+29
View File
@@ -0,0 +1,29 @@
//go:build !opencv
package uixt
import (
"image"
"github.com/electricbubble/gwda"
"github.com/rs/zerolog/log"
)
func Extend(driver gwda.WebDriver, options ...CVOption) (dExt *DriverExt, err error) {
return extend(driver)
}
func (dExt *DriverExt) FindAllImageRect(search string) (rects []image.Rectangle, err error) {
log.Fatal().Msg("opencv is not supported")
return
}
func (dExt *DriverExt) FindImageRectInUIKit(imagePath string) (x, y, width, height float64, err error) {
log.Fatal().Msg("opencv is not supported")
return
}
func (dExt *DriverExt) MappingToRectInUIKit(rect image.Rectangle) (x, y, width, height float64) {
log.Fatal().Msg("opencv is not supported")
return
}