28 #ifndef YSL_INC_Core_ygdibase_h_
29 #define YSL_INC_Core_ygdibase_h_ 1
49 template<typename _type>
53 static yconstexpr GBinaryGroup Invalid{std::numeric_limits<_type>::lowest(),
54 std::numeric_limits<_type>::lowest()};
82 GBinaryGroup(const Rect&) ynothrow;
87 template<typename _tScalar1, typename _tScalar2>
89 GBinaryGroup(_tScalar1 x, _tScalar2 y) ynothrow
100 return GBinaryGroup(-X, -Y);
109 yunseq(X += val.X, Y += val.Y);
118 yunseq(X -= val.X, Y -= val.Y);
155 template<
typename _type>
156 yconstexpr GBinaryGroup<_type> GBinaryGroup<_type>::Invalid;
165 template<
typename _type>
169 return a.X == b.X && a.Y == b.Y;
176 template<
typename _type>
187 template<
typename _type>
198 template<
typename _type>
209 template<
typename _type,
typename _tScalar>
253 :
Width(0), Height(0)
261 :
Width(s.Width), Height(s.Height)
273 template<typename _type>
282 template<
typename _tScalar1,
typename _tScalar2>
312 !((Width == 0) ^ (Height == 0)))
327 return b ? Width : Height;
337 return b ?
Width : Height;
348 return a.Width == b.Width && a.Height == b.Height;
366 template<
typename _type>
378 template<
class _tBinary>
382 return _tBinary(obj.Y, obj.X);
392 return s.Width * s.Height;
530 operator|=(const
Rect&) ynothrow;
537 using
Size::operator!;
544 using
Size::operator
bool;
551 Contains(
int px,
int py) const ynothrow;
563 Contains(const
Rect& r) const ynothrow;
570 ContainsStrict(
int px,
int py) const ynothrow;
582 ContainsStrict(const
Rect& r) const ynothrow;
589 using
Size::IsLineSegment;
595 using
Size::IsUnstrictlyEmpty;
601 static_cast<const Point&>(*this))
606 DefGetter(ynothrow, Point&, PointRef, static_cast<Point&>(*this))
611 static_cast<const Size&>(*this))
616 DefGetter(ynothrow, Size&, SizeRef, static_cast<Size&>(*this))
626 return x.GetPoint() == y.GetPoint() && x.GetSize() == y.GetSize();
647 return Rect(r.GetPoint() + v, r.GetSize());
657 return Rect(r.GetPoint() - v, r.GetSize());
674 operator|(const Rect&, const Rect&) ynothrow;
677 template<typename _type>
713 : pBuffer(b), size(s)
721 : pBuffer(g.pBuffer), size(g.size)
746 explicit
DefCvt(const ynothrow,
bool,
747 pBuffer && size.
Width != 0 && size.Height != 0)
753 DefGetter(const ynothrow,
size_t, SizeOfBuffer,