From 50508899ac48c835997fc69973d3b9ae2681ec6f Mon Sep 17 00:00:00 2001 From: vcaesar Date: Wed, 24 Jan 2018 21:44:18 +0800 Subject: [PATCH] add more bitmap examples --- examples/bitmap/main.go | 8 ++++++++ examples/main.go | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/examples/bitmap/main.go b/examples/bitmap/main.go index 970ff05..aaffaed 100644 --- a/examples/bitmap/main.go +++ b/examples/bitmap/main.go @@ -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) diff --git a/examples/main.go b/examples/main.go index a445c49..5e303ae 100644 --- a/examples/main.go +++ b/examples/main.go @@ -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)