14 #include "../WinAPI/WinTypes.h"
45 inline operator RECT&() noexcept
47 return *((RECT*)
this);
49 inline operator const RECT&()
const noexcept
51 return *((
const RECT*)
this);
53 inline operator RECT*() noexcept
57 inline operator const RECT*()
const noexcept
59 return (
const RECT*)
this;
66 return(x >= left && x < right);
71 return(y >= top && y < bottom);
76 return(IsInsideX(x) && IsInsideY(y));
84 return PtInRect(pt.x, pt.y);
118 if (
rect.left < left)
122 if (
rect.right > right)
124 if (
rect.bottom > bottom)
134 return iRight2 - iLeft2;
141 return iBottom2 - iTop2;
146 return(GetOverlapX(r) >= minx && GetOverlapY(r) >= miny);
153 if (
rect.left >= right)
155 if (
rect.top >= bottom)
157 if (
rect.right <= left)
159 if (
rect.bottom <= top)
167 bool bChange =
false;
187 pt.
y = (float)bottom;
222 right = (right | iSizeXY) + 1;
224 bottom = (bottom | iSizeXY) + 1;
234 cString get_RectStr(
void)
const;
237 void v_GetRect(
cVariant& vVal)
const;
242 #if ! defined(_MFC_VER)
248 inline cRectI& Cvt(RECT& pt)
252 inline const cRectI& Cvt(
const RECT& pt)
254 return *((
const cRectI*)&pt);
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
#define MIN(a, b)
Definition: SysTypes.h:457
#define MAX(a, b)
Definition: SysTypes.h:456
bool ClampPtInRectI(cPoint2f &pt) const
Definition: cRectI.h:164
cWinSize get_RectSize() const noexcept
Definition: cRectI.h:228
bool IsInsideMe(const cRectI &rect) const noexcept
Definition: cRectI.h:113
bool IsOverlapped(const cRectI &rect) const noexcept
Definition: cRectI.h:148
bool IsOverlapped(const cRectI &r, DVALUE_t minx, DVALUE_t miny) const noexcept
Definition: cRectI.h:143
void OffsetPositive()
Definition: cRectI.h:208
void SnapToGrid(DVALUE_t iSizeXY) noexcept
Definition: cRectI.h:217
void UnionPoint(DVALUE_t x, DVALUE_t y)
Definition: cRectI.h:193
DVALUE_t GetOverlapY(const cRectI &rect) const noexcept
Definition: cRectI.h:136
bool ClampPtInRectX(cPoint2i &pt) const noexcept
Definition: cRectI.h:86
bool IsInsideX(DVALUE_t x) const noexcept
Definition: cRectI.h:63
DVALUE_t GetOverlapX(const cRectI &rect) const noexcept
Definition: cRectI.h:129
cRectI() noexcept
Definition: cRectI.h:30
cRectI(DVALUE_t nleft, DVALUE_t ntop, DVALUE_t nright=0, DVALUE_t nbottom=0)
Definition: cRectI.h:34
bool PtInRect(DVALUE_t x, DVALUE_t y) const noexcept
Definition: cRectI.h:73
bool IsInsideY(DVALUE_t y) const noexcept
Definition: cRectI.h:68
bool PtInRect(const cPoint2i &pt) const noexcept
Definition: cRectI.h:78
TYPE DVALUE_t
Dimension value type.
Definition: cRectT.h:32
Definition: cVariant.h:26
TYPE x
Definition: cVecT.h:490
TYPE y
Definition: cVecT.h:490
Definition: WinTypes.h:128
DIR_TYPE
Definition: cDirectionDef.h:25
cRectI CRect
Compatible with MFC 2d CRect.
Definition: cRectI.h:243
interface const RECTQ_t & rect
Definition: cQuadtree.h:44
class __DECL_IMPORT cVariant
Definition: cJSONWriter.h:19
int ITERATE_t
like size_t but signed
Definition: Index.h:28
char GChar_t
My version of TCHAR, _TCHAR.
Definition: StrConst.h:26