CGRect.Union(CGRect, CGRect) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
public static CoreGraphics.CGRect Union (CoreGraphics.CGRect a, CoreGraphics.CGRect b);
static member Union : CoreGraphics.CGRect * CoreGraphics.CGRect -> CoreGraphics.CGRect
Parameters
- a
- CGRect
A rectangle to union.
- b
- CGRect
A rectangle to union.
Returns
A CGRect structure that bounds the union of the two CGRect structures.
Remarks
When one of the two rectangles is empty, meaning all of its values are zero, the Union(CGRect, CGRect) method returns a rectangle with a starting point of (0, 0), and the height and width of the non-empty rectangle. For example, if you have two rectangles: A = (0, 0; 0, 0) and B = (1, 1; 2, 2), then the union of A and B is (0, 0; 2, 2).