pygame学习之打印文本

 import pygame
from pygame.locals import *
white = 255, 255, 255
blue = 0, 0, 200
pygame.init()
screen = pygame.display.set_mode((600, 500))
myfont = pygame.font.Font(None, 70)
textImage = myfont.render("HELLO WORLD", True, white)
while True:
for event in pygame.event.get():
if event.type in (QUIT, KEYDOWN):
exit()
screen.fill(blue)
screen.blit(textImage, (100, 100))
pygame.display.update()
上一篇:jmeter正则表达式提取器提取特定字符串后的全部内容


下一篇:ArcGIS Enterprise 10.5.1 静默安装部署记录(Centos 7.2 minimal)- 6、总结