示例#1
0
文件: render.go 项目: emlai/go-sdl2
// Renderer (https://wiki.libsdl.org/SDL_RenderSetLogicalSize)
func (renderer *Renderer) SetLogicalSize(w int, h int) error {
	_ret := C.SDL_RenderSetLogicalSize(renderer.cptr(), C.int(w), C.int(h))
	if _ret < 0 {
		return GetError()
	}
	return nil
}
示例#2
0
func (renderer *Renderer) SetLogicalSize(w int, h int) int {
	_renderer := (*C.SDL_Renderer)(unsafe.Pointer(renderer))
	_w := (C.int)(w)
	_h := (C.int)(h)
	return (int)(C.SDL_RenderSetLogicalSize(_renderer, _w, _h))
}
示例#3
0
func (r *Renderer) SetLogicalSize(w, h int) int {
	ret := C.SDL_RenderSetLogicalSize(r.cRenderer, C.int(w), C.int(h))
	return int(ret)
}
示例#4
0
func (renderer *Renderer) SetLogicalSize(w int, h int) int {
	return int(C.SDL_RenderSetLogicalSize(renderer.cptr(), C.int(w), C.int(h)))
}