change test for ToBitmap

This commit is contained in:
weilong 2017-12-24 21:02:14 +08:00
parent b5676fa258
commit f5d29c0739
3 changed files with 6 additions and 17 deletions

View File

@ -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))
}

View File

@ -12,6 +12,7 @@ package main
import (
"fmt"
"reflect"
"github.com/go-vgo/robotgo"
)
@ -58,6 +59,11 @@ func aRobotgo() {
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.ScrollMouse(10, "up")
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB