add bitmap from string clear api

This commit is contained in:
vcaesar 2019-03-30 13:23:38 -04:00
parent 43958d71e2
commit 0d6d65418e

View File

@ -1041,6 +1041,11 @@ func OpenImg(path string) []byte {
// BitmapStr bitmap from string
func BitmapStr(str string) C.MMBitmapRef {
return BitmapFromStr(str)
}
// BitmapFromStr bitmap from string
func BitmapFromStr(str string) C.MMBitmapRef {
cs := C.CString(str)
bit := C.bitmap_from_string(cs)
C.free(unsafe.Pointer(cs))