Reputation: 21924
Is there a way to add a grid of rectangles together so that you can get a "container" rectangle (the bounds) of all the rectangles put together?
Upvotes: 0
Views: 327
Reputation: 15717
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.
Upvotes: 1