Exemple #1
0
	def draw(self,surf):
		u.circle(surf,self.color,[self.x,self.y],self.s/2)
Exemple #2
0
		x[...] = (x-25+twave*25)/(1.3-twave*0.3)




if __name__ == "__main__":
	screen = pygame.display.set_mode([640,320])
	clock = pygame.time.Clock()
	print screen.get_bitsize()
	t = 0
	while 1:
		t += 100
		for event in pygame.event.get():
			if event.type == pygame.QUIT: sys.exit()

		array = []
		screen.fill([200,200,200])

		u.circle(screen,(100,100,100),[50,50],50)

		clock.tick()
		u.text(screen,10,10,"FPS: %.1f" % clock.get_fps(),(150,150,150))



		array = [pygame.surfarray.pixels_red(screen),pygame.surfarray.pixels_green(screen),pygame.surfarray.pixels_blue(screen)]

		filter(array,t)
		#pygame.surfarray.blit_array(screen,array)
		pygame.display.flip()
Exemple #3
0
	def draw(self,surf):
		#u.circle(surf,(245,245,245),[self.x,self.y+1],self.s/2)
		u.circle(surf,self.color,[self.x,self.y],self.s/2)
Exemple #4
0
	def circle(self,surf,pos,radius):
		u.circle(surf,self.color,[self.x+pos[0]*self.s*self.dir,self.y+self.yo+pos[1]*self.s],radius*self.s)
Exemple #5
0
        x[...] = (x - 25 + twave * 25) / (1.3 - twave * 0.3)


if __name__ == "__main__":
    screen = pygame.display.set_mode([640, 320])
    clock = pygame.time.Clock()
    print screen.get_bitsize()
    t = 0
    while 1:
        t += 100
        for event in pygame.event.get():
            if event.type == pygame.QUIT: sys.exit()

        array = []
        screen.fill([200, 200, 200])

        u.circle(screen, (100, 100, 100), [50, 50], 50)

        clock.tick()
        u.text(screen, 10, 10, "FPS: %.1f" % clock.get_fps(), (150, 150, 150))

        array = [
            pygame.surfarray.pixels_red(screen),
            pygame.surfarray.pixels_green(screen),
            pygame.surfarray.pixels_blue(screen)
        ]

        filter(array, t)
        #pygame.surfarray.blit_array(screen,array)
        pygame.display.flip()