diff --git a/region.cpp b/region.cpp index 1f545622..85946fb5 100644 --- a/region.cpp +++ b/region.cpp @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with libgim. If not, see . * - * Copyright 2010 Danny Robson + * Copyright 2010-2015 Danny Robson */ @@ -31,6 +31,17 @@ using namespace util; +//----------------------------------------------------------------------------- +template +region::region (util::point<2,T> _point, + util::extent _size): + x (_point.x), + y (_point.y), + w (_size.w), + h (_size.h) +{ ; } + + //----------------------------------------------------------------------------- template region::region (T _x, T _y, size_type _w, size_type _h): diff --git a/region.hpp b/region.hpp index 947ae7b2..a25df6db 100644 --- a/region.hpp +++ b/region.hpp @@ -14,13 +14,14 @@ * You should have received a copy of the GNU General Public License * along with libgim. If not, see . * - * Copyright 2010 Danny Robson + * Copyright 2010-2015 Danny Robson */ #ifndef __UTIL_REGION_HPP #define __UTIL_REGION_HPP +#include "extent.hpp" #include "point.hpp" #include "types/traits.hpp" @@ -40,6 +41,7 @@ namespace util { T x, y; size_type w, h; + region (util::point<2,T>, util::extent); region (T _x, T _y, size_type _w, size_type _h); size_type area (void) const;