Пример #1
0
// Renderer (https://wiki.libsdl.org/SDL_RenderDrawRect)
func (renderer *Renderer) DrawRect(rect *Rect) error {
	_ret := C.SDL_RenderDrawRect(renderer.cptr(), rect.cptr())
	if _ret < 0 {
		return GetError()
	}
	return nil
}
Пример #2
0
func (r *Renderer) DrawRect(rect *Rect) error {
	if C.SDL_RenderDrawRect(r.c, rect.c()) != 0 {
		return getError()
	}

	return nil
}
Пример #3
0
func RenderDrawRect(_renderer *Renderer, _rect Rect) {
	C.SDL_RenderDrawRect(_renderer.Get(), (*C.SDL_Rect)(cast(&_rect)))
}
Пример #4
0
func (r *Renderer) DrawRect(rect *Rect) bool {
	ret := C.SDL_RenderDrawRect(r.cRenderer, (*C.SDL_Rect)(cast(rect)))
	return int(ret) == 0
}
Пример #5
0
func (renderer *Renderer) DrawRect(rect *Rect) int {
	_renderer := (*C.SDL_Renderer)(unsafe.Pointer(renderer))
	_rect := (*C.SDL_Rect)(unsafe.Pointer(rect))
	return (int)(C.SDL_RenderDrawRect(_renderer, _rect))
}
Пример #6
0
func (renderer *Renderer) DrawRect(rect *Rect) int {
	return int(C.SDL_RenderDrawRect(renderer.cptr(), rect.cptr()))
}