From f6cd1d99dd910c2fa9b31815801c299b5e0f2929 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Mon, 9 Apr 2018 17:45:07 +0800 Subject: [PATCH] update examples --- examples/bitmap/main.go | 3 +++ examples/main.go | 3 +++ robotgo.go | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/bitmap/main.go b/examples/bitmap/main.go index 465f50a..3f4b298 100644 --- a/examples/bitmap/main.go +++ b/examples/bitmap/main.go @@ -104,4 +104,7 @@ func main() { fx, fy = robotgo.FindBitmap(openbit) fmt.Println("FindBitmap------", fx, fy) + + fx, fy = robotgo.FindPic("test.tif") + fmt.Println("FindPic------", fx, fy) } diff --git a/examples/main.go b/examples/main.go index 2e908df..5b4dce5 100644 --- a/examples/main.go +++ b/examples/main.go @@ -248,6 +248,9 @@ func bitmap() { fx, fy = robotgo.FindBitmap(openbit) fmt.Println("FindBitmap------", fx, fy) + + fx, fy = robotgo.FindPic("test.tif") + fmt.Println("FindPic------", fx, fy) } func event() { diff --git a/robotgo.go b/robotgo.go index 11abfa2..69d8be1 100644 --- a/robotgo.go +++ b/robotgo.go @@ -785,7 +785,7 @@ func SetKeyboardDelay(x int) { // FindBitmap find the bitmap // -// robotgo.FindBitmap(bitmap, subbitamp C.MMBitmapRef, tolerance float64) +// robotgo.FindBitmap(bitmap, subbitamp C.MMBitmapRef, tolerance float64) // func FindBitmap(args ...interface{}) (int, int) { var ( @@ -814,7 +814,7 @@ func FindBitmap(args ...interface{}) (int, int) { // FindPic finding the image by path // -// robotgo.FindPic(path string, subbitamp C.MMBitmapRef, tolerance float64) +// robotgo.FindPic(path string, subbitamp C.MMBitmapRef, tolerance float64) // func FindPic(path string, args ...interface{}) (int, int) { var (