func (r *Renderer) DrawRects(rects []Rect) error { if C.SDL_RenderDrawRects(r.c, (*C.SDL_Rect)(unsafe.Pointer(&rects[0])), C.int(len(rects))) != 0 { return getError() } return nil }
// Renderer (https://wiki.libsdl.org/SDL_RenderDrawRects) func (renderer *Renderer) DrawRects(rects []Rect) error { _ret := C.SDL_RenderDrawRects(renderer.cptr(), rects[0].cptr(), C.int(len(rects))) if _ret < 0 { return GetError() } return nil }
func (r *Renderer) DrawRects(rects []Rect) bool { prects := unsafe.Pointer(&rects[0]) n := len(rects) ret := C.SDL_RenderDrawRects(r.cRenderer, (*C.SDL_Rect)(prects), C.int(n)) return int(ret) == 0 }
func (renderer *Renderer) DrawRects(rects *[]Rect, count int) int { _renderer := (*C.SDL_Renderer)(unsafe.Pointer(renderer)) _rects := (*C.SDL_Rect)(unsafe.Pointer(&(*rects)[0])) _count := (C.int)(count) return (int)(C.SDL_RenderDrawRects(_renderer, _rects, _count)) }
func (renderer *Renderer) DrawRects(rects []Rect) int { _renderer := (*C.SDL_Renderer)(unsafe.Pointer(renderer)) _rects := (*C.SDL_Rect)(unsafe.Pointer(&rects[0])) _count := (C.int)(len(rects)) return (int)(C.SDL_RenderDrawRects(_renderer, _rects, _count)) }
func (renderer *Renderer) DrawRects(rects []Rect) int { return int(C.SDL_RenderDrawRects(renderer.cptr(), rects[0].cptr(), C.int(len(rects)))) }
// DrawRects draws some number of rectangles on the canvas. func (c Canvas) DrawRects(rects ...image.Rectangle) { if C.SDL_RenderDrawRects(c.win.rend, sdlRects(rects), C.int(len(rects))) < 0 { panic(sdlError()) } }