Commit 10cdd9a426f0af3521e1609f0b3328e1b673ab89

sammy 2008-05-07T14:55:41

* Allow to create an FTBBox using two FTPoint objects. * Allow the operands to FTPoint's "+" and "-" operators to be const.

diff --git a/src/FTGL/FTBBox.h b/src/FTGL/FTBBox.h
index 811f1af..18c1d52 100644
--- a/src/FTGL/FTBBox.h
+++ b/src/FTGL/FTBBox.h
@@ -59,6 +59,14 @@ class FTGL_EXPORT FTBBox
         {}
 
         /**
+         * Constructor.
+         */
+        FTBBox(FTPoint l, FTPoint u)
+        :   lower(l),
+            upper(u)
+        {}
+
+        /**
          * Constructor. Extracts a bounding box from a freetype glyph. Uses
          * the control box for the glyph. <code>FT_Glyph_Get_CBox()</code>
          *
diff --git a/src/FTGL/FTPoint.h b/src/FTGL/FTPoint.h
index b549a3f..766ea4c 100644
--- a/src/FTGL/FTPoint.h
+++ b/src/FTGL/FTPoint.h
@@ -109,7 +109,7 @@ class FTGL_EXPORT FTPoint
          * @param point
          * @return this plus point.
          */
-        inline FTPoint operator + (const FTPoint& point)
+        inline FTPoint operator + (const FTPoint& point) const
         {
             FTPoint temp;
             temp.values[0] = values[0] + point.values[0];
@@ -140,7 +140,7 @@ class FTGL_EXPORT FTPoint
          * @param point
          * @return this minus point.
          */
-        inline FTPoint operator - (const FTPoint& point)
+        inline FTPoint operator - (const FTPoint& point) const
         {
             FTPoint temp;
             temp.values[0] = values[0] - point.values[0];