#!/bin/python
import pygame, sys
pygame.init()
sc = pygame.display.set_mode((500, 500))
pygame.display.set_caption("Круг на прямоугольниках")
while True:
sc.fill((125,125,125))
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
pygame.draw.rect(sc, (255, 255, 255), (250,250 , 250,250))
pygame.draw.rect(sc, (255,0, 255), (0,0 , 250,250))
pygame.draw.rect(sc, (255,255,0), (0,250, 250,250))
pygame.draw.rect(sc, (0,255,0), (250,0, 250,250))
pygame.draw.circle(sc,(255,0,0), (250, 250), 50)
pygame.display.flip()
pygame.image.save(sc, "image.png")
|