X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f790ec82e7fb0e8fa30bd1b3d71dbbef9bd4dcf8..7ac21a67618fd116d17d39a936380b3689972ee3:/include/wx/gdicmn.h diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 242e0f9ea8..7accd3a796 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -75,6 +75,7 @@ enum wxBitmapType wxBITMAP_TYPE_ICON_RESOURCE, wxBITMAP_TYPE_ANI, wxBITMAP_TYPE_IFF, + wxBITMAP_TYPE_TGA, wxBITMAP_TYPE_MACCURSOR, wxBITMAP_TYPE_MACCURSOR_RESOURCE, wxBITMAP_TYPE_ANY = 50 @@ -229,8 +230,17 @@ public: void DecTo(const wxSize& sz) { if ( sz.x < x ) x = sz.x; if ( sz.y < y ) y = sz.y; } - void Scale(float xscale, float yscale) - { x = (int)(x*xscale); y = (int)(y*yscale); } + 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); } + + + wxSize& Scale(float xscale, float yscale) + { x = (int)(x*xscale); y = (int)(y*yscale); return *this; } // accessors void Set(int xx, int yy) { x = xx; y = yy; } @@ -386,6 +396,7 @@ public: // operations with rect wxRect& Inflate(wxCoord dx, wxCoord dy); + wxRect& Inflate(const wxSize& d) { return Inflate(d.x, d.y); } wxRect& Inflate(wxCoord d) { return Inflate(d, d); } wxRect Inflate(wxCoord dx, wxCoord dy) const { @@ -395,6 +406,7 @@ public: } wxRect& Deflate(wxCoord dx, wxCoord dy) { return Inflate(-dx, -dy); } + wxRect& Deflate(const wxSize& d) { return Inflate(-d.x, -d.y); } wxRect& Deflate(wxCoord d) { return Inflate(-d); } wxRect Deflate(wxCoord dx, wxCoord dy) const {