Commit f58ddca26598041176a36b266bdab7a36296a2c2

sammy 2008-05-07T14:59:03

* Fix FTBBox::SetDepth() behaviour with negative depth values (as done in the FTExtrudeGlyph class).

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/src/FTGL/FTBBox.h b/src/FTGL/FTBBox.h
index 18c1d52..47a2722 100644
--- a/src/FTGL/FTBBox.h
+++ b/src/FTGL/FTBBox.h
@@ -142,7 +142,10 @@ class FTGL_EXPORT FTBBox
 
         void SetDepth(float depth)
         {
-            upper.Z(lower.Z() + depth);
+            if(depth > 0)
+                upper.Z(lower.Z() + depth);
+            else
+                lower.Z(upper.Z() + depth);
         }