Exemple #1
0
func (this Surface) UpdateRect(rect Rect) {
	c_surface := (*C.SDL_Surface)(this.Ptr)
	c_x := C.Sint32(rect.X)
	c_y := C.Sint32(rect.Y)
	c_w := C.Uint32(rect.W)
	c_h := C.Uint32(rect.H)
	C.SDL_UpdateRect(c_surface, c_x, c_y, c_w, c_h)
}
Exemple #2
0
// Makes sure the given area is updated on the given screen.  If x, y, w, and
// h are all 0, the whole screen will be updated.
func (screen *Surface) UpdateRect(x int32, y int32, w uint32, h uint32) {
	GlobalMutex.Lock()
	screen.mutex.Lock()

	C.SDL_UpdateRect(screen.cSurface, C.Sint32(x), C.Sint32(y), C.Uint32(w), C.Uint32(h))

	screen.mutex.Unlock()
	GlobalMutex.Unlock()
}
Exemple #3
0
// Makes sure the given area is updated on the given screen.  If x, y, w, and
// h are all 0, the whole screen will be updated.
func (screen *Surface) UpdateRect(x int32, y int32, w uint32, h uint32) {
	C.SDL_UpdateRect((*C.SDL_Surface)(cast(screen)), C.Sint32(x), C.Sint32(y), C.Uint32(w), C.Uint32(h))
}
Exemple #4
0
// Makes sure the given list of rectangles is updated on the given screen.
// If 'x', 'y', 'w' and 'h' are all 0, SDL_UpdateRect will update the entire
// screen.
// These functions should not be called while 'screen' is locked.
// extern DECLSPEC void SDLCALL SDL_UpdateRects
//		(SDL_Surface *screen, int numrects, SDL_Rect *rects);
func updateRect(screen *C.SDL_Surface, x, y int32, w, h uint32) {
	C.SDL_UpdateRect(screen, C.Sint32(x), C.Sint32(y), C.Uint32(w), C.Uint32(h))
}