Example #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
}
Example #2
0
func (r *Renderer) DrawRect(rect *Rect) error {
	if C.SDL_RenderDrawRect(r.c, rect.c()) != 0 {
		return getError()
	}

	return nil
}
Example #3
0
func RenderDrawRect(_renderer *Renderer, _rect Rect) {
	C.SDL_RenderDrawRect(_renderer.Get(), (*C.SDL_Rect)(cast(&_rect)))
}
Example #4
0
func (r *Renderer) DrawRect(rect *Rect) bool {
	ret := C.SDL_RenderDrawRect(r.cRenderer, (*C.SDL_Rect)(cast(rect)))
	return int(ret) == 0
}
Example #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))
}
Example #6
0
func (renderer *Renderer) DrawRect(rect *Rect) int {
	return int(C.SDL_RenderDrawRect(renderer.cptr(), rect.cptr()))
}