]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gdicmn.h
Reverted part of patch #876969 ("Fixes to Borland warnings"), resulted in bugs when...
[wxWidgets.git] / include / wx / gdicmn.h
index 9f81bff7d47ffe633cf68722e183e0f57c7e2e5d..7be6d7bcb4b2ef6ac38fdc676d10876252b512ae 100644 (file)
@@ -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()); }
 };
 
 // ---------------------------------------------------------------------------