Edit

Share via


CGRect.Contains Method

Definition

Overloads

Contains(CGPoint)

Determines if the specified point is contained within this CGRect structure.

Contains(CGRect)

Determines if the rectangular region represented by rect is entirely contained within this CGRect structure.

Contains(Double, Double)

true if the point [x, y] is within the rectangle.

Contains(nfloat, nfloat)

Determines if the specified point is contained within this CGRect structure.

Contains(Single, Single)

Determines if the specified point is contained within this CGRect structure.

Contains(CGPoint)

Determines if the specified point is contained within this CGRect structure.

public bool Contains(CoreGraphics.CGPoint point);
member this.Contains : CoreGraphics.CGPoint -> bool

Parameters

point
CGPoint

<attribution license="cc4" from="Microsoft" modified="false"></attribution>The Point to test.

Returns

<attribution license="cc4" from="Microsoft" modified="false"></attribution>

This method returns true if the point represented by point is contained within this CGRect structure; otherwise false.

Remarks

<attribution license="cc4" from="Microsoft" modified="false"></attribution>

The containing rectangle must be normalized for this method to return accurate results.

Applies to

Contains(CGRect)

Determines if the rectangular region represented by rect is entirely contained within this CGRect structure.

public bool Contains(CoreGraphics.CGRect rect);
member this.Contains : CoreGraphics.CGRect -> bool

Parameters

rect
CGRect

<attribution license="cc4" from="Microsoft" modified="false"></attribution>The CGRect to test.

Returns

<attribution license="cc4" from="Microsoft" modified="false"></attribution>

This method returns true if the rectangular region represented by rect is entirely contained within this CGRect structure; otherwise false.

Remarks

<attribution license="cc4" from="Microsoft" modified="false"></attribution>

The containing rectangle must be normalized for this method to return accurate results.

Applies to

Contains(Double, Double)

true if the point [x, y] is within the rectangle.

public bool Contains(double x, double y);
member this.Contains : double * double -> bool

Parameters

x
Double
y
Double

Returns

Applies to

Contains(nfloat, nfloat)

Determines if the specified point is contained within this CGRect structure.

public bool Contains(nfloat x, nfloat y);
member this.Contains : nfloat * nfloat -> bool

Parameters

x
nfloat

<attribution license="cc4" from="Microsoft" modified="false"></attribution>The x-coordinate of the point to test.

y
nfloat

<attribution license="cc4" from="Microsoft" modified="false"></attribution>The y-coordinate of the point to test.

Returns

<attribution license="cc4" from="Microsoft" modified="false"></attribution>

This method returns true if the point defined by x and y is contained within this CGRect structure; otherwise false.

Remarks

<attribution license="cc4" from="Microsoft" modified="false"></attribution>

The containing rectangle must be normalized for this method to return accurate results.

Applies to

Contains(Single, Single)

Determines if the specified point is contained within this CGRect structure.

public bool Contains(float x, float y);
member this.Contains : single * single -> bool

Parameters

x
Single
y
Single

Returns

Applies to