From 7ecdc2b938e6f460a8c67fc8b3269a0af97517b4 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Thu, 24 Aug 2017 21:31:42 +0800 Subject: [PATCH] Update findbit api to classics --- README.md | 2 +- README_zh.md | 2 +- examples/bitmap/main.go | 6 +++--- examples/main.go | 6 +++--- robotgo.go | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index fdfbf7c..ae6775f 100644 --- a/README.md +++ b/README.md @@ -191,7 +191,7 @@ func main() { bitmap := robotgo.CaptureScreen(10, 20, 30, 40) fmt.Println("...", bitmap) - fx, fy := robotgo.FindBit(bitmap) + fx, fy := robotgo.FindBitmap(bitmap) fmt.Println("FindBitmap------", fx, fy) robotgo.SaveBitmap(bitmap, "test.png") diff --git a/README_zh.md b/README_zh.md index 8b1608f..07fe732 100644 --- a/README_zh.md +++ b/README_zh.md @@ -189,7 +189,7 @@ func main() { bitmap := robotgo.CaptureScreen(10, 20, 30, 40) fmt.Println("...", bitmap) - fx, fy := robotgo.FindBit(bitmap) + fx, fy := robotgo.FindBitmap(bitmap) fmt.Println("FindBitmap------", fx, fy) robotgo.SaveBitmap(bitmap, "test.png") diff --git a/examples/bitmap/main.go b/examples/bitmap/main.go index 18ff6d4..ba52331 100644 --- a/examples/bitmap/main.go +++ b/examples/bitmap/main.go @@ -31,14 +31,14 @@ func main() { fmt.Println("CaptureScreen...", bitmap) // searches for needle in bitmap - fx, fy := robotgo.FindBitmap(bitmap) + fx, fy := robotgo.FindBit(bitmap) fmt.Println("FindBitmap------", fx, fy) bit := robotgo.CaptureScreen(1, 2, 40, 40) fmt.Println("CaptureScreen...", bit) - fx, fy = robotgo.FindBit(bit) + fx, fy = robotgo.FindBitmap(bit) fmt.Println("FindBitmap------", fx, fy) - fx, fy = robotgo.FindBit(bit, bitmap) + fx, fy = robotgo.FindBitmap(bit, bitmap) fmt.Println("FindBitmap------", fx, fy) // returns new bitmap object created from a portion of another diff --git a/examples/main.go b/examples/main.go index 5de1a02..f4825ea 100644 --- a/examples/main.go +++ b/examples/main.go @@ -138,14 +138,14 @@ func bitmap() { fmt.Println("CaptureScreen...", bitmap) // searches for needle in bitmap - fx, fy := robotgo.FindBitmap(bitmap) + fx, fy := robotgo.FindBit(bitmap) fmt.Println("FindBitmap------", fx, fy) bit := robotgo.CaptureScreen(1, 2, 40, 40) fmt.Println("CaptureScreen...", bit) - fx, fy = robotgo.FindBit(bit) + fx, fy = robotgo.FindBitmap(bit) fmt.Println("FindBitmap------", fx, fy) - fx, fy = robotgo.FindBit(bit, bitmap) + fx, fy = robotgo.FindBitmap(bit, bitmap) fmt.Println("FindBitmap------", fx, fy) // returns new bitmap object created from a portion of another diff --git a/robotgo.go b/robotgo.go index 2051261..3e60fbd 100644 --- a/robotgo.go +++ b/robotgo.go @@ -571,8 +571,8 @@ func SetKeyboardDelay(x int) { |______/ |__| |__| |__| |__| /__/ \__\ | _| */ -// FindBit find the bitmap -func FindBit(args ...interface{}) (int, int) { +// FindBitmap find the bitmap +func FindBitmap(args ...interface{}) (int, int) { var ( bit C.MMBitmapRef sbit C.MMBitmapRef @@ -597,8 +597,8 @@ func FindBit(args ...interface{}) (int, int) { return int(pos.x), int(pos.y) } -// FindBitmap find the bitmap -func FindBitmap(args ...interface{}) (int, int) { +// FindBit find the bitmap +func FindBit(args ...interface{}) (int, int) { var bit C.MMBitmapRef bit = args[0].(C.MMBitmapRef)