Пример #1
0
func (t *Texture) GetAlphaMod() (uint8, error) {
	var a C.Uint8
	if C.SDL_GetTextureAlphaMod(t.c, &a) != 0 {
		return 0, getError()
	}

	return uint8(a), nil
}
Пример #2
0
// Texture (https://wiki.libsdl.org/SDL_GetTextureAlphaMod)
func (texture *Texture) GetAlphaMod() (alpha uint8, err error) {
	_alpha := (*C.Uint8)(unsafe.Pointer(&alpha))
	_ret := C.SDL_GetTextureAlphaMod(texture.cptr(), _alpha)
	if _ret < 0 {
		err = GetError()
		return alpha, err
	}
	return alpha, nil
}
Пример #3
0
func (texture *Texture) GetAlphaMod() (alpha uint8, status int) {
	_alpha := (*C.Uint8)(unsafe.Pointer(&alpha))
	status = int(C.SDL_GetTextureAlphaMod(texture.cptr(), _alpha))
	return alpha, status
}