func CreateNavitation(mapid int, path string, file string, maptyp int) int { cpath := C.CString(path) cfile := C.CString(file) defer C.Free(unsafe.Pointer(cpath)) defer C.Free(unsafe.Pointer(cfile)) res := C.CreateNavigation(C.int(mapid), cpath, cfile, C.int(maptyp)) return int(res) }
// ScreenShot takes a screenshot and returns it in jpeg format with given // quality. This is not threadsafe. func ScreenShot(quality float64) ([]byte, error) { C.JPEG(C.float(quality)) data := (*[1 << 30]byte)(unsafe.Pointer(C.Data()))[0:C.Length()] newData := make([]byte, C.Length()) copy(newData, data) C.Free() return newData, nil }
func Clean() { C.Free() }