示例#1
0
文件: surface.go 项目: willemvds/sdl
func (s *Surface) SetAlphaMod(a uint8) error {
	if C.SDL_SetSurfaceAlphaMod(s.c(), C.Uint8(a)) != 0 {
		return getError()
	}

	return nil
}
示例#2
0
func (surface *Surface) SetAlphaMod(alpha uint8) int {
	return int(C.SDL_SetSurfaceAlphaMod(surface.cptr(), C.Uint8(alpha)))
}
示例#3
0
func (surface *Surface) SetAlphaMod(alpha uint8) int {
	_surface := (*C.SDL_Surface)(unsafe.Pointer(surface))
	_alpha := (C.Uint8)(alpha)
	return (int)(C.SDL_SetSurfaceAlphaMod(_surface, _alpha))
}
示例#4
0
文件: surface.go 项目: emlai/go-sdl2
// Surface (https://wiki.libsdl.org/SDL_SetSurfaceAlphaMod)
func (surface *Surface) SetAlphaMod(alpha uint8) error {
	if C.SDL_SetSurfaceAlphaMod(surface.cptr(), C.Uint8(alpha)) != 0 {
		return GetError()
	}
	return nil
}