pygame画线
import pygamefrom pygame.locals import *
pygame.init()
screen=pygame.display.set_mode((600,500))
pygame.display.set_caption("Drawing Lines")
while True:
for event in pygame.event.get():
if event.type in (QUIT,KEYDOWN):
sys.exit()
screen.fill((0,80,0))
#draw the line
color=100,255,200
width=8
pygame.draw.line(screen,color,(100,100),(500,400),width)
pygame.display.update()
下载声明:
本站资源均有第三方用户自行上传分享推荐,非本站自制,仅供玩家做交流学习之用!切勿用于商业用途!游戏作品版权归原作者享有,如有版权问题,请附带版权证明至邮件,本平台将应您的要求删除。
举报邮箱 :znzpzy@163.com
评论