import pygame
import random
pygame.init()
win = pygame.display.set_mode((500,500))
pygame.display.set_caption("")
run = True
while run:
pygame.time.delay(100)
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_RETURN:
pygame.image.save(win, "image.jpg")
x = random.randint(0,500)
y = random.randint(0,500)
w = random.randint(50,150)
h = random.randint(50,150)
pygame.draw.arc(win, (255,255, 255), (x,y,w,h), ((180)/57), ((360)/57), 1)
pygame.display.update()
pygame.quit()
|