本文整理匯總了Golang中C.Sint16函數的典型用法代碼示例。如果您正苦於以下問題:Golang Sint16函數的具體用法?Golang Sint16怎麽用?Golang Sint16使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了Sint16函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: CharacterColor
func CharacterColor(renderer *sdl.Renderer, x, y int, c byte, color sdl.Color) bool {
_x := C.Sint16(x)
_y := C.Sint16(y)
_c := C.char(c)
_color := C.Uint32(gfxColor(color))
return C.characterColor(renderer, _x, _y, _c, _color) == 0
}
示例2: FilledCircleColor
func FilledCircleColor(renderer *sdl.Renderer, x, y, rad int, color sdl.Color) bool {
_x := C.Sint16(x)
_y := C.Sint16(y)
_rad := C.Sint16(rad)
_color := C.Uint32(gfxColor(color))
return C.filledCircleColor(renderer, _x, _y, _rad, _color) == 0
}
示例3: StringColor
func StringColor(renderer *sdl.Renderer, x, y int, s string, color sdl.Color) bool {
_x := C.Sint16(x)
_y := C.Sint16(y)
_s := C.CString(s)
_color := C.Uint32(gfxColor(color))
return C.stringColor(renderer, _x, _y, _s, _color) == 0
}
示例4: HlineColor
func HlineColor(renderer *sdl.Renderer, x1, x2, y int, color sdl.Color) bool {
_x1 := C.Sint16(x1)
_x2 := C.Sint16(x2)
_y := C.Sint16(y)
_color := C.Uint32(gfxColor(color))
return C.hlineColor(renderer, _x1, _x2, _y, _color) == 0
}
示例5: VlineColor
func VlineColor(renderer *sdl.Renderer, x, y1, y2 int, color sdl.Color) bool {
_x := C.Sint16(x)
_y1 := C.Sint16(y1)
_y2 := C.Sint16(y2)
_color := C.Uint32(gfxColor(color))
return C.vlineColor(renderer, _x, _y1, _y2, _color) == 0
}
示例6: DrawImage
//Draws the image at the given coordinates.
func (me *Canvas) DrawImage(img *Image, x, y int) {
C.SDL_SetAlpha(img.img, C.SDL_SRCALPHA, 255)
var dest C.SDL_Rect
dest.x = C.Sint16(x + me.origin.X)
dest.y = C.Sint16(y + me.origin.Y)
C.SDL_BlitSurface(img.img, nil, me.pane, &dest)
}
示例7: toSDL_Rect
func toSDL_Rect(b util.Bounds) C.SDL_Rect {
var r C.SDL_Rect
r.x = C.Sint16(b.X)
r.y = C.Sint16(b.Y)
r.w = C.Uint16(b.Width)
r.h = C.Uint16(b.Height)
return r
}
示例8: AALineColor
func AALineColor(renderer *sdl.Renderer, x1, y1, x2, y2 int, color sdl.Color) bool {
_x1 := C.Sint16(x1)
_y1 := C.Sint16(y1)
_x2 := C.Sint16(x2)
_y2 := C.Sint16(y2)
_color := C.Uint32(gfxColor(color))
return C.aalineColor(renderer, _x1, _y1, _x2, _y2, _color) == 0
}
示例9: sdl_Rect
func sdl_Rect(x, y, width, height int) C.SDL_Rect {
var r C.SDL_Rect
r.x = C.Sint16(x)
r.y = C.Sint16(y)
r.w = C.Uint16(width)
r.h = C.Uint16(height)
return r
}
示例10: FilledEllipseColor
func FilledEllipseColor(renderer *sdl.Renderer, x, y, rx, ry int, color sdl.Color) bool {
_x := C.Sint16(x)
_y := C.Sint16(y)
_rx := C.Sint16(rx)
_ry := C.Sint16(ry)
_color := C.Uint32(gfxColor(color))
return C.filledEllipseColor(renderer, _x, _y, _rx, _ry, _color) == 0
}
示例11: FilledPieColor
func FilledPieColor(renderer *sdl.Renderer, x, y, rad, start, end int, color sdl.Color) bool {
_x := C.Sint16(x)
_y := C.Sint16(y)
_rad := C.Sint16(rad)
_start := C.Sint16(start)
_end := C.Sint16(end)
_color := C.Uint32(gfxColor(color))
return C.filledPieColor(renderer, _x, _y, _rad, _start, _end, _color) == 0
}
示例12: ThickLineColor
func ThickLineColor(renderer *sdl.Renderer, x1, y1, x2, y2, width int, color sdl.Color) bool {
_x1 := C.Sint16(x1)
_y1 := C.Sint16(y1)
_x2 := C.Sint16(x2)
_y2 := C.Sint16(y2)
_width := C.Uint8(width)
_color := C.Uint32(gfxColor(color))
return C.thickLineColor(renderer, _x1, _y1, _x2, _y2, _width, _color) == 0
}
示例13: RoundedBoxColor
func RoundedBoxColor(renderer *sdl.Renderer, x1, y1, x2, y2, rad int, color sdl.Color) bool {
_x1 := C.Sint16(x1)
_y1 := C.Sint16(y1)
_x2 := C.Sint16(x2)
_y2 := C.Sint16(y2)
_rad := C.Sint16(rad)
_color := C.Uint32(gfxColor(color))
return C.roundedBoxColor(renderer, _x1, _y1, _x2, _y2, _rad, _color) == 0
}
示例14: PixelRGBA
func PixelRGBA(renderer *sdl.Renderer, x, y int, r, g, b, a uint8) bool {
_x := C.Sint16(x)
_y := C.Sint16(y)
_r := C.Uint8(r)
_g := C.Uint8(g)
_b := C.Uint8(b)
_a := C.Uint8(a)
return C.pixelRGBA(renderer, _x, _y, _r, _g, _b, _a) == 0
}
示例15: convertRect
func convertRect(rect image.Rectangle) C.SDL_Rect {
rect = rect.Canon()
return C.SDL_Rect{
C.Sint16(rect.Min.X),
C.Sint16(rect.Min.Y),
C.Uint16(rect.Max.X - rect.Min.X),
C.Uint16(rect.Max.Y - rect.Min.Y),
}
}