From dffdab14fb56f2702abdc88c6df769a58e926c9d Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Sun, 25 Mar 2012 21:36:09 +0200 Subject: utils/rectangle: added ctor to create a Rectange from a FTBox --- src/utils/rectangle.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/utils/rectangle.hpp b/src/utils/rectangle.hpp index 0a7ca954..39743e5d 100644 --- a/src/utils/rectangle.hpp +++ b/src/utils/rectangle.hpp @@ -27,6 +27,8 @@ #ifndef RECTANGLE_HPP #define RECTANGLE_HPP +#include + #include "point.hpp" #include "dimension.hpp" @@ -69,6 +71,12 @@ namespace usdx { } + Rectangle(const FTBBox& bbox) : + point1((T)bbox.Upper().X(), (T)bbox.Upper().Y()), + point2((T)bbox.Lower().X(), (T)bbox.Lower().Y()) + { + } + Rectangle(const Rectangle& rectangle) : point1(rectangle.point1), point2(rectangle.point2) { -- cgit v1.2.3