add more bitmap examples

This commit is contained in:
vcaesar 2018-01-24 21:44:18 +08:00
parent a8e57bc169
commit 50508899ac
2 changed files with 16 additions and 0 deletions

View File

@ -46,6 +46,14 @@ func main() {
cx, cy = robotgo.FindColorCS(388, 179, 300, 300, 0xAADCDC)
fmt.Println("pos...", cx, cy)
cnt := robotgo.CountColor(bitmap, 0xAADCDC)
fmt.Println("count...", cnt)
cnt1 := robotgo.CountColorCS(10, 20, 30, 40, 0xAADCDC)
fmt.Println("count...", cnt1)
count := robotgo.CountBitmap(abitMap, bitmap)
fmt.Println("count...", count)
bit := robotgo.CaptureScreen(1, 2, 40, 40)
fmt.Println("CaptureScreen...", bit)
fx, fy = robotgo.FindBitmap(bit)

View File

@ -182,6 +182,14 @@ func bitmap() {
cx, cy = robotgo.FindColorCS(388, 179, 300, 300, 0xAADCDC)
fmt.Println("pos...", cx, cy)
cnt := robotgo.CountColor(bitmap, 0xAADCDC)
fmt.Println("count...", cnt)
cnt1 := robotgo.CountColorCS(10, 20, 30, 40, 0xAADCDC)
fmt.Println("count...", cnt1)
count := robotgo.CountBitmap(abitMap, bitmap)
fmt.Println("count...", count)
bit := robotgo.CaptureScreen(1, 2, 40, 40)
fmt.Println("CaptureScreen...", bit)
fx, fy = robotgo.FindBitmap(bit)