mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-03 07:33:55 +00:00
update bitmap examples code
This commit is contained in:
parent
14bf2aeab4
commit
3578a97a28
@ -122,6 +122,26 @@ func bitmapTest(bmp robotgo.CBitmap) {
|
|||||||
fmt.Println("FindBitmap------", fx, fy)
|
fmt.Println("FindBitmap------", fx, fy)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func findBitmap(bmp robotgo.CBitmap) {
|
||||||
|
fx, fy := robotgo.FindBitmap(robotgo.ToMMBitmapRef(bmp))
|
||||||
|
fmt.Println("findBitmap: ", fx, fy)
|
||||||
|
|
||||||
|
fx, fy = robotgo.FindCBitmap(bmp)
|
||||||
|
fmt.Println("findCBitmap: ", fx, fy)
|
||||||
|
fx, fy = robotgo.FindCBitmap(bmp, nil, 0.1)
|
||||||
|
fmt.Println("findCBitmap: ", fx, fy)
|
||||||
|
|
||||||
|
// open image bitmap
|
||||||
|
openbit := robotgo.OpenBitmap("test.tif")
|
||||||
|
fmt.Println("openBitmap...", openbit)
|
||||||
|
|
||||||
|
fx, fy = robotgo.FindBitmap(openbit)
|
||||||
|
fmt.Println("FindBitmap------", fx, fy)
|
||||||
|
|
||||||
|
fx, fy = robotgo.FindPic("test.tif")
|
||||||
|
fmt.Println("FindPic------", fx, fy)
|
||||||
|
}
|
||||||
|
|
||||||
func bitmap() {
|
func bitmap() {
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Bitmap
|
// Bitmap
|
||||||
@ -157,24 +177,6 @@ func bitmap() {
|
|||||||
// robotgo.FreeBitmap(bitmap)
|
// robotgo.FreeBitmap(bitmap)
|
||||||
}
|
}
|
||||||
|
|
||||||
func findBitmap(bmp robotgo.CBitmap) {
|
|
||||||
fx, fy := robotgo.FindBitmap(robotgo.ToMMBitmapRef(bmp))
|
|
||||||
fmt.Println("findBitmap: ", fx, fy)
|
|
||||||
|
|
||||||
fx, fy = robotgo.FindCBitmap(bmp)
|
|
||||||
fmt.Println("findCBitmap: ", fx, fy)
|
|
||||||
|
|
||||||
// open image bitmap
|
|
||||||
openbit := robotgo.OpenBitmap("test.tif")
|
|
||||||
fmt.Println("openBitmap...", openbit)
|
|
||||||
|
|
||||||
fx, fy = robotgo.FindBitmap(openbit)
|
|
||||||
fmt.Println("FindBitmap------", fx, fy)
|
|
||||||
|
|
||||||
fx, fy = robotgo.FindPic("test.tif")
|
|
||||||
fmt.Println("FindPic------", fx, fy)
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
bitmap()
|
bitmap()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user