mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-01 14:43:55 +00:00
change test for ToBitmap
This commit is contained in:
parent
b5676fa258
commit
f5d29c0739
@ -1,17 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"reflect"
|
|
||||||
|
|
||||||
"github.com/go-vgo/robotgo"
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
|
|
||||||
var bitmap robotgo.Bitmap
|
|
||||||
bit := robotgo.OpenBitmap("./test.bmp", 2)
|
|
||||||
bitmap = robotgo.ToBitmap(bit)
|
|
||||||
fmt.Println("...type", reflect.TypeOf(bit), reflect.TypeOf(bitmap))
|
|
||||||
|
|
||||||
}
|
|
@ -12,6 +12,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"reflect"
|
||||||
|
|
||||||
"github.com/go-vgo/robotgo"
|
"github.com/go-vgo/robotgo"
|
||||||
)
|
)
|
||||||
@ -58,6 +59,11 @@ func aRobotgo() {
|
|||||||
|
|
||||||
robotgo.SaveBitmap(bitmap, "test.png", 1)
|
robotgo.SaveBitmap(bitmap, "test.png", 1)
|
||||||
|
|
||||||
|
var bitmapTest robotgo.Bitmap
|
||||||
|
bitTest := robotgo.OpenBitmap("test.png")
|
||||||
|
bitmapTest = robotgo.ToBitmap(bitTest)
|
||||||
|
fmt.Println("...type", reflect.TypeOf(bitTest), reflect.TypeOf(bitmapTest))
|
||||||
|
|
||||||
// robotgo.MouseClick()
|
// robotgo.MouseClick()
|
||||||
robotgo.ScrollMouse(10, "up")
|
robotgo.ScrollMouse(10, "up")
|
||||||
}
|
}
|
||||||
|
BIN
test/test.bmp
BIN
test/test.bmp
Binary file not shown.
Before Width: | Height: | Size: 16 KiB |
Loading…
Reference in New Issue
Block a user