From 91420895f6cbe7a1aa8e1c7f590195ed6bae0a48 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 11 Jan 2013 20:45:57 +0100 Subject: rectangle: add possibility to get dimension --- src/utils/rectangle.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils/rectangle.hpp b/src/utils/rectangle.hpp index 1d8abda2..33b9c763 100644 --- a/src/utils/rectangle.hpp +++ b/src/utils/rectangle.hpp @@ -117,6 +117,11 @@ namespace usdx point2.set_x(value + width); } + const Dimension get_dim() const + { + return Dimension (get_width(), get_height()); + } + const T get_right(void) const { return Math::max(point1.get_x(), point2.get_x()); -- cgit v1.2.3