From c76d2b6606977cebc1ba3d9ee343683675930bf4 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Thu, 24 Aug 2017 20:42:46 +0800 Subject: [PATCH] Update examples --- examples/bitmap/main.go | 7 +++++++ examples/main.go | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/examples/bitmap/main.go b/examples/bitmap/main.go index 166d5a6..18ff6d4 100644 --- a/examples/bitmap/main.go +++ b/examples/bitmap/main.go @@ -34,6 +34,13 @@ func main() { fx, fy := robotgo.FindBitmap(bitmap) fmt.Println("FindBitmap------", fx, fy) + bit := robotgo.CaptureScreen(1, 2, 40, 40) + fmt.Println("CaptureScreen...", bit) + fx, fy = robotgo.FindBit(bit) + fmt.Println("FindBitmap------", fx, fy) + fx, fy = robotgo.FindBit(bit, bitmap) + fmt.Println("FindBitmap------", fx, fy) + // returns new bitmap object created from a portion of another bitpos := robotgo.GetPortion(bitmap, 10, 10, 11, 10) fmt.Println(bitpos) diff --git a/examples/main.go b/examples/main.go index 9eb0352..5de1a02 100644 --- a/examples/main.go +++ b/examples/main.go @@ -141,6 +141,13 @@ func bitmap() { fx, fy := robotgo.FindBitmap(bitmap) fmt.Println("FindBitmap------", fx, fy) + bit := robotgo.CaptureScreen(1, 2, 40, 40) + fmt.Println("CaptureScreen...", bit) + fx, fy = robotgo.FindBit(bit) + fmt.Println("FindBitmap------", fx, fy) + fx, fy = robotgo.FindBit(bit, bitmap) + fmt.Println("FindBitmap------", fx, fy) + // returns new bitmap object created from a portion of another bitpos := robotgo.GetPortion(bitmap, 10, 10, 11, 10) fmt.Println(bitpos)