import pygame
import random
import math
pygame.init()
win = pygame.display.set_mode((900,700))
pygame.display.set_caption("")
user_text = ""
run = True
while run:
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
if event.type == pygame.KEYDOWN:
user_text += event.unicode
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_RETURN:
pygame.image.save(win, "image.jpg")
pygame.draw.line(win, (255,255,255), [10, 230], [250, 15], 3)
pygame.draw.line(win, (255,255,255), [250, 15], [500, 230], 3)
pygame.draw.line(win, (255,255,255), [10, 230], [500, 230], 3)
pygame.draw.rect(win, (255, 255, 255), (10, 230, 490, 350),1)
pygame.draw.rect(win, (255, 255, 0),
(150, 260, 150, 170),255)
pygame.draw.line(win, (255,255,255), [150, 340], [300, 340], 1)
pygame.display.update()
pygame.quit()
|