pygame从入门到提高(1)
生活随笔
收集整理的這篇文章主要介紹了
pygame从入门到提高(1)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
顯示背景圖案
import sys, pygame pygame.init()bjpic = pygame.image.load("ai1.jpg") bjpicRect = bjpic.get_rect()size = width, height =bjpicRect.width,bjpicRect.heightscreen = pygame.display.set_mode(size) while True:for event in pygame.event.get():if event.type == pygame.QUIT:pygame.quit()sys.exit()screen.blit(bjpic, bjpicRect)pygame.display.flip()總結
以上是生活随笔為你收集整理的pygame从入门到提高(1)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: fastjson为什么默认是无序的
- 下一篇: python flask(1)