Add gfx::Rect::inflate(int) member function

This commit is contained in:
David Capello 2015-03-19 10:10:06 -03:00
parent f9a444aed7
commit f5e9d3fe15

View File

@ -1,5 +1,5 @@
// Aseprite Gfx Library // Aseprite Gfx Library
// Copyright (C) 2001-2013 David Capello // Copyright (C) 2001-2013, 2015 David Capello
// //
// This file is released under the terms of the MIT license. // This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information. // Read LICENSE.txt for more information.
@ -141,6 +141,12 @@ public:
return *this; return *this;
} }
RectT& inflate(const T& delta) {
w += delta;
h += delta;
return *this;
}
RectT& inflate(const T& dw, const T& dh) { RectT& inflate(const T& dw, const T& dh) {
w += dw; w += dw;
h += dh; h += dh;