Example #1
0
func (r *Renderer) FillRect(rect *Rect) {
	GlobalMutex.Lock()
	defer GlobalMutex.Unlock()

	fmt.Printf("null? %t\n", r.cRenderer == nil)
	C.SDL_RenderFillRect(r.cRenderer, (*C.SDL_Rect)(cast(rect)))
}
Example #2
0
// Renderer (https://wiki.libsdl.org/SDL_RenderFillRect)
func (renderer *Renderer) FillRect(rect *Rect) error {
	_ret := C.SDL_RenderFillRect(renderer.cptr(), rect.cptr())
	if _ret < 0 {
		return GetError()
	}
	return nil
}
Example #3
0
func (r *Renderer) FillRect(rect *Rect) error {
	if C.SDL_RenderFillRect(r.c, rect.c()) != 0 {
		return getError()
	}

	return nil
}
Example #4
0
func FillRect(x, y, w, h int, c Color) {
	var rect C.SDL_Rect
	rect.x = C.int(x)
	rect.y = C.int(y)
	rect.w = C.int(w)
	rect.h = C.int(h)
	C.SDL_SetRenderDrawColor(renderer, C.Uint8(c.Red), C.Uint8(c.Green), C.Uint8(c.Blue), C.Uint8(c.Alpha))
	C.SDL_RenderFillRect(renderer, &rect)
}
Example #5
0
func RenderFillRect(_renderer *Renderer, _rect Rect) {
	C.SDL_RenderFillRect(_renderer.Get(), (*C.SDL_Rect)(cast(&_rect)))
}
Example #6
0
func (r *Renderer) FillRect(rect *Rect) bool {
	ret := C.SDL_RenderFillRect(r.cRenderer, (*C.SDL_Rect)(cast(rect)))
	return int(ret) == 0
}
Example #7
0
func (renderer *Renderer) FillRect(rect *Rect) int {
	_renderer := (*C.SDL_Renderer)(unsafe.Pointer(renderer))
	_rect := (*C.SDL_Rect)(unsafe.Pointer(rect))
	return (int)(C.SDL_RenderFillRect(_renderer, _rect))
}
Example #8
0
func (renderer *Renderer) FillRect(rect *Rect) int {
	return int(C.SDL_RenderFillRect(renderer.cptr(), rect.cptr()))
}