* Allow to create an FTBBox using two FTPoint objects. * Allow the operands to FTPoint's "+" and "-" operators to be const.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
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];