Share via


Rect.Intersects Method

Definition

Overloads

Intersects(Int32, Int32, Int32, Int32)

Returns true if this rectangle intersects the specified rectangle.

Intersects(Rect, Rect)

Returns true iff the two specified rectangles intersect.

Intersects(Int32, Int32, Int32, Int32)

Returns true if this rectangle intersects the specified rectangle.

[Android.Runtime.Register("intersects", "(IIII)Z", "")]
public bool Intersects (int left, int top, int right, int bottom);
[<Android.Runtime.Register("intersects", "(IIII)Z", "")>]
member this.Intersects : int * int * int * int -> bool

Parameters

left
Int32

The left side of the rectangle being tested for intersection

top
Int32

The top of the rectangle being tested for intersection

right
Int32

The right side of the rectangle being tested for intersection

bottom
Int32

The bottom of the rectangle being tested for intersection

Returns

true iff the specified rectangle intersects this rectangle. In no event is this rectangle modified.

Attributes

Remarks

Returns true if this rectangle intersects the specified rectangle. In no event is this rectangle modified. No check is performed to see if either rectangle is empty. To record the intersection, use intersect() or setIntersect().

Java documentation for android.graphics.Rect.intersects(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

Intersects(Rect, Rect)

Returns true iff the two specified rectangles intersect.

[Android.Runtime.Register("intersects", "(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z", "")]
public static bool Intersects (Android.Graphics.Rect a, Android.Graphics.Rect b);
[<Android.Runtime.Register("intersects", "(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z", "")>]
static member Intersects : Android.Graphics.Rect * Android.Graphics.Rect -> bool

Parameters

a
Rect

The first rectangle being tested for intersection

b
Rect

The second rectangle being tested for intersection

Returns

true iff the two specified rectangles intersect. In no event are either of the rectangles modified.

Attributes

Remarks

Returns true iff the two specified rectangles intersect. In no event are either of the rectangles modified. To record the intersection, use #intersect(Rect) or #setIntersect(Rect, Rect).

Java documentation for android.graphics.Rect.intersects(android.graphics.Rect, 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