Esempio n. 1
0
func (s *Surface) GetBlendMode() (BlendMode, error) {
	var m C.SDL_BlendMode
	if C.SDL_GetSurfaceBlendMode(s.c(), &m) != 0 {
		return 0, getError()
	}

	return BlendMode(m), nil
}
Esempio n. 2
0
func (surface *Surface) GetBlendMode() (bm BlendMode, status int) {
	status = int(C.SDL_GetSurfaceBlendMode(surface.cptr(), bm.cptr()))
	return bm, status
}
Esempio n. 3
0
func (surface *Surface) GetBlendMode(blendMode *BlendMode) int {
	_surface := (*C.SDL_Surface)(unsafe.Pointer(surface))
	_blendMode := (*C.SDL_BlendMode)(unsafe.Pointer(blendMode))
	return (int)(C.SDL_GetSurfaceBlendMode(_surface, _blendMode))
}
Esempio n. 4
0
func (surface *Surface) GetBlendMode() (blendMode BlendMode, status int) {
	_surface := (*C.SDL_Surface)(unsafe.Pointer(surface))
	_blendMode := (*C.SDL_BlendMode)(unsafe.Pointer(&blendMode))
	status = (int)(C.SDL_GetSurfaceBlendMode(_surface, _blendMode))
	return blendMode, status
}
Esempio n. 5
0
// Surface (https://wiki.libsdl.org/SDL_GetSurfaceBlendMode)
func (surface *Surface) GetBlendMode() (bm BlendMode, err error) {
	if C.SDL_GetSurfaceBlendMode(surface.cptr(), bm.cptr()) != 0 {
		return bm, GetError()
	}
	return bm, nil
}