|
YSTest
PreAlpha_b400_20130424
The YSLib Test Project
|
屏幕标准矩形:表示屏幕矩形区域。 更多...
#include <ygdibase.h>


Public 成员函数 | |
| yconstfn | Rect () ynothrow |
| 无参数构造。 | |
| yconstfn | Rect (const Rect &)=default |
| 复制构造:默认实现。 | |
| 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 值。 | |
| Rect & | operator= (const Rect &)=default |
| Rect & | operator&= (const Rect &) ynothrow |
| 求与另一个屏幕标准矩形的交。 | |
| Rect & | operator|= (const Rect &) ynothrow |
| 求与另一个屏幕标准矩形的并。 | |
| bool | Contains (int px, int py) const ynothrow |
| 判断点 (px, py) 是否在矩形内或边上。 | |
| bool | Contains (const Point &pt) const ynothrow |
| 判断点 pt 是否在矩形内或边上。 | |
| bool | Contains (const Rect &r) const ynothrow |
| 判断矩形 r 是否在矩形内或边上。 | |
| bool | ContainsStrict (int px, int py) const ynothrow |
| 判断点 (px, py) 是否在矩形内。 | |
| bool | ContainsStrict (const Point &pt) const ynothrow |
| 判断点 pt 是否在矩形内。 | |
| bool | ContainsStrict (const Rect &r) const ynothrow |
| 判断矩形 r 是否在矩形内或边上。 | |
| yconstfn const Point & | GetPoint () const ynothrow |
| 取左上角位置。 | |
| Point & | GetPointRef () ynothrow |
| 取左上角位置引用。 | |
| yconstfn const Size & | GetSize () const ynothrow |
| 取大小。 | |
| Size & | GetSizeRef () ynothrow |
| 取大小引用。 | |
| Rect & | operator= (const Point &pt) ynothrow |
| Rect & | operator= (const Size &s) ynothrow |
静态 Public 属性 | |
| static const Rect | Invalid |
| 无效对象。 | |
额外继承的成员函数 | |
Private 成员函数 继承自 YSLib::Drawing::GBinaryGroup< SPos > | |
| yconstfn | GBinaryGroup () ynothrow |
| 无参数构造。 | |
| yconstfn | GBinaryGroup (const GBinaryGroup &)=default |
| 复制构造:默认实现。 | |
| yconstfn | GBinaryGroup (const Size &) ynothrow |
| 构造:使用 Size 对象。 | |
| yconstfn | GBinaryGroup (const Rect &) ynothrow |
| 构造:使用 Rect 对象。 | |
| yconstfn | GBinaryGroup (_tScalar1 x, _tScalar2 y) ynothrow |
| 构造:使用两个纯量。 | |
| yconstfn GBinaryGroup | operator- () ynothrow |
| 负运算:取加法逆元。 | |
| GBinaryGroup & | operator+= (const GBinaryGroup &val) ynothrow |
| 加法赋值。 | |
| GBinaryGroup & | operator-= (const GBinaryGroup &val) ynothrow |
| 减法赋值。 | |
| yconstfn SPos | GetX () const ynothrow |
| yconstfn SPos | GetY () const ynothrow |
| void | SetX (SPos_tempArgName) |
| void | SetY (SPos_tempArgName) |
| yconstfn bool | IsZero () const ynothrow |
| 判断是否是零元素。 | |
| SPos & | GetRef (bool b=true) ynothrow |
| 选择分量引用。 | |
| const SPos & | GetRef (bool b=true) const ynothrow |
| 选择分量常量引用。 | |
Private 成员函数 继承自 YSLib::Drawing::Size | |
| yconstfn | Size () ynothrow |
| 无参数构造。 | |
| yconstfn | Size (const Size &s) ynothrow |
| 复制构造。 | |
| yconstfn | Size (const Rect &) ynothrow |
| 构造:使用 Rect 对象。 | |
| template<typename _type > | |
| yconstfn | Size (const GBinaryGroup< _type > &val) ynothrow |
| 构造:使用屏幕二元组。 | |
| template<typename _tScalar1 , typename _tScalar2 > | |
| yconstfn | Size (_tScalar1 w, _tScalar2 h) ynothrow |
| 构造:使用两个纯量。 | |
| yconstfn bool | operator! () const ynothrow |
| 判断是否为空。 | |
| yconstfn | operator bool () const ynothrow |
| 判断是否非空。 | |
| yconstfn | operator Vec () const ynothrow |
| 转换:屏幕二维向量。 | |
| yconstfn bool | IsLineSegment () const ynothrow |
| 判断是否为线段:长或宽中有且一个数值等于 0 。 | |
| yconstfn bool | IsUnstrictlyEmpty () const ynothrow |
| 判断是否为不严格的空矩形区域:包括空矩形和线段。 | |
| SDst & | GetRef (bool b=true) ynothrow |
| 选择分量引用。 | |
| const SDst & | GetRef (bool b=true) const ynothrow |
| 选择分量常量引用。 | |
Private 属性 继承自 YSLib::Drawing::GBinaryGroup< SPos > | |
| SPos | X |
| SPos | Y |
| 分量。 | |
Private 属性 继承自 YSLib::Drawing::Size | |
| SDst | Width |
| SDst | Height |
| 宽和高。 | |
静态 Private 属性 继承自 YSLib::Drawing::GBinaryGroup< SPos > | |
| static yconstexpr GBinaryGroup | Invalid |
| 无效(不在屏幕坐标系中)对象。 | |
静态 Private 属性 继承自 YSLib::Drawing::Size | |
| static const Size | Invalid |
| 无效对象。 | |
|
inline |
|
inline |
| bool YSLib::Drawing::Rect::Contains | ( | int | px, |
| int | py | ||
| ) | const |
|
inline |
| bool YSLib::Drawing::Rect::Contains | ( | const Rect & | r | ) | const |
判断矩形 r 是否在矩形内或边上。
| bool YSLib::Drawing::Rect::ContainsStrict | ( | int | px, |
| int | py | ||
| ) | const |
判断点 (px, py) 是否在矩形内。
|
inline |
| bool YSLib::Drawing::Rect::ContainsStrict | ( | const Rect & | r | ) | const |
判断矩形 r 是否在矩形内或边上。
取左上角位置。
在文件 ygdibase.h 第 601 行定义.
参考自 YSLib::UI::TextList::DrawItems(),YSLib::Drawing::DrawRect(),YSLib::Drawing::FillRect(),YSLib::UI::ImageBrush::operator()(),YSLib::Drawing::RectTransformer::operator()(),YSLib::UI::BufferedTextArea::Refresh(),YSLib::Drawing::TransformRect(),YSLib::UI::BufferedRenderer::UpdateTo() , 以及 YSLib::UI::BufferedRenderer::Validate().

|
inline |
取大小。
在文件 ygdibase.h 第 611 行定义.
参考自 YSLib::Drawing::DrawRect(),YSLib::Drawing::FillRect(),YSLib::UI::ImageBrush::operator()(),YSLib::Drawing::RectTransformer::operator()(),YSLib::UI::BufferedTextArea::Refresh(),YSLib::Drawing::TransformRect(),YSLib::UI::BufferedRenderer::UpdateTo() , 以及 YSLib::UI::BufferedRenderer::Validate().

|
inline |
在文件 ygdibase.h 第 503 行定义.
参考 platform::KeyCodes::X,platform::KeyCodes::Y , 以及 yunseq().

|
static |