Aracılığıyla paylaş


RectF.Contains Method

Definition

Overloads

Contains(Single, Single)

Returns true if (x,y) is inside the rectangle.

Contains(Single, Single, Single, Single)

Returns true iff the 4 specified sides of a rectangle are inside or equal to this rectangle.

Contains(RectF)

Returns true iff the specified rectangle r is inside or equal to this rectangle.

Contains(Single, Single)

Returns true if (x,y) is inside the rectangle.

[Android.Runtime.Register("contains", "(FF)Z", "GetContains_FFHandler")]
public virtual bool Contains (float x, float y);
[<Android.Runtime.Register("contains", "(FF)Z", "GetContains_FFHandler")>]
abstract member Contains : single * single -> bool
override this.Contains : single * single -> bool

Parameters

x
Single

The X coordinate of the point being tested for containment

y
Single

The Y coordinate of the point being tested for containment

Returns

true iff (x,y) are contained by the rectangle, where containment means left <= x < right and top <= y < bottom

Attributes

Remarks

Returns true if (x,y) is inside the rectangle. The left and top are considered to be inside, while the right and bottom are not. This means that for a x,y to be contained: left <= x < right and top <= y < bottom. An empty rectangle never contains any point.

Java documentation for android.graphics.RectF.contains(float, float).

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

Contains(Single, Single, Single, Single)

Returns true iff the 4 specified sides of a rectangle are inside or equal to this rectangle.

[Android.Runtime.Register("contains", "(FFFF)Z", "GetContains_FFFFHandler")]
public virtual bool Contains (float left, float top, float right, float bottom);
[<Android.Runtime.Register("contains", "(FFFF)Z", "GetContains_FFFFHandler")>]
abstract member Contains : single * single * single * single -> bool
override this.Contains : single * single * single * single -> bool

Parameters

left
Single

The left side of the rectangle being tested for containment

top
Single

The top of the rectangle being tested for containment

right
Single

The right side of the rectangle being tested for containment

bottom
Single

The bottom of the rectangle being tested for containment

Returns

true iff the the 4 specified sides of a rectangle are inside or equal to this rectangle

Attributes

Remarks

Returns true iff the 4 specified sides of a rectangle are inside or equal to this rectangle. i.e. is this rectangle a superset of the specified rectangle. An empty rectangle never contains another rectangle.

Java documentation for android.graphics.RectF.contains(float, float, float, float).

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

Contains(RectF)

Returns true iff the specified rectangle r is inside or equal to this rectangle.

[Android.Runtime.Register("contains", "(Landroid/graphics/RectF;)Z", "GetContains_Landroid_graphics_RectF_Handler")]
public virtual bool Contains (Android.Graphics.RectF r);
[<Android.Runtime.Register("contains", "(Landroid/graphics/RectF;)Z", "GetContains_Landroid_graphics_RectF_Handler")>]
abstract member Contains : Android.Graphics.RectF -> bool
override this.Contains : Android.Graphics.RectF -> bool

Parameters

r
RectF

The rectangle being tested for containment.

Returns

true iff the specified rectangle r is inside or equal to this rectangle

Attributes

Remarks

Returns true iff the specified rectangle r is inside or equal to this rectangle. An empty rectangle never contains another rectangle.

Java documentation for android.graphics.RectF.contains(android.graphics.RectF).

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