共用方式為


Rect.Union Method

Definition

Overloads

Union(Rect)

Update this Rect to enclose itself and the specified rectangle.

Union(Int32, Int32)

Update this Rect to enclose itself and the [x,y] coordinate.

Union(Int32, Int32, Int32, Int32)

Update this Rect to enclose itself and the specified rectangle.

Union(Rect)

Update this Rect to enclose itself and the specified rectangle.

[Android.Runtime.Register("union", "(Landroid/graphics/Rect;)V", "")]
public void Union (Android.Graphics.Rect r);
[<Android.Runtime.Register("union", "(Landroid/graphics/Rect;)V", "")>]
member this.Union : Android.Graphics.Rect -> unit

Parameters

r
Rect

The rectangle being unioned with this rectangle

Attributes

Remarks

Update this Rect to enclose itself and the specified rectangle. If the specified rectangle is empty, nothing is done. If this rectangle is empty it is set to the specified rectangle.

Java documentation for android.graphics.Rect.union(android.graphics.Rect).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Union(Int32, Int32)

Update this Rect to enclose itself and the [x,y] coordinate.

[Android.Runtime.Register("union", "(II)V", "")]
public void Union (int x, int y);
[<Android.Runtime.Register("union", "(II)V", "")>]
member this.Union : int * int -> unit

Parameters

x
Int32

The x coordinate of the point to add to the rectangle

y
Int32

The y coordinate of the point to add to the rectangle

Attributes

Remarks

Update this Rect to enclose itself and the [x,y] coordinate. There is no check to see that this rectangle is non-empty.

Java documentation for android.graphics.Rect.union(int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Union(Int32, Int32, Int32, Int32)

Update this Rect to enclose itself and the specified rectangle.

[Android.Runtime.Register("union", "(IIII)V", "")]
public void Union (int left, int top, int right, int bottom);
[<Android.Runtime.Register("union", "(IIII)V", "")>]
member this.Union : int * int * int * int -> unit

Parameters

left
Int32

The left edge being unioned with this rectangle

top
Int32

The top edge being unioned with this rectangle

right
Int32

The right edge being unioned with this rectangle

bottom
Int32

The bottom edge being unioned with this rectangle

Attributes

Remarks

Update this Rect to enclose itself and the specified rectangle. If the specified rectangle is empty, nothing is done. If this rectangle is empty it is set to the specified rectangle.

Java documentation for android.graphics.Rect.union(int, int, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to