mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-02 23:23:55 +00:00
add more bitmap examples
This commit is contained in:
parent
a8e57bc169
commit
50508899ac
@ -46,6 +46,14 @@ func main() {
|
|||||||
cx, cy = robotgo.FindColorCS(388, 179, 300, 300, 0xAADCDC)
|
cx, cy = robotgo.FindColorCS(388, 179, 300, 300, 0xAADCDC)
|
||||||
fmt.Println("pos...", cx, cy)
|
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)
|
bit := robotgo.CaptureScreen(1, 2, 40, 40)
|
||||||
fmt.Println("CaptureScreen...", bit)
|
fmt.Println("CaptureScreen...", bit)
|
||||||
fx, fy = robotgo.FindBitmap(bit)
|
fx, fy = robotgo.FindBitmap(bit)
|
||||||
|
@ -182,6 +182,14 @@ func bitmap() {
|
|||||||
cx, cy = robotgo.FindColorCS(388, 179, 300, 300, 0xAADCDC)
|
cx, cy = robotgo.FindColorCS(388, 179, 300, 300, 0xAADCDC)
|
||||||
fmt.Println("pos...", cx, cy)
|
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)
|
bit := robotgo.CaptureScreen(1, 2, 40, 40)
|
||||||
fmt.Println("CaptureScreen...", bit)
|
fmt.Println("CaptureScreen...", bit)
|
||||||
fx, fy = robotgo.FindBitmap(bit)
|
fx, fy = robotgo.FindBitmap(bit)
|
||||||
|
Loading…
Reference in New Issue
Block a user