This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
绘制矩形后,您必须更新显示:
您实际上是在
surface
对象。如果您借鉴了与PyGame显示器关联的 surface ,则在显示屏中不立即可见。更改将可见,当显示显示使用 pygame.display.update() 或pygame.display.flip()
。You have to update the display after drawing the rectangle:
You are actually drawing on a
Surface
object. If you draw on the Surface associated to the PyGame display, this is not immediately visible in the display. The changes become visible, when the display is updated with eitherpygame.display.update()
orpygame.display.flip()
.