当前位置: 首页>>代码示例>>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;未经允许,请勿转载。