YSTest: YGDIBase.h 源文件

YSTest PreAlpha_b700_20160611 The YSLib Test Project

- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件

- 文件列表
- 文件成员

YGDIBase.h
浏览该文件的文档.
1 /*
2 © 2011-2016 FrankHB.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
28 #ifndef YSL_INC_Core_YGDIBase_h_
29 #define YSL_INC_Core_YGDIBase_h_ 1
30
31 #include "YModules.h"
32 #include YFM_YSLib_Core_YCoreUtilities // for YSLib::GeneralEvent,
33 // YSLib::HalfDifference;
34 #include <limits>
35 #include <ystdex/operators.hpp> // for ystdex::equality_comparable;
36 #include <ystdex/string.hpp> // for ystdex::quote;
37
38 namespace YSLib
39 {
40
41 namespace Drawing
42 {
43
44 class Size;
45 class Rect;
46
47
53 template<typename _type>
54 class GBinaryGroup : private ystdex::equality_comparable<GBinaryGroup<_type>>
55 {
57 static_assert(ystdex::is_nothrow_copyable<_type>(),
58 "Invalid type found.");
59
60 public:
61 static const GBinaryGroup Invalid;
62
63 _type X = 0, Y = 0;
64
70 yconstfn DefDeCtor(GBinaryGroup)
74 yconstfn DefDeCopyCtor(GBinaryGroup)
79 explicit yconstfn
80 GBinaryGroup(const Size&) ynothrow;
85 explicit yconstfn
86 GBinaryGroup(const Rect&) ynothrow;
94 template<typename _tScalar1, typename _tScalar2>
95 yconstfn
96 GBinaryGroup(_tScalar1 x, _tScalar2 y) ynothrow
97 : X(_type(x)), Y(_type(y))
98 {}
104 template<typename _tPair>
105 yconstfn
106 GBinaryGroup(const _tPair& pr) ynothrow
107 : X(std::get<0>(pr)), Y(std::get<1>(pr))
108 {}
109
111 DefDeCopyAssignment(GBinaryGroup)
112
113
117 yconstfn PDefHOp(GBinaryGroup, -, ) const ynothrow
118 ImplRet(GBinaryGroup(-X, -Y))
119
123 PDefHOp(GBinaryGroup&, +=, const GBinaryGroup& val) ynothrow
124 ImplRet(yunseq(X += val.X, Y += val.Y), *this)
128 PDefHOp(GBinaryGroup&, -=, const GBinaryGroup& val) ynothrow
129 ImplRet(yunseq(X -= val.X, Y -= val.Y), *this)
130
131 yconstfn DefGetter(const ynothrow, _type, X, X)
132 yconstfn DefGetter(const ynothrow, _type, Y, Y)
133
134 DefSetter(, _type, X, X)
135 DefSetter(, _type, Y, Y)
136
140 yconstfn DefPred(const ynothrow, Zero, X == 0 && Y == 0)
141
148 PDefH(_type&, GetRef, bool b = true) ynothrow
149 ImplRet(b ? X : Y)
150 PDefH(const _type&, GetRef, bool b = true) const ynothrow
151 ImplRet(b ? X : Y)
153 };
154
156
157 template<typename _type>
158 const GBinaryGroup<_type> GBinaryGroup<_type>::Invalid{
159 std::numeric_limits<_type>::lowest(), std::numeric_limits<_type>::lowest()};
160
165 template<typename _type>
166 yconstfn bool
167 operator==(const GBinaryGroup<_type>& x, const GBinaryGroup<_type>& y) ynothrow
168 {
169 return x.X == y.X && x.Y == y.Y;
170 }
171
176 template<typename _type>
177 yconstfn GBinaryGroup<_type>
178 operator+(const GBinaryGroup<_type>& x, const GBinaryGroup<_type>& y) ynothrow
179 {
180 return GBinaryGroup<_type>(x.X + y.X, x.Y + y.Y);
181 }
182
187 template<typename _type>
188 yconstfn GBinaryGroup<_type>
189 operator-(const GBinaryGroup<_type>& x, const GBinaryGroup<_type>& y) ynothrow
190 {
191 return GBinaryGroup<_type>(x.X - y.X, x.Y - y.Y);
192 }
193
198 template<typename _type, typename _tScalar>
199 yconstfn GBinaryGroup<_type>
200 operator*(const GBinaryGroup<_type>& val, _tScalar l) ynothrow
201 {
202 return GBinaryGroup<_type>(val.X * l, val.Y * l);
203 }
204
209 template<class _tBinary>
210 yconstfn _tBinary
211 Transpose(const _tBinary& obj) ynothrow
212 {
213 return _tBinary(obj.Y, obj.X);
214 }
215
217
218 template<typename _type>
220 yconstfn GBinaryGroup<_type>
221 TransposeCCW(const GBinaryGroup<_type>& val) ynothrow
222 {
223 return GBinaryGroup<_type>(val.Y, -val.X);
224 }
225
227 template<typename _type>
228 yconstfn GBinaryGroup<_type>
229 TransposeCW(const GBinaryGroup<_type>& val) ynothrow
230 {
231 return GBinaryGroup<_type>(-val.Y, val.X);
232 }
234
240 template<size_t _vIdx, typename _type>
241 yconstfn _type&
242 get(GBinaryGroup<_type>& val)
243 {
244 static_assert(_vIdx < 2, "Invalid index found.");
245
246 return _vIdx == 0 ? val.X : val.Y;
247 }
248 template<size_t _vIdx, typename _type>
249 yconstfn const _type&
250 get(const GBinaryGroup<_type>& val)
251 {
252 static_assert(_vIdx < 2, "Invalid index found.");
253
254 return _vIdx == 0 ? val.X : val.Y;
255 }
257
263 template<typename _type>
264 string
265 to_string(const GBinaryGroup<_type>& val)
266 {
267 using YSLib::to_string;
268
269 return ystdex::quote(to_string(val.X) + ", " + to_string(val.Y), '(', ')');
270 }
272
273
278 using Point = GBinaryGroup<SPos>;
279
280
285 using Vec = GBinaryGroup<SPos>;
286
287
293 class YF_API Size : private ystdex::equality_comparable<Size>
294 {
295 public:
300 static const Size Invalid;
301
302 SDst Width, Height;
303
309 yconstfn
310 Size() ynothrow
311 : Width(0), Height(0)
312 {}
317 yconstfn
318 Size(const Size& s) ynothrow
319 : Width(s.Width), Height(s.Height)
320 {}
325 explicit yconstfn
326 Size(const Rect&) ynothrow;
331 template<typename _type>
332 explicit yconstfn
333 Size(const GBinaryGroup<_type>& val) ynothrow
334 : Width(static_cast<SDst>(val.X)), Height(static_cast<SDst>(val.Y))
335 {}
340 template<typename _tScalar1, typename _tScalar2>
341 yconstfn
342 Size(_tScalar1 w, _tScalar2 h) ynothrow
343 : Width(static_cast<SDst>(w)), Height(static_cast<SDst>(h))
344 {}
345
347 DefDeCopyAssignment(Size)
348
349
353 yconstfn DefBoolNeg(explicit yconstfn, Width != 0 || Height != 0)
354
360 PDefHOp(Size&, &=, const Size& s) ynothrow
361 ImplRet(yunseq(Width = min(Width, s.Width),
362 Height = min(Height, s.Height)), *this)
363
369 PDefHOp(Size&, |=, const Size& s) ynothrow
370 ImplRet(yunseq(Width = max(Width, s.Width),
371 Height = max(Height, s.Height)), *this)
372
377 yconstfn DefCvt(const ynothrow, Vec, Vec(Width, Height))
378
383 yconstfn DefPred(const ynothrow, LineSegment,
384 !((Width == 0) ^ (Height == 0)))
389 yconstfn DefPred(const ynothrow, UnstrictlyEmpty, Width == 0 || Height == 0)
390
397 PDefH(SDst&, GetRef, bool b = true) ynothrow
398 ImplRet(b ? Width : Height)
399 PDefH(const SDst&, GetRef, bool b = true) const ynothrow
400 ImplRet(b ? Width : Height)
402 };
403
409 yconstfn PDefHOp(bool, ==, const Size& x, const Size& y) ynothrow
411 ImplRet(x.Width == y.Width && x.Height == y.Height)
412
418 yconstfn PDefHOp(Size, &, const Size& x, const Size& y) ynothrow
419 ImplRet({min(x.Width, y.Width), min(x.Height, y.Height)})
420
426 yconstfn PDefHOp(Size, |, const Size& x, const Size& y) ynothrow
427 ImplRet({max(x.Width, y.Width), max(x.Height, y.Height)})
428
433 yconstfn PDefH(size_t, GetAreaOf, const Size& s) ynothrow
434 ImplRet(size_t(s.Width * s.Height))
435
436
440 yconstfn PDefH(Point, LocateCenter, const Size& x, const Size& y)
441 // XXX: Conversion to 'SPos' might be implementation-defined.
442 ImplRet({HalfDifference(SPos(x.Width), SPos(y.Width)),
443 HalfDifference(SPos(x.Height), SPos(y.Height))})
444
449 yconstfn PDefH(Point, RotateCenter, const Size& s)
450 // XXX: Conversion to 'SPos' might be implementation-defined.
451 ImplRet({HalfDifference(SPos(s.Width), SPos(s.Height)),
452 HalfDifference(SPos(s.Height), SPos(s.Width))})
453
459 template<size_t _vIdx>
460 yconstfn SDst&
461 get(Size& s)
462 {
463 static_assert(_vIdx < 2, "Invalid index found.");
464
465 return _vIdx == 0 ? s.Width : s.Height;
466 }
467 template<size_t _vIdx>
468 yconstfn const SDst&
469 get(const Size& s)
470 {
471 static_assert(_vIdx < 2, "Invalid index found.");
472
473 return _vIdx == 0 ? s.Width : s.Height;
474 }
476
482 YF_API string
483 to_string(const Size&);
485
486
491 template<typename _type>
492 yconstfn GBinaryGroup<_type>
493 operator+(GBinaryGroup<_type> val, const Size& s) ynothrow
494 {
495 // XXX: Conversion to '_type' might be implementation-defined.
496 return {val.X + _type(s.Width), val.Y + _type(s.Height)};
497 }
498
503 template<typename _type>
504 yconstfn GBinaryGroup<_type>
505 operator-(GBinaryGroup<_type> val, const Size& s) ynothrow
506 {
507 // XXX: Conversion to '_type' might be implementation-defined.
508 return {val.X - _type(s.Width), val.Y - _type(s.Height)};
509 }
510
511
516 yconstfn PDefH(Size, Transpose, const Size& s) ynothrow
517 ImplRet({s.Height, s.Width})
518
519
524 template<typename _tScalar = float>
525 yconstfn _tScalar
526 ScaleMin(const Size& x, const Size& y, _tScalar threshold = 1.F)
527 {
528 return YSLib::min({threshold,
529 _tScalar(_tScalar(x.Width) / _tScalar(y.Width)),
530 _tScalar(_tScalar(x.Height) / _tScalar(y.Height))});
531 }
532
533
540 class YF_API Rect : private Point, private Size,
541 private ystdex::equality_comparable<Rect>
542 {
543 public:
548 static const Rect Invalid;
549
555 using Point::X;
561 using Point::Y;
567 using Size::Width;
573 using Size::Height;
574
575
580 DefDeCtor(Rect)
585 explicit yconstfn
586 Rect(const Point& pt) ynothrow
587 : Point(pt), Size()
588 {}
593 yconstfn
594 Rect(const Size& s) ynothrow
595 : Point(), Size(s)
596 {}
601 yconstfn
602 Rect(const Point& pt, const Size& s) ynothrow
603 : Point(pt), Size(s)
604 {}
609 yconstfn
610 Rect(const Point& pt, SDst w, SDst h) ynothrow
611 : Point(pt.X, pt.Y), Size(w, h)
612 {}
617 yconstfn
618 Rect(SPos x, SPos y, const Size& s) ynothrow
619 : Point(x, y), Size(s.Width, s.Height)
620 {}
625 yconstfn
626 Rect(SPos x, SPos y, SDst w, SDst h) ynothrow
627 : Point(x, y), Size(w, h)
628 {}
632 yconstfn DefDeCopyCtor(Rect)
633
634 DefDeCopyAssignment(Rect)
636
637 Rect&
638 operator=(const Point& pt) ynothrow
639 {
640 yunseq(X = pt.X, Y = pt.Y);
641 return *this;
642 }
643 Rect&
644 operator=(const Size& s) ynothrow
645 {
646 yunseq(Width = s.Width, Height = s.Height);
647 return *this;
648 }
650
656 Rect&
657 operator&=(const Rect&) ynothrow;
658
664 Rect&
665 operator|=(const Rect&) ynothrow;
666
672 using Size::operator!;
673
679 using Size::operator bool;
680
685 bool
686 Contains(SPos px, SPos py) const ynothrow;
691 PDefH(bool, Contains, const Point& pt) const ynothrow
692 ImplRet(Contains(pt.X, pt.Y))
698 bool
699 Contains(const Rect&) const ynothrow;
704 bool
705 ContainsStrict(SPos px, SPos py) const ynothrow;
710 PDefH(bool, ContainsStrict, const Point& pt) const ynothrow
711 ImplRet(ContainsStrict(pt.X, pt.Y))
717 bool
718 ContainsStrict(const Rect&) const ynothrow;
724 using Size::IsLineSegment;
730 using Size::IsUnstrictlyEmpty;
731
733 // XXX: Conversion to 'SPos' might be implementation-defined.
734 yconstfn DefGetter(const ynothrow, SPos, Bottom, Y + SPos(Height))
738 yconstfn DefGetter(const ynothrow, const Point&, Point,
739 static_cast<const Point&>(*this))
744 DefGetter(ynothrow, Point&, PointRef, static_cast<Point&>(*this))
746 // XXX: Conversion to 'SPos' might be implementation-defined.
747 yconstfn DefGetter(const ynothrow, SPos, Right, X + SPos(Width))
751 yconstfn DefGetter(const ynothrow, const Size&, Size,
752 static_cast<const Size&>(*this))
757 DefGetter(ynothrow, Size&, SizeRef, static_cast<Size&>(*this))
759
760 using Point::GetX;
761 using Point::GetY;
762
763 using Point::SetX;
764 using Point::SetY;
766 };
767
769
770
774 yconstfn PDefHOp(bool, ==, const Rect& x, const Rect& y) ynothrow
775 ImplRet(x.GetPoint() == y.GetPoint() && x.GetSize() == y.GetSize())
776
781 yconstfn PDefHOp(Rect, +, const Rect& r, const Vec& v) ynothrow
782 ImplRet({r.GetPoint() + v, r.GetSize()})
783
788 yconstfn PDefHOp(Rect, -, const Rect& r, const Vec& v) ynothrow
789 ImplRet({r.GetPoint() - v, r.GetSize()})
790
796 inline PDefHOp(Rect, &, const Rect& x, const Rect& y) ynothrow
797 ImplRet(Rect(x) &= y)
798
799
804 inline PDefHOp(Rect, |, const Rect& x, const Rect& y) ynothrow
805 ImplRet(Rect(x) |= y)
806
812 inline PDefH(void, Diminish, Rect& r, SDst off1 = 1, SDst off2 = 2)
813 // XXX: Conversion to 'SPos' might be implementation-defined.
814 ImplExpr(YAssert(r.Width > off2 && r.Height > off2,
815 "Boundary is too small."), yunseq(r.X += SPos(off1), r.Y += SPos(off1),
816 r.Width -= off2, r.Height -= off2))
817
819
820
828 yconstfn PDefH(Rect, MakeRect, const Point& pt1, const Point& pt2) ynothrow
829 ImplRet(Rect(min(pt1.X, pt2.X), min(pt1.Y, pt2.Y),
830 SDst(pt1.X < pt2.X ? pt2.X - pt1.X : pt1.X - pt2.X),
831 SDst(pt1.Y < pt2.Y ? pt2.Y - pt1.Y : pt1.Y - pt2.Y)))
832
834 yconstfn PDefH(Rect, TransposeCCW, const Rect& r) ynothrow
835 ImplRet(MakeRect(TransposeCCW(Point(r.GetRight(), r.Y)),
836 TransposeCCW(Point(r.X, r.GetBottom()))))
837
839 yconstfn PDefH(Rect, TransposeCW, const Rect& r) ynothrow
840 ImplRet(MakeRect(TransposeCW(Point(r.GetRight(), r.Y)),
841 TransposeCW(Point(r.X, r.GetBottom()))))
843
849 template<size_t _vIdx>
850 yconstfn ystdex::conditional_t<_vIdx < 2, SPos, SDst>&
851 get(Rect& r)
852 {
853 return get<_vIdx>(
854 tuple<SPos&, SPos&, SDst&, SDst&>(r.X, r.Y, r.Width, r.Height));
855 }
856 template<size_t _vIdx>
857 yconstfn const ystdex::conditional_t<_vIdx < 2, SPos, SDst>&
858 get(const Rect& r)
859 {
860 return get<_vIdx>(tuple<const SPos&, const SPos&, const SDst&, const SDst&>(
861 r.X, r.Y, r.Width, r.Height));
862 }
864
870 YF_API string
871 to_string(const Rect&);
873
874
875 template<typename _type>
876 yconstfn
877 GBinaryGroup<_type>::GBinaryGroup(const Rect& r) ynothrow
878 : X(r.X), Y(r.Y)
879 {}
880
881 yconstfn
882 Size::Size(const Rect& r) ynothrow
883 : Width(r.Width), Height(r.Height)
884 {}
885
886
887
888
889
895 enum Rotation : yimpl(size_t)
896 {
897 RDeg0 = 0,
898 RDeg90 = 1,
899 RDeg180 = 2,
900 RDeg270 = 3
901 };
902
904
905 yconstfn PDefH(Rotation, Flip, Rotation rot)
907 ImplRet(Rotation((size_t(rot) + 2) % 4))
908
909 yconstfn PDefH(Rotation, RotateCCW, Rotation rot)
911 ImplRet(Rotation((size_t(rot) + 1) % 4))
912
914 yconstfn PDefH(Rotation, RotateCW, Rotation rot)
915 ImplRet(Rotation((size_t(rot) - 1) % 4))
917
918
923 enum Orientation
924 {
925 Horizontal = 0,
926 Vertical = 1
927 };
928
929 } // namespace Drawing;
930
931 } // namespace YSLib;
932
933 #endif
934
ystdex::cpp2014::conditional_t
typename conditional< _bCond, _type, _type2 >::type conditional_t
Definition: type_traits.hpp:353
YSLib::Drawing::GBinaryGroup::get
yconstfn _type & get(GBinaryGroup< _type > &val)
取分量。
Definition: YGDIBase.h:242
YSLib::Drawing::x
The boundary is out of the const Rect SDst SPos x
Definition: YDraw.h:127
YSLib::Drawing::w
The boundary is out of the const Rect SDst w
Definition: YDraw.h:127
YSLib::HalfDifference
yconstfn YB_STATELESS _type HalfDifference(_type x, _type y)
计算指定类型的差值的一半。
Definition: YCoreUtilities.h:72
ystdex::to_string
std::string to_string(const std::thread::id &)
转换 thread::id 为字符串表示。
YSLib::Drawing::Size::Size
yconstfn Size(const Size &s) ynothrow
复制构造。
Definition: YGDIBase.h:318
YSLib::Drawing::GBinaryGroup::Zero
const ynothrow const GBinaryGroup &val ynothrow const GBinaryGroup &val ynothrow X yconstfn X Zero
Definition: YGDIBase.h:140
YModules.h
YSLib::Drawing::GBinaryGroup::TransposeCCW
yconstfn GBinaryGroup< _type > TransposeCCW(const GBinaryGroup< _type > &val) ynothrow
转置变换：逆时针旋转直角。
Definition: YGDIBase.h:221
YSLib::Drawing::ImplExpr
tr TextRegion &tr ImplExpr(tr.Margin.Bottom=SPos(FetchResizedBottomMargin(tr))) YF_API SDst FetchCharWidth(const Font &
取指定的字符使用指定字体的显示宽度。
YSLib::Drawing::GBinaryGroup::operator*
yconstfn GBinaryGroup< _type > operator*(const GBinaryGroup< _type > &val, _tScalar l) ynothrow
数乘：屏幕二元组。
Definition: YGDIBase.h:200
YSLib::Drawing::Rect::Rect
yconstfn Rect(const Point &pt, SDst w, SDst h) ynothrow
构造：使用屏幕二维点和表示长宽的两个 SDst 值。
Definition: YGDIBase.h:610
v
byte v
Definition: CharRenderer.cpp:75
YSLib::Drawing::Rotation
Rotation
逆时针旋转角度指示输出指向。
Definition: YGDIBase.h:895
YSLib::yimpl
YF_API yimpl(GUIApplication &) FetchGlobalInstance()
取全局应用程序实例。
YSLib::Drawing::GBinaryGroup::GBinaryGroup
yconstfn GBinaryGroup(const Rect &) ynothrow
构造：使用 Rect 对象。
Definition: YGDIBase.h:877
YSLib
YSLib 命名空间。
Definition: AndroidHost.h:45
YSLib::Drawing::GBinaryGroup::X
_type X
Definition: YGDIBase.h:63
YSLib::Drawing::GBinaryGroup::ImplRet
const ynothrow ImplRet(GBinaryGroup(-X,-Y)) PDefHOp(GBinaryGroup &
加法赋值。
YSLib::Drawing::Rect::Rect
yconstfn Rect(SPos x, SPos y, const Size &s) ynothrow
构造：使用表示位置的两个 SPos 值和 Size 对象。
Definition: YGDIBase.h:618
YSLib::Drawing::Size::Width
SDst Width
Definition: YGDIBase.h:302
ImageBrowser::Flip
Definition: ImageControl.cpp:39
YSLib::Drawing::GBinaryGroup::to_string
string to_string(const GBinaryGroup< _type > &val)
转换为字符串。
Definition: YGDIBase.h:265
YSLib::Drawing::GBinaryGroup::Y
_type Y
分量。
Definition: YGDIBase.h:63
YSLib::Drawing::Rect::DefDeCtor
DefDeCtor(Rect) explicit yconstfn Rect(const Point &pt) ynothrow
无参数构造：默认实现。
Definition: YGDIBase.h:580
YSLib::Drawing::ScaleMin
yconstfn _tScalar ScaleMin(const Size &x, const Size &y, _tScalar threshold=1.F)
计算两个大小和阈值限定的最小缩放值。
Definition: YGDIBase.h:526
YSLib::Drawing::PDefH
yconstfn PDefH(Size, Transpose, const Size &s) ynothrow ImplRet(
转置。
Definition: YGDIBase.h:516
RotateCW
yconstfn Rotation rot RotateCW
Definition: YGDIBase.h:914
YSLib::Drawing::GBinaryGroup::operator==
yconstfn bool operator==(const GBinaryGroup< _type > &x, const GBinaryGroup< _type > &y) ynothrow
比较：屏幕二元组相等关系。
Definition: YGDIBase.h:167
DefCvt
#define DefCvt(_q, _t,...)
Definition: YBaseMacro.h:205
YSLib::ynothrow
YB_PURE const _type size_t n ynothrow
Definition: YCoreUtilities.h:168
YSLib::Drawing::RDeg180
Definition: YGDIBase.h:899
YSLib::Drawing::GBinaryGroup::GBinaryGroup
yconstfn GBinaryGroup(const _tPair &pr) ynothrow
构造：使用纯量对。
Definition: YGDIBase.h:106
YSLib::Drawing::Size::Size
yconstfn Size() ynothrow
无参数构造。
Definition: YGDIBase.h:310
YSLib::Drawing::GBinaryGroup::TransposeCW
yconstfn GBinaryGroup< _type > TransposeCW(const GBinaryGroup< _type > &val) ynothrow
转置变换：顺时针旋转直角。
Definition: YGDIBase.h:229
YSLib::Drawing::GBinaryGroup::operator+
yconstfn GBinaryGroup< _type > operator+(const GBinaryGroup< _type > &x, const GBinaryGroup< _type > &y) ynothrow
加法：屏幕二元组。
Definition: YGDIBase.h:178
YSLib::Drawing::GBinaryGroup::Transpose
yconstfn _tBinary Transpose(const _tBinary &obj) ynothrow
转置。
Definition: YGDIBase.h:211
platform::SPos
std::int16_t SPos
屏幕坐标度量。
Definition: Video.h:42
YSLib::Drawing::GBinaryGroup::DefGetter
const ynothrow const GBinaryGroup &val ynothrow const GBinaryGroup &val ynothrow X yconstfn DefGetter(const ynothrow, _type, Y, Y) DefSetter(
YSLib::YAssert
YAssert(!(v< Deref(a)),"Value less than lower bound found.")
DefDeCopyCtor
#define DefDeCopyCtor(_t)
Definition: YBaseMacro.h:161
yunseq
#define yunseq
无序列依赖表达式组求值。
Definition: ydef.h:996
YSLib::Drawing::Rect
屏幕标准矩形：表示屏幕矩形区域。
Definition: YGDIBase.h:540
ystdex
特性测试宏。
Definition: ydef.h:796
ystdex::max
const _type & max(const _type &a, const _type &b, _fComp comp=less< _type >())
取较大的元素。
Definition: algorithm.hpp:543
YSLib::Drawing::Size
屏幕区域大小。
Definition: YGDIBase.h:293
YSLib::Drawing::Rect::Rect
yconstfn Rect(const Size &s) ynothrow
构造：使用 Size 对象。
Definition: YGDIBase.h:594
YSLib::Drawing::GBinaryGroup::_type
const ynothrow const GBinaryGroup &val ynothrow const GBinaryGroup &val ynothrow _type
Definition: YGDIBase.h:131
YSLib::Drawing::r
The boundary is out of the const Graphics const Rect const Point const Point Color c const Rect const Rect & r
Definition: YDraw.h:174
YSLib::Drawing::Rect::Rect
yconstfn Rect(const Point &pt, const Size &s) ynothrow
构造：使用屏幕二维点和 Size 对象。
Definition: YGDIBase.h:602
Drawing
YSLib::UI::y
SPos SPos y
Definition: YWidget.cpp:44
YSLib::Drawing::GBinaryGroup::Invalid
static const GBinaryGroup Invalid
无效（不在屏幕坐标系中）对象。
Definition: YGDIBase.h:58
ystdex::is_nothrow_copyable
Definition: type_traits.hpp:889
operators.hpp
重载操作符。
YSLib::Drawing::Rect::Invalid
static const Rect Invalid
无效对象。
Definition: YGDIBase.h:548
string.hpp
ISO C++ 标准字符串扩展。
yconstfn
#define yconstfn
指定编译时常量函数。
Definition: ydef.h:654
YSLib::Drawing::Size::Height
SDst Height
宽和高。
Definition: YGDIBase.h:302
YSLib::Drawing::GBinaryGroup::operator-
yconstfn GBinaryGroup< _type > operator-(const GBinaryGroup< _type > &x, const GBinaryGroup< _type > &y) ynothrow
减法：屏幕二元组。
Definition: YGDIBase.h:189
YSLib::Drawing::GBinaryGroup::DefSetter
const ynothrow const GBinaryGroup &val ynothrow const GBinaryGroup &val ynothrow X yconstfn X DefSetter(, _type, Y, Y) yconstfn DefPred(const ynothrow
判断是否是零元素。
YSLib::Drawing::Point
GBinaryGroup< SPos > Point
屏幕二维点（直角坐标表示）。
Definition: YGDIBase.h:278
DefBoolNeg
#define DefBoolNeg(_spec,...)
定义表示显式转换 bool 操作符及其否定的 operator! 。
Definition: YBaseMacro.h:227
ystdex::min
const _type & min(const _type &a, const _type &b, _fComp comp=less< _type >())
取较小的元素。
Definition: algorithm.hpp:521
YF_API
#define YF_API
Definition: Platform.h:56
YSLib::Drawing::RDeg0
Definition: YGDIBase.h:897
YSLib::Drawing::RDeg90
Definition: YGDIBase.h:898
ystdex::dep_ops::equality_comparable
_t< details::ops_seq< _type, _type2, _tOpt, cond_t< is_same< _type, _type2 >, index_sequence< 7 >, index_sequence< 6, 7, 8 >>>> equality_comparable
Definition: operators.hpp:243
DefPred
#define DefPred(_q, _n,...)
Definition: YBaseMacro.h:231
ystdex::quote
_tString quote(const _tString &str, typename string_traits< _tString >::value_type c=typename string_traits< _tString >::value_type('"'))
取添加前缀和后缀的字符串。
Definition: string.hpp:741
YSLib::Drawing::Rect::Rect
yconstfn Rect(SPos x, SPos y, SDst w, SDst h) ynothrow
构造：使用表示位置的两个 SPos 值和表示大小的两个 SDst 值。
Definition: YGDIBase.h:626
YSLib::Drawing::Size::Invalid
static const Size Invalid
无效对象。
Definition: YGDIBase.h:300
YSLib::Drawing::Size::Size
yconstfn Size(_tScalar1 w, _tScalar2 h) ynothrow
构造：使用两个纯量。
Definition: YGDIBase.h:342
CHRLib::s
_tDst const _tSrc * s
Definition: CharacterProcessing.h:140
RotateCCW
yconstfn RotateCCW
Definition: YGDIBase.h:910
YSLib::Drawing::RDeg270
Definition: YGDIBase.h:900
YSLib::Drawing::GBinaryGroup::DefDeCopyAssignment
DefDeCopyAssignment(GBinaryGroup) yconstfn PDefHOp(GBinaryGroup
负运算：取加法逆元。
YSLib::Drawing::GBinaryGroup::DefDeCtor
yconstfn DefDeCtor(GBinaryGroup) yconstfn DefDeCopyCtor(GBinaryGroup) explicit yconstfn GBinaryGroup(const Size &) ynothrow
无参数构造。
platform::SDst
std::uint16_t SDst
屏幕坐标距离。
Definition: Video.h:43
YSLib::Drawing::GBinaryGroup
屏幕二元组。
Definition: YGDIBase.h:54