Way to add rectangles to get the bounds of all the rectangles
Is there a way to add a grid of rectangles together so that you can get a "containe开发者_如何学Pythonr" rectangle (the bounds) of all the rectangles put together?
Look at the union function from the Rectangle class
Union : Adds two rectangles together to create a new Rectangle object, by filling in the horizontal and vertical space between the two rectangles.
精彩评论