mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-03 23:53:54 +00:00
add bitmap from string clear api
This commit is contained in:
parent
43958d71e2
commit
0d6d65418e
@ -1041,6 +1041,11 @@ func OpenImg(path string) []byte {
|
|||||||
|
|
||||||
// BitmapStr bitmap from string
|
// BitmapStr bitmap from string
|
||||||
func BitmapStr(str string) C.MMBitmapRef {
|
func BitmapStr(str string) C.MMBitmapRef {
|
||||||
|
return BitmapFromStr(str)
|
||||||
|
}
|
||||||
|
|
||||||
|
// BitmapFromStr bitmap from string
|
||||||
|
func BitmapFromStr(str string) C.MMBitmapRef {
|
||||||
cs := C.CString(str)
|
cs := C.CString(str)
|
||||||
bit := C.bitmap_from_string(cs)
|
bit := C.bitmap_from_string(cs)
|
||||||
C.free(unsafe.Pointer(cs))
|
C.free(unsafe.Pointer(cs))
|
||||||
|
Loading…
Reference in New Issue
Block a user