From e762b9d1a0080bfbba36d1b53ada858d05e13db1 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 21 Mar 2012 15:54:03 +0100 Subject: utils/rectangle: added shortcut for accessing the position of a rectangle --- src/utils/rectangle.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/utils') diff --git a/src/utils/rectangle.hpp b/src/utils/rectangle.hpp index 2131afc8..fc5d8ac3 100644 --- a/src/utils/rectangle.hpp +++ b/src/utils/rectangle.hpp @@ -85,6 +85,16 @@ namespace usdx return point2; } + const T get_x(void) const + { + return point1.get_x(); + } + + const T get_y(void) const + { + return point1.get_y(); + } + const T get_width(void) const { return point2.get_x() - point1.get_x(); -- cgit v1.2.3