Получилось совершенно случайно...
import pygame
import random
import math
pygame.init()
win = pygame.display.set_mode((900,700))
pygame.display.set_caption("")
run = True
while run:
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")
pos = pygame.mouse.get_pos()
pygame.draw.line(win, (255,255,255), [pos[0],pos[1]], [300, 340], 1)
pygame.draw.circle(win, (255,255,255), pos, 5)
pygame.display.update()
pygame.quit()
|