add PointInBounds examples

This commit is contained in:
vcaesar 2017-12-20 23:08:15 +08:00
parent 7a1ffa66a9
commit f6cfce3f4b
2 changed files with 7 additions and 0 deletions

View File

@ -50,6 +50,9 @@ func main() {
fx, fy = robotgo.FindBitmap(bit, bitmap)
fmt.Println("FindBitmap------", fx, fy)
abool := robotgo.PointInBounds(bitmap, 1, 2)
fmt.Println("point in bounds...", abool)
// returns new bitmap object created from a portion of another
bitpos := robotgo.GetPortion(bitmap, 10, 10, 11, 10)
fmt.Println(bitpos)

View File

@ -162,6 +162,10 @@ func bitmap() {
fx, fy = robotgo.FindBitmap(bit, bitmap)
fmt.Println("FindBitmap------", fx, fy)
// bitmap := robotgo.CaptureScreen(10, 20, 30, 40)
abool := robotgo.PointInBounds(bitmap, 1, 2)
fmt.Println("point in bounds...", abool)
// returns new bitmap object created from a portion of another
bitpos := robotgo.GetPortion(bitmap, 10, 10, 11, 10)
fmt.Println(bitpos)