Commit 82035b3b8525d9d4033ff4a6325eefc04f9e4d6f

henry 2001-11-12T02:42:32

Added bounding box function

diff --git a/include/FTGlyphContainer.h b/include/FTGlyphContainer.h
index 2eaa7b0..5ce5d48 100755
--- a/include/FTGlyphContainer.h
+++ b/include/FTGlyphContainer.h
@@ -1,16 +1,18 @@
 #ifndef		__FTGlyphContainer__
 #define		__FTGlyphContainer__
 
-#include "FTGL.h"
-
 #include <vector>
 
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #include FT_GLYPH_H
 
+#include "FTGL.h"
+
+#include "FTGlyph.h"
+
 class FTFace;
-class FTGlyph;
+//class FTGlyph;
 
 using namespace std;
 
@@ -55,6 +57,9 @@ class FTGL_EXPORT FTGlyphContainer
 		 */
 		FTGlyph* Glyph( unsigned int c) const;
 
+		
+		FTBBox BBox( unsigned int index);
+		
 		/**
 		* Returns the kerned advance width for a glyph.
 		*
diff --git a/src/FTGlyphContainer.cpp b/src/FTGlyphContainer.cpp
index 710e253..fc9d8de 100755
--- a/src/FTGlyphContainer.cpp
+++ b/src/FTGlyphContainer.cpp
@@ -47,6 +47,14 @@ FTGlyph* FTGlyphContainer::Glyph( unsigned int c) const
 }
 
 
+FTBBox FTGlyphContainer::BBox( unsigned int index)
+{
+	unsigned int left = face->CharIndex( index);
+
+	return glyphs[left]->BBox();
+}
+
+
 float FTGlyphContainer::Advance( unsigned int index, unsigned int next)
 {
 	unsigned int left = face->CharIndex( index);