System::Drawing::Rectangle::Contains 方法

Rectangle::Contains(const Point&) const method

确定指定的点是否位于当前对象所表示的矩形内部。

bool System::Drawing::Rectangle::Contains(const Point &point) const
参数类型描述
const Point&要检查的点

ReturnValue

如果指定的点位于当前对象所表示的矩形内部,则返回 true;否则返回 false

另见

Rectangle::Contains(const Rectangle&) const method

确定指定的矩形是否位于当前对象所表示的矩形内部。

bool System::Drawing::Rectangle::Contains(const Rectangle &rect) const
参数类型描述
rectconst Rectangle&要检查的矩形

ReturnValue

如果指定的矩形位于当前对象所表示的矩形内部,则返回 true;否则返回 false

另见

Rectangle::Contains(int, int) const method

确定指定的点是否位于当前对象所表示的矩形内部。

bool System::Drawing::Rectangle::Contains(int x, int y) const
参数类型描述
xint要检查的点的 X 坐标
yint要检查的点的 Y 坐标

ReturnValue

如果指定的点位于当前对象所表示的矩形内部,则返回 true;否则返回 false

另见