Exemplo n.º 1
0
// Renderer (https://wiki.libsdl.org/SDL_RenderSetScale)
func (renderer *Renderer) SetScale(scaleX, scaleY float32) error {
	_scaleX := C.float(scaleX)
	_scaleY := C.float(scaleY)
	_ret := C.SDL_RenderSetScale(renderer.cptr(), _scaleX, _scaleY)
	if _ret < 0 {
		return GetError()
	}
	return nil
}
Exemplo n.º 2
0
func (renderer *Renderer) SetScale(scaleX, scaleY float32) int {
	_renderer := (*C.SDL_Renderer)(unsafe.Pointer(renderer))
	_scaleX := (C.float)(scaleX)
	_scaleY := (C.float)(scaleY)
	return (int)(C.SDL_RenderSetScale(_renderer, _scaleX, _scaleY))
}
Exemplo n.º 3
0
func (renderer *Renderer) SetScale(scaleX, scaleY float32) int {
	_scaleX := C.float(scaleX)
	_scaleY := C.float(scaleY)
	return int(C.SDL_RenderSetScale(renderer.cptr(), _scaleX, _scaleY))
}