X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/355a5e2bd317690c277cd9229af76d7b0db45d03..2654f7e423bb773ca52c8b465c6ec9abfa398e45:/include/wx/gdicmn.h?ds=sidebyside diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 9f81bff7d4..7be6d7bcb4 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -273,6 +273,12 @@ public: wxPoint& operator+=(const wxPoint& p) { x += p.x; y += p.y; return *this; } wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; } + + wxPoint& operator+=(const wxSize& s) { x += s.GetWidth(); y += s.GetHeight(); return *this; } + wxPoint& operator-=(const wxSize& s) { x -= s.GetWidth(); y -= s.GetHeight(); return *this; } + + wxPoint operator+(const wxSize& s) const { return wxPoint(x + s.GetWidth(), y + s.GetHeight()); } + wxPoint operator-(const wxSize& s) const { return wxPoint(x - s.GetWidth(), y - s.GetHeight()); } }; // ---------------------------------------------------------------------------