X-Git-Url: https://git.ucc.asn.au/?p=tpg%2Facess2.git;a=blobdiff_plain;f=Usermode%2FApplications%2Faxwin4_src%2FServer%2Finclude%2FCRect.hpp;fp=Usermode%2FApplications%2Faxwin4_src%2FServer%2Finclude%2FCRect.hpp;h=3c344b259f796e62aaf27dd992fc5cb6a3f5832b;hp=0000000000000000000000000000000000000000;hb=845b6f9d90bb87b5e760e4d49aa93b0e003ab750;hpb=67a7fe2bb79eceaf10c572a99bd8345c4e81cf5b diff --git a/Usermode/Applications/axwin4_src/Server/include/CRect.hpp b/Usermode/Applications/axwin4_src/Server/include/CRect.hpp new file mode 100644 index 00000000..3c344b25 --- /dev/null +++ b/Usermode/Applications/axwin4_src/Server/include/CRect.hpp @@ -0,0 +1,40 @@ +/* + */ +#ifndef _CRECT_H_ +#define _CRECT_H_ + +namespace AxWin { + +class CRect +{ +public: + CRect(): + CRect(0,0,0,0) + { + }; + CRect(int X, int Y, unsigned int W, unsigned int H); + + void Translate(int DX, int DY) { + m_x += DX; m_x2 += DX; + m_y += DY; m_y2 += DY; + } + void Move(int NewX, int NewY); + void Resize(int NewW, int NewH); + + bool HasIntersection(const CRect& other) const; + CRect Intersection(const CRect& other) const; + + CRect RelativeIntersection(const CRect& area); + + int m_x; + int m_y; + int m_w; + int m_h; + int m_x2; + int m_y2; +}; + +}; // namespace AxWin + +#endif +