Egrome
 
载入中...
搜索中...
未找到
Rect类 参考

矩形类 更多...

#include <Rect.h>

类 Rect 继承关系图:
Object

Public 成员函数

 Rect (float x, float y, float width, float height) noexcept
 
 Rect (const Point &pos, const Size &size) noexcept
 
float & x () noexcept
 
float & y () noexcept
 
float & width () noexcept
 
float & height () noexcept
 
const float & x () const noexcept
 
const float & y () const noexcept
 
const float & width () const noexcept
 
const float & height () const noexcept
 
LeftSide left () noexcept
 
RightSide right () noexcept
 
TopSide top () noexcept
 
BottomSide bottom () noexcept
 
Center center () noexcept
 
TopLeftCorner topLeft () noexcept
 
TopRightCorner topRight () noexcept
 
BottomLeftCorner bottomLeft () noexcept
 
BottomRightCorner bottomRight () noexcept
 
PosData position () noexcept
 
SizeData size () noexcept
 
float left () const noexcept
 
float right () const noexcept
 
float top () const noexcept
 
float bottom () const noexcept
 
Point center () const noexcept
 
Point topLeft () const noexcept
 
Point topRight () const noexcept
 
Point bottomLeft () const noexcept
 
Point bottomRight () const noexcept
 
Point position () const noexcept
 
Size size () const noexcept
 
bool contains (const Point &point) const noexcept
 判断点是否在矩形内,包含边界
 
- Public 成员函数 继承自 Object
 Object () noexcept
 构造函数
 
virtual ~Object () noexcept
 析构函数
 

详细描述

矩形类

成员函数说明

◆ contains()

bool Rect::contains ( const Point & point) const
noexcept

判断点是否在矩形内,包含边界

参数
point
返回
true 点在矩形内,包含边界;false 点不在矩形内

该类的文档由以下文件生成: