- 帖子
- 39
- 精华
- 0
- 积分
- 145
- 阅读权限
- 20
- 注册时间
- 2017-2-24
- 最后登录
- 2017-3-18
|
顺手贴一个文档里关于pygame.display.set_mode()的用法和相关的参数解释(主要是后两个参数Flag和Depth。depth参数是指bits per pixels,取值范围是【8,32】(和桌面设置里的那个什么什么“32位真彩色”是一个意思),可以说是指颜色的鲜艳程度,中文应该是翻译作【位宽】好像。Flag见下文)
initialize a window or screen for display
pygame.display.set_mode(resolution=(0,0), flags=0, depth=0): return Surface
The flags argument controls which type of display you want. There are several to choose from, and you can even combine multiple types using the bitwise or operator, (the pipe "|" character). If you pass 0 or no flags argument it will default to a software driven window. Here are the display flags you will want to choose from:
pygame.FULLSCREEN create a fullscreen display
pygame.DOUBLEBUF recommended for HWSURFACE or OPENGL
pygame.HWSURFACE hardware accelerated, only in FULLSCREEN
pygame.OPENGL create an opengl renderable display
pygame.RESIZABLE display window should be sizeable
pygame.NOFRAME display window will have no border or controls
|
|