#!/bin/python
import pygame, sys
green = (0, 255, 0)
black = (0, 0, 0)
red = (255, 0, 0)
pygame.init()
sc = pygame.display.set_mode((500, 700))
pygame.display.set_caption("Супер дерево на pygame")
while True:
sc.fill((125,125,125))
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
pygame.draw.arc(sc, green,(130, 50, 210, 150),0,3.14, 3)
pygame.draw.arc(sc, green,(100, 100, 210, 150),0.5*3.14,3.14, 3)
pygame.draw.arc(sc, green,(100, 120, 210, 150),3.14,3.14*1.5, 3)
pygame.draw.arc(sc, green,(150, 100, 210, 150),0,3.14*0.5, 3)
pygame.draw.arc(sc, green,(150, 120, 210, 150),3.14*1.5,3.14*2, 3)
pygame.draw.line(sc, black, [250, 250], [250,500], 3)
pygame.draw.line(sc, black, [200, 250], [200,500], 3)
pygame.display.flip()
pygame.image.save(sc, "image.png")
|