Update examples

This commit is contained in:
vcaesar 2017-08-24 20:42:46 +08:00
parent ca3c7a6c9b
commit c76d2b6606
2 changed files with 14 additions and 0 deletions

View File

@ -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)

View File

@ -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)