X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b51403d3753c10b9cee43cfbac82f42af01b191..5b36366c59ea68056ba07a3ca1c2cd6022a59735:/include/wx/gdicmn.h diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index ff35a9f297..392cd820c4 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -214,6 +214,11 @@ public: // FIXME are these really useful? If they're, we should have += &c as well wxSize operator+(const wxSize& sz) { return wxSize(x + sz.x, y + sz.y); } wxSize operator-(const wxSize& sz) { return wxSize(x - sz.x, y - sz.y); } + + void IncTo(const wxSize& sz) + { if ( sz.x > x ) x = sz.x; if ( sz.y > y ) y = sz.y; } + void DecTo(const wxSize& sz) + { if ( sz.x < x ) x = sz.x; if ( sz.y < y ) y = sz.y; } // accessors void Set(int xx, int yy) { x = xx; y = yy; }