YSTest
PreAlpha_b500_20140530
The YSLib Test Project
|
屏幕标准矩形:表示屏幕矩形区域。 更多...
#include <ygdibase.h>
Public 成员函数 | |
yconstfn | DefDeCtor (Rect) explicit yconstfn Rect(const Point &pt) ynothrow |
无参数构造:默认实现。 更多... | |
yconstfn | Rect (const Size &s) ynothrow |
构造:使用 Size 对象。 更多... | |
yconstfn | Rect (const Point &pt, const Size &s) ynothrow |
构造:使用屏幕二维点和 Size 对象。 更多... | |
yconstfn | Rect (const Point &pt, SDst w, SDst h) ynothrow |
构造:使用屏幕二维点和表示长宽的两个 SDst 值。 更多... | |
yconstfn | Rect (SPos x, SPos y, const Size &s) ynothrow |
构造:使用表示位置的两个 SPos 值和 Size 对象。 更多... | |
yconstfn | Rect (SPos x, SPos y, SDst w, SDst h) ynothrow |
构造:使用表示位置的两个 SPos 值和表示大小的两个 SDst 值。 更多... | |
yconstfn | DefDeCopyCtor (Rect) DefDeCopyAssignment(Rect) Rect &operator |
复制构造:默认实现。 更多... | |
Rect & | operator|= (const Rect &) ynothrow |
求与另一个屏幕标准矩形的并。 更多... | |
bool | Contains (int px, int py) const ynothrow |
判断点 (px, py) 是否在矩形内或边上。 更多... | |
PDefH (bool, Contains, const Point &pt) const ynothrow ImplRet(Contains(pt.X | |
判断点 pt 是否在矩形内或边上。 更多... | |
pt Y bool | Contains (const Rect &) const ynothrow |
判断矩形是否在矩形内或边上。 更多... | |
bool | ContainsStrict (int px, int py) const ynothrow |
判断点 (px, py) 是否在矩形内。 更多... | |
PDefH (bool, ContainsStrict, const Point &pt) const ynothrow ImplRet(ContainsStrict(pt.X | |
判断点 pt 是否在矩形内。 更多... | |
pt Y bool | ContainsStrict (const Rect &) const ynothrow |
判断矩形是否在矩形内或边上。 更多... | |
yconstfn | DefGetter (const ynothrow, const Point &, Point, static_cast< const Point & >(*this)) DefGetter(ynothrow |
取左上角位置。 更多... | |
yconstfn Point static_cast < Point & > this yconstfn | DefGetter (const ynothrow, const Size &, Size, static_cast< const Size & >(*this)) DefGetter(ynothrow |
取大小。 更多... | |
Public 属性 | |
yconstfn Point | PointRef |
yconstfn Point static_cast < Point & > this yconstfn Size | SizeRef |
静态 Public 属性 | |
static const Rect | Invalid |
无效对象。 更多... | |
相关函数 | |
(请注意: 这些不是成员函数.) | |
yconstfn bool | operator== (const Rect &x, const Rect &y) ynothrow |
比较:屏幕标准矩形相等关系。 更多... | |
yconstfn bool | operator!= (const Rect &x, const Rect &y) ynothrow |
比较:屏幕标准矩形不等关系。 更多... | |
yconstfn Rect | operator+ (const Rect &r, const Vec &v) ynothrow |
加法:使用标准矩形 r 和偏移向量 v 构造屏幕标准矩形。 更多... | |
yconstfn Rect | operator- (const Rect &r, const Vec &v) ynothrow |
减法:使用标准矩形 r 和偏移向量的加法逆元 v 构造屏幕标准矩形。 更多... | |
YF_API Rect | operator& (const Rect &, const Rect &) ynothrow |
求两个屏幕标准矩形的交。 更多... | |
YF_API Rect | operator| (const Rect &, const Rect &) ynothrow |
求两个屏幕标准矩形的并。 更多... | |
void | Diminish (Rect &r, SDst off1=1, SDst off2=2) |
按指定大小缩小矩形。 更多... | |
|
inline |
bool YSLib::Drawing::Rect::Contains | ( | int | px, |
int | py | ||
) | const |
判断点 (px, py) 是否在矩形内或边上。
在文件 ygdibase.cpp 第 80 行定义.
参考自 YSLib::UI::CheckPoint() , 以及 YSLib::Drawing::PlotPixel().
bool YSLib::Drawing::Rect::Contains | ( | const Rect & | r | ) | const |
bool YSLib::Drawing::Rect::ContainsStrict | ( | int | px, |
int | py | ||
) | const |
bool YSLib::Drawing::Rect::ContainsStrict | ( | const Rect & | r | ) | const |
判断矩形是否在矩形内或边上。
在文件 ygdibase.cpp 第 97 行定义.
参考 YSLib::Drawing::r , 以及 YSLib::Drawing::Width.
yconstfn YSLib::Drawing::Rect::DefGetter | ( | const ynothrow | , |
const Point & | , | ||
Point | , | ||
static_cast< const Point & > * | this | ||
) |
取左上角位置。
取左上角位置引用。
yconstfn Point static_cast<Point&> this yconstfn YSLib::Drawing::Rect::DefGetter | ( | const ynothrow | , |
const Size & | , | ||
Size | , | ||
static_cast< const Size & > * | this | ||
) |
取大小。
取大小引用。
求与另一个屏幕标准矩形的并。
在文件 ygdibase.cpp 第 114 行定义.
参考 YSLib::Drawing::r, YSLib::Drawing::Width, YSLib::Drawing::X , 以及 YSLib::Drawing::Y.
判断点 pt 是否在矩形内或边上。
YSLib::Drawing::Rect::PDefH | ( | bool | , |
ContainsStrict | , | ||
const Point & | pt | ||
) | const |
判断点 pt 是否在矩形内。
|
related |
减法:使用标准矩形 r 和偏移向量的加法逆元 v 构造屏幕标准矩形。
在文件 ygdibase.h 第 669 行定义.
参考 YSLib::Drawing::r , 以及 v.
|
static |
在文件 ygdibase.h 第 618 行定义.
在文件 ygdibase.h 第 628 行定义.