Beispiel #1
0
	def draw_line(self, x1, y1, x2, y2, color):
		assert self.handle is not None
		sdl.setRenderDrawColor(self.handle, color[0], color[1], color[2], color[3] if len(color) > 3 else 255)
		sdl.renderDrawLine(self.handle, x1, y1, x2, y2)
Beispiel #2
0
	def clear(self):
		assert self.handle is not None
		sdl.setRenderDrawColor(self.handle, 0, 0, 0, 255)
		if sdl.renderClear(self.handle) != 0:
			raise SDLException("Could not clear screen")