Пример #1
0
// SaveBMP saves the src surface as a Windows BMP to file.
func (src *Surface) SaveBMP(file string) int {
	GlobalMutex.Lock()
	cfile := C.CString(file)
	// SDL_SaveBMP is a macro.
	res := int(C.__SDL_SaveBMP(src.cSurface, cfile))
	C.free(unsafe.Pointer(cfile))
	GlobalMutex.Unlock()
	return res
}
Пример #2
0
func (src *Surface) SaveBMP(file string) int {
	cfile := C.CString(file)
	res := C.__SDL_SaveBMP((*C.SDL_Surface)(cast(src)), cfile)
	C.free(unsafe.Pointer(cfile))
	return int(res)
}