import pygame, sys
from pygame.locals import *
pygame.init()
screen = pygame.display.set_mode((600, 500))
pygame.display.set_caption("Drawing Oval")
while True:
for event in pygame.event.get():
if event.type in (pygame.QUIT, pygame.KEYDOWN):
sys.exit()
screen.fill((0, 0, 200))
#draw an oval
color = 255, 255, 0
#position = 300, 250
#radius = 100
width = 10
rect = (100, 100, 100, 100)
pygame.draw.ellipse(screen, color, rect, width)
pygame.display.update()
01-26
1980
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-29
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交