Share via


CGRect.Contains Method

Definition

Overloads

Name Description
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)
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)

public bool Contains(System.Runtime.InteropServices.NFloat x, System.Runtime.InteropServices.NFloat y);
member this.Contains : System.Runtime.InteropServices.NFloat * System.Runtime.InteropServices.NFloat -> bool

Parameters

x
NFloat
y
NFloat

Returns

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