]> git.saurik.com Git - wxWidgets.git/commitdiff
added unary wxPoint::operator-
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 9 Sep 2006 15:52:05 +0000 (15:52 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 9 Sep 2006 15:52:05 +0000 (15:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gdicmn.h

index 07e68c9c21104d23b210424e524ef621ef214192..1c02e3dfc972edcf2dd79f716ecf6e88819aa8ff 100644 (file)
@@ -307,6 +307,8 @@ public:
 
     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()); }
+
+    wxPoint operator-() const { return wxPoint(-x, -y); }
 };
 
 // ---------------------------------------------------------------------------