當前位置: 首頁>>代碼示例>>Golang>>正文


Golang C.SDL_UpdateRect函數代碼示例

本文整理匯總了Golang中C.SDL_UpdateRect函數的典型用法代碼示例。如果您正苦於以下問題:Golang SDL_UpdateRect函數的具體用法?Golang SDL_UpdateRect怎麽用?Golang SDL_UpdateRect使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了SDL_UpdateRect函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: UpdateRect

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)
}
開發者ID:badgerodon,項目名稱:go,代碼行數:8,代碼來源:surface.go

示例2: UpdateRect

// 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()
}
開發者ID:kearsley,項目名稱:Go-SDL,代碼行數:11,代碼來源:sdl.go

示例3: UpdateRect

// 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))
}
開發者ID:gnanderson,項目名稱:Go-SDL,代碼行數:5,代碼來源:sdl.go

示例4: updateRect

// 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))
}
開發者ID:beoran,項目名稱:fungo,代碼行數:9,代碼來源:video.go


注:本文中的C.SDL_UpdateRect函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。