added wxSize::IncBy() and DecBy() methods

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-09-24 11:08:51 +00:00
parent 57b5c44a4f
commit 2335974794
3 changed files with 54 additions and 1 deletions

View File

@@ -229,6 +229,15 @@ public:
void DecTo(const wxSize& sz)
{ if ( sz.x < x ) x = sz.x; if ( sz.y < y ) y = sz.y; }
void IncBy(int dx, int dy) { x += dx; y += dy; }
void IncBy(const wxSize& sz) { IncBy(sz.x, sz.y); }
void IncBy(int d) { IncBy(d, d); }
void DecBy(int dx, int dy) { IncBy(-dx, -dy); }
void DecBy(const wxSize& sz) { DecBy(sz.x, sz.y); }
void DecBy(int d) { DecBy(d, d); }
void Scale(float xscale, float yscale)
{ x = (int)(x*xscale); y = (int)(y*yscale); }