import pygame
from pygame.locals import *
from sys import exit
# pygame初始化
pygame.init()
# 设定屏幕参数,一个分辨率元组
screen = pygame.display.set_mode((640, 480))
while True:
# 退出程序的方法
for event in pygame.event.get():
if event.type == QUIT:
exit()
#椭圆,参数:操作对象,颜色(RGB数组),外接矩形的左上角和右下角坐标,宽度
# 如果不填宽度,则会填充椭圆
pygame.draw.ellipse(screen, (0, 255, 0), (0, 0, 200, 300),width=1)
# 更新画面
pygame.display.update()