python手记(53)

import  sys 
import pygame
from pygame.locals import *
import time
import math
pygame.init()
screen=pygame.display.set_mode((500,550))
myfont=pygame.font.Font(None,30)
red=(255,0,0)
green=(0,255,0)
blue=(0,0,255)
pygame.display.set_caption("myhaspl")
screen.fill(green)
pygame.display.update()
while True:
    for myevent in pygame.event.get():
        if myevent.type in (QUIT,KEYDOWN):
            sys.exit()
    pygame.draw.line(screen,blue,(10,10),(200,200),6)
    pygame.draw.arc(screen,blue,(100,100,300,300),math.radians(30),math.radians(190),6)
    pygame.display.update()
    time.sleep(10)


原文地址:https://www.cnblogs.com/yxysuanfa/p/7159474.html