import pygame
import random
import math
WIDTH = 500
HEIGHT = 500
pygame.init()
screen = pygame.display.set_mode((WIDTH, HEIGHT))
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_RETURN:
pygame.image.save(screen, "image.jpg")
for i in range(0,5):
f1 = pygame.font.Font(None, i*10+25)
text1 = f1.render('Привет', True,(180, 0, 0))
screen.blit(text1, (10,i*50+25))
pygame.display.flip()
pygame.quit()
|