Rect.union

Function/Meaning
Rectangle Union
Type
Method of the Rect class
Syntax
union(r)
Arguments
r Specifies the rectangle object to be combined.
Return Value
Whether the union was performed
Description
Expands the rectangle using the specified rectangle object.
The target rectangle's boundaries are updated to the values that expand the rectangle size based on the four side values of the specified rectangle object.
This is executed only if the target rectangle is not empty; if it is empty, the operation is not performed and false is returned.
Reference
Rect.isEmpty