Share via


Rect.Intersect Method

Definition

Overloads

Intersect(Rect)

If the specified rectangle intersects this rectangle, return true and set this rectangle to that intersection, otherwise return false and do not change this rectangle.

Intersect(Int32, Int32, Int32, Int32)

If the rectangle specified by left,top,right,bottom intersects this rectangle, return true and set this rectangle to that intersection, otherwise return false and do not change this rectangle.

Intersect(Rect)

If the specified rectangle intersects this rectangle, return true and set this rectangle to that intersection, otherwise return false and do not change this rectangle.

[Android.Runtime.Register("intersect", "(Landroid/graphics/Rect;)Z", "")]
public bool Intersect (Android.Graphics.Rect r);
[<Android.Runtime.Register("intersect", "(Landroid/graphics/Rect;)Z", "")>]
member this.Intersect : Android.Graphics.Rect -> bool

Parameters

r
Rect

The rectangle being intersected with this rectangle.

Returns

true if the specified rectangle and this rectangle intersect (and this rectangle is then set to that intersection) else return false and do not change this rectangle.

Attributes

Remarks

If the specified rectangle intersects this rectangle, return true and set this rectangle to that intersection, otherwise return false and do not change this rectangle. No check is performed to see if either rectangle is empty. To just test for intersection, use intersects()

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

Intersect(Int32, Int32, Int32, Int32)

If the rectangle specified by left,top,right,bottom intersects this rectangle, return true and set this rectangle to that intersection, otherwise return false and do not change this rectangle.

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

Parameters

left
Int32

The left side of the rectangle being intersected with this rectangle

top
Int32

The top of the rectangle being intersected with this rectangle

right
Int32

The right side of the rectangle being intersected with this rectangle.

bottom
Int32

The bottom of the rectangle being intersected with this rectangle.

Returns

true if the specified rectangle and this rectangle intersect (and this rectangle is then set to that intersection) else return false and do not change this rectangle.

Attributes

Remarks

If the rectangle specified by left,top,right,bottom intersects this rectangle, return true and set this rectangle to that intersection, otherwise return false and do not change this rectangle. No check is performed to see if either rectangle is empty. Note: To just test for intersection, use #intersects(Rect, Rect).

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