func SavePNG(surface *sdl.Surface, file string) error { _surface := (*C.SDL_Surface)(unsafe.Pointer(surface)) _file := C.CString(file) C.free(unsafe.Pointer(_file)) _ret := C.IMG_SavePNG(_surface, _file) if _ret < 0 { return GetError() } return nil }
func SavePNG(file string, s *sdl.Surface, compression int) int { cfile := C.CString(file) defer C.free(unsafe.Pointer(cfile)) res := C.IMG_SavePNG(cfile, (*C.SDL_Surface)(unsafe.Pointer(s)), C.int(compression)) return int(res) }
func SavePNG(surface *sdl.Surface, file string) int { _surface := (*C.SDL_Surface)(unsafe.Pointer(surface)) _file := C.CString(file) C.free(unsafe.Pointer(_file)) return int(C.IMG_SavePNG(_surface, _file)) }