Commit 9c597bc190834208a1dbf8041ebe7f4c780401a0

henry 2003-09-29T20:59:51

Added SetDepth function to FTBBox

diff --git a/test/FTBBox-Test.cpp b/test/FTBBox-Test.cpp
index 88ac1da..02dfb62 100755
--- a/test/FTBBox-Test.cpp
+++ b/test/FTBBox-Test.cpp
@@ -19,6 +19,7 @@ class FTBBoxTest : public CppUnit::TestCase
         CPPUNIT_TEST( testGlyphConstructor);
         CPPUNIT_TEST( testMoveBBox);
         CPPUNIT_TEST( testPlusEquals);
+        CPPUNIT_TEST( testSetDepth);
     CPPUNIT_TEST_SUITE_END();
         
     public:
@@ -121,6 +122,24 @@ class FTBBoxTest : public CppUnit::TestCase
             tearDownFreetype();
         }
         
+        void testSetDepth()
+        {
+            setUpFreetype();
+            
+            FTBBox boundingBox( face->glyph);
+            
+            boundingBox.SetDepth( 37.754);
+            
+            CPPUNIT_ASSERT_DOUBLES_EQUAL(   2, boundingBox.lowerX, 0.01);
+            CPPUNIT_ASSERT_DOUBLES_EQUAL( -15, boundingBox.lowerY, 0.01);
+            CPPUNIT_ASSERT_DOUBLES_EQUAL(   0, boundingBox.lowerZ, 0.01);
+            CPPUNIT_ASSERT_DOUBLES_EQUAL(  35, boundingBox.upperX, 0.01);
+            CPPUNIT_ASSERT_DOUBLES_EQUAL(  38, boundingBox.upperY, 0.01);
+            CPPUNIT_ASSERT_DOUBLES_EQUAL(  37.754, boundingBox.upperZ, 0.01);
+
+            tearDownFreetype();
+        }
+        
         void setUp() 
         {}