How do I pass a rect into pygame.display.update() to update a specific area of the window?
问题 On the documentation page for pygame.display.update() , it says you can pass a rect into the method to update part of the screen. However, all of the examples I see just pass an existing rect from an image or shape in the program. How can I tell it to update an area on the screen directly? For example, when drawing a rectangle, I could use a rect argument of (100,200,30,40) . This would draw a rectangle with a top at 200, a left at 100, a width of 30, and a height of 40. How can I pass a