aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2012-03-25 21:36:09 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2013-01-13 22:40:52 +0100
commitdffdab14fb56f2702abdc88c6df769a58e926c9d (patch)
tree37acdff544a61fd09a3882ef6ba4cf6ad87686ef /src
parentd4fbbaea2c3c09d36785d0fef24317842ed17069 (diff)
downloadusdx-dffdab14fb56f2702abdc88c6df769a58e926c9d.tar.gz
usdx-dffdab14fb56f2702abdc88c6df769a58e926c9d.tar.xz
usdx-dffdab14fb56f2702abdc88c6df769a58e926c9d.zip
utils/rectangle: added ctor to create a Rectange from a FTBox
Diffstat (limited to 'src')
-rw-r--r--src/utils/rectangle.hpp8
1 files changed, 8 insertions, 0 deletions
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 <ftgl.h>
+
#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<T>& rectangle) :
point1(rectangle.point1), point2(rectangle.point2)
{