diff --git a/src/Box.cpp b/src/Box.cpp index b30d2f7..2b9933b 100644 --- a/src/Box.cpp +++ b/src/Box.cpp @@ -419,8 +419,6 @@ void Box::clear() h = 0; } -/* Scale the box by multiplying size by {delta.x, delta.y}. If preserve center is set, the box will be scaled - * around the center, otherwise the top left corner will remain in place. */ void Box::scale(glm::vec2 delta, bool preserve_center) { glm::vec2 center = this->center(); @@ -431,8 +429,6 @@ void Box::scale(glm::vec2 delta, bool preserve_center) } } -/* Scale the box by multiplying both width and height by delta. If preserve center is set, the box will be scaled - * around the center, otherwise the top left corner will remain in place. */ void Box::scale(float delta, bool preserve_center) { scale({delta, delta}, preserve_center); diff --git a/src/Box.hpp b/src/Box.hpp index e8db1ed..17c381d 100644 --- a/src/Box.hpp +++ b/src/Box.hpp @@ -137,8 +137,25 @@ public: void center(const glm::vec2&); operator SDL_Rect() const; void clear(); - void scale(glm::vec2, bool = false); - void scale(float, bool = false); + + /*! + * Scale the box by multiplying size by {delta.x, delta.y}. If preserve center is set, the box will be scaled + * around the center, otherwise the top left corner will remain in place. + * + * @param delta amount to scale + * @param preserve_center after scaling, move the box so the center is the same as it was before scaling + */ + void scale(glm::vec2 delta, bool preserve_center = false); + + /*! + * Scale the box by multiplying both width and height by delta. If preserve center is set, the box will be scaled + * around the center, otherwise the top left corner will remain in place. + * + * @param delta amount to scale + * @param preserve_center after scaling, move the box so the center is the same as it was before scaling + */ + void scale(float delta, bool preserve_center = false); + void expand(glm::vec2, bool = false); void expand(float, bool = false); void move(const glm::vec2&);