RectangleF.Contains 方法

定义

确定指定的点是否包含在此 RectangleF 结构内。

重载

Contains(PointF)

确定指定的点是否包含在此 RectangleF 结构内。

Contains(RectangleF)

确定 rect 表示的矩形区域是否完全包含在此 RectangleF 结构内。

Contains(Single, Single)

确定指定的点是否包含在此 RectangleF 结构内。

Contains(PointF)

确定指定的点是否包含在此 RectangleF 结构内。

public:
 bool Contains(System::Drawing::PointF pt);
public readonly bool Contains (System.Drawing.PointF pt);
public bool Contains (System.Drawing.PointF pt);
member this.Contains : System.Drawing.PointF -> bool
Public Function Contains (pt As PointF) As Boolean

参数

pt
PointF

要测试的 PointF

返回

Boolean

如果此 RectangleF 结构中包含由 pt 参数表示的点,则返回 true;否则,返回 false

适用于

Contains(RectangleF)

确定 rect 表示的矩形区域是否完全包含在此 RectangleF 结构内。

public:
 bool Contains(System::Drawing::RectangleF rect);
public readonly bool Contains (System.Drawing.RectangleF rect);
public bool Contains (System.Drawing.RectangleF rect);
member this.Contains : System.Drawing.RectangleF -> bool
Public Function Contains (rect As RectangleF) As Boolean

参数

rect
RectangleF

要测试的 RectangleF

返回

Boolean

如果 rect 表示的矩形区域完全包含在此 RectangleF 表示的矩形区域中,则返回 true;否则,返回 false

适用于

Contains(Single, Single)

确定指定的点是否包含在此 RectangleF 结构内。

public:
 bool Contains(float x, float y);
public readonly bool Contains (float x, float y);
public bool Contains (float x, float y);
member this.Contains : single * single -> bool
Public Function Contains (x As Single, y As Single) As Boolean

参数

x
Single

要测试的点的 X 坐标。

y
Single

要测试的点的 Y 坐标。

返回

Boolean

如果 xy 定义的点包含在此 RectangleF 结构中,则返回 true;否则,返回 false

适用于