Exemplo n.º 1
0
func (s *Surface) FillRects(r []Rect, c uint32) error {
	if C.SDL_FillRects(s.c(), (*C.SDL_Rect)(unsafe.Pointer(&r[0])), C.int(len(r)), C.Uint32(c)) != 0 {
		return getError()
	}

	return nil
}
Exemplo n.º 2
0
func (surface *Surface) FillRects(rects *Rect, count int, color uint32) int {
	_surface := (*C.SDL_Surface)(unsafe.Pointer(surface))
	_rects := (*C.SDL_Rect)(unsafe.Pointer(rects))
	_count := (C.int)(count)
	_color := (C.Uint32)(color)
	return (int)(C.SDL_FillRects(_surface, _rects, _count, _color))
}
Exemplo n.º 3
0
func (surface *Surface) FillRects(rects []Rect, color uint32) int {
	return int(C.SDL_FillRects(surface.cptr(), rects[0].cptr(), C.int(len(rects)), C.Uint32(color)))
}
Exemplo n.º 4
0
// Surface (https://wiki.libsdl.org/SDL_FillRects)
func (surface *Surface) FillRects(rects []Rect, color uint32) error {
	if C.SDL_FillRects(surface.cptr(), rects[0].cptr(), C.int(len(rects)), C.Uint32(color)) != 0 {
		return GetError()
	}
	return nil
}