Esempio n. 1
0
func DrawLine(_red, _green, _blue, _alpha uint8, _x1, _y1, _x2, _y2 int) {
	sdl.SetRenderDrawColor(g_game.renderer, _red, _green, _blue, _alpha)
	sdl.SetRenderDrawBlendMode(g_game.renderer, sdl.BLENDMODE_BLEND)
	sdl.RenderDrawLine(g_game.renderer, _x1, _y1, _x2, _y2)
	sdl.SetRenderDrawBlendMode(g_game.renderer, sdl.BLENDMODE_NONE)
	sdl.SetRenderDrawColor(g_game.renderer, 0, 0, 0, 255)
}
Esempio n. 2
0
func (e *PU_Engine) DrawFillRect(_rect *PU_Rect, _color *sdl.Color, _alpha uint8) {
	sdl.SetRenderDrawColor(e.renderer, _color.R, _color.G, _color.B, _alpha)
	sdl.SetRenderDrawBlendMode(e.renderer, sdl.BLENDMODE_BLEND)
	sdl.RenderFillRect(e.renderer, *_rect.ToSDL())
	sdl.SetRenderDrawBlendMode(e.renderer, sdl.BLENDMODE_NONE)
	sdl.SetRenderDrawColor(e.renderer, 0, 0, 0, 255)
}
Esempio n. 3
0
func DrawRect(_rect *Rect, _red, _green, _blue, _alpha uint8) {
	sdl.SetRenderDrawColor(g_game.renderer, _red, _green, _blue, _alpha)
	sdl.SetRenderDrawBlendMode(g_game.renderer, sdl.BLENDMODE_BLEND)
	sdl.RenderDrawRect(g_game.renderer, *_rect.toSDL())
	sdl.SetRenderDrawBlendMode(g_game.renderer, sdl.BLENDMODE_NONE)
	sdl.SetRenderDrawColor(g_game.renderer, 0, 0, 0, 255)
}