mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 06:33:56 +00:00
Update findbit api to classics
This commit is contained in:
parent
e1cc58e554
commit
7ecdc2b938
@ -191,7 +191,7 @@ func main() {
|
||||
bitmap := robotgo.CaptureScreen(10, 20, 30, 40)
|
||||
fmt.Println("...", bitmap)
|
||||
|
||||
fx, fy := robotgo.FindBit(bitmap)
|
||||
fx, fy := robotgo.FindBitmap(bitmap)
|
||||
fmt.Println("FindBitmap------", fx, fy)
|
||||
|
||||
robotgo.SaveBitmap(bitmap, "test.png")
|
||||
|
@ -189,7 +189,7 @@ func main() {
|
||||
bitmap := robotgo.CaptureScreen(10, 20, 30, 40)
|
||||
fmt.Println("...", bitmap)
|
||||
|
||||
fx, fy := robotgo.FindBit(bitmap)
|
||||
fx, fy := robotgo.FindBitmap(bitmap)
|
||||
fmt.Println("FindBitmap------", fx, fy)
|
||||
|
||||
robotgo.SaveBitmap(bitmap, "test.png")
|
||||
|
@ -31,14 +31,14 @@ func main() {
|
||||
fmt.Println("CaptureScreen...", bitmap)
|
||||
|
||||
// searches for needle in bitmap
|
||||
fx, fy := robotgo.FindBitmap(bitmap)
|
||||
fx, fy := robotgo.FindBit(bitmap)
|
||||
fmt.Println("FindBitmap------", fx, fy)
|
||||
|
||||
bit := robotgo.CaptureScreen(1, 2, 40, 40)
|
||||
fmt.Println("CaptureScreen...", bit)
|
||||
fx, fy = robotgo.FindBit(bit)
|
||||
fx, fy = robotgo.FindBitmap(bit)
|
||||
fmt.Println("FindBitmap------", fx, fy)
|
||||
fx, fy = robotgo.FindBit(bit, bitmap)
|
||||
fx, fy = robotgo.FindBitmap(bit, bitmap)
|
||||
fmt.Println("FindBitmap------", fx, fy)
|
||||
|
||||
// returns new bitmap object created from a portion of another
|
||||
|
@ -138,14 +138,14 @@ func bitmap() {
|
||||
fmt.Println("CaptureScreen...", bitmap)
|
||||
|
||||
// searches for needle in bitmap
|
||||
fx, fy := robotgo.FindBitmap(bitmap)
|
||||
fx, fy := robotgo.FindBit(bitmap)
|
||||
fmt.Println("FindBitmap------", fx, fy)
|
||||
|
||||
bit := robotgo.CaptureScreen(1, 2, 40, 40)
|
||||
fmt.Println("CaptureScreen...", bit)
|
||||
fx, fy = robotgo.FindBit(bit)
|
||||
fx, fy = robotgo.FindBitmap(bit)
|
||||
fmt.Println("FindBitmap------", fx, fy)
|
||||
fx, fy = robotgo.FindBit(bit, bitmap)
|
||||
fx, fy = robotgo.FindBitmap(bit, bitmap)
|
||||
fmt.Println("FindBitmap------", fx, fy)
|
||||
|
||||
// returns new bitmap object created from a portion of another
|
||||
|
@ -571,8 +571,8 @@ func SetKeyboardDelay(x int) {
|
||||
|______/ |__| |__| |__| |__| /__/ \__\ | _|
|
||||
*/
|
||||
|
||||
// FindBit find the bitmap
|
||||
func FindBit(args ...interface{}) (int, int) {
|
||||
// FindBitmap find the bitmap
|
||||
func FindBitmap(args ...interface{}) (int, int) {
|
||||
var (
|
||||
bit C.MMBitmapRef
|
||||
sbit C.MMBitmapRef
|
||||
@ -597,8 +597,8 @@ func FindBit(args ...interface{}) (int, int) {
|
||||
return int(pos.x), int(pos.y)
|
||||
}
|
||||
|
||||
// FindBitmap find the bitmap
|
||||
func FindBitmap(args ...interface{}) (int, int) {
|
||||
// FindBit find the bitmap
|
||||
func FindBit(args ...interface{}) (int, int) {
|
||||
var bit C.MMBitmapRef
|
||||
bit = args[0].(C.MMBitmapRef)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user