Rect.SetIntersect(Rect, Rect) Method

Definition

If rectangles a and b intersect, return true and set this rectangle to that intersection, otherwise return false and do not change this rectangle.

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

Parameters

a
Rect

The first rectangle being intersected with

b
Rect

The second rectangle being intersected with

Returns

true iff the two specified rectangles intersect. If they do, set this rectangle to that intersection. If they do not, return false and do not change this rectangle.

Attributes

Remarks

If rectangles a and b intersect, 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.setIntersect(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