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)