Commit c704216e0edfafa1fcbe10197d22a17a052a1e71

henry 2001-09-16T21:49:52

Removed glyph index parameter from c_stor (see FTGlyph) and updated comments

diff --git a/include/FTBitmapGlyph.h b/include/FTBitmapGlyph.h
index e8d200a..d650ba5 100755
--- a/include/FTBitmapGlyph.h
+++ b/include/FTBitmapGlyph.h
@@ -11,9 +11,24 @@
 class	FTBitmapGlyph : public FTGlyph
 {
 	public:
-		// methods
-		FTBitmapGlyph( FT_Glyph glyph, unsigned int glyphIndex);
+		/**
+		 * Constructor
+		 *
+		 * @param
+		 */
+		FTBitmapGlyph( FT_Glyph glyph);
+
+		/**
+		 *
+		 */
 		virtual ~FTBitmapGlyph();
+
+		/**
+		 *
+		 * @param pen	
+		 *
+		 * @return		
+		 */
 		virtual float Render( const FT_Vector& pen);
 		
 		// attributes
diff --git a/include/FTPixmapGlyph.h b/include/FTPixmapGlyph.h
index f0a2ac3..3485e8d 100755
--- a/include/FTPixmapGlyph.h
+++ b/include/FTPixmapGlyph.h
@@ -12,7 +12,7 @@ class FTPixmapGlyph : public FTGlyph
 {
 	public:
 		// methods
-		FTPixmapGlyph( FT_Glyph glyph, const unsigned int glyphIndex);
+		FTPixmapGlyph( FT_Glyph glyph);
 		virtual ~FTPixmapGlyph();
 		virtual float Render( const FT_Vector& pen);
 		
diff --git a/include/FTPolyGlyph.h b/include/FTPolyGlyph.h
index a692b63..7682fcd 100644
--- a/include/FTPolyGlyph.h
+++ b/include/FTPolyGlyph.h
@@ -13,7 +13,7 @@ class	FTPolyGlyph : public FTGlyph
 {
 	public:
 		// methods
-		FTPolyGlyph( FT_Glyph glyph, unsigned int glyphIndex);
+		FTPolyGlyph( FT_Glyph glyph);
 		virtual ~FTPolyGlyph();
 		virtual float Render( const FT_Vector& pen);
 		
diff --git a/include/FTTextureGlyph.h b/include/FTTextureGlyph.h
index 6e16a04..bac8d4c 100755
--- a/include/FTTextureGlyph.h
+++ b/include/FTTextureGlyph.h
@@ -13,7 +13,7 @@ class	FTTextureGlyph : public FTGlyph
 {
 	public:
 		// methods
-		FTTextureGlyph( FT_Glyph glyph, unsigned int gi, int id, unsigned char* data, int stride, int height, float u, float v);
+		FTTextureGlyph( FT_Glyph glyph, int id, unsigned char* data, int stride, int height, float u, float v);
 		virtual ~FTTextureGlyph();
 		virtual float Render( const FT_Vector& pen);
 		
diff --git a/src/FTBitmapGlyph.cpp b/src/FTBitmapGlyph.cpp
index e2bc09b..07af04a 100755
--- a/src/FTBitmapGlyph.cpp
+++ b/src/FTBitmapGlyph.cpp
@@ -4,8 +4,8 @@
 #include	"FTGL.h"
 
 
-FTBitmapGlyph::FTBitmapGlyph( FT_Glyph glyph, unsigned int gi)
-:	FTGlyph( gi),
+FTBitmapGlyph::FTBitmapGlyph( FT_Glyph glyph)
+:	FTGlyph(),
 	destWidth(0),
 	destHeight(0),
 	data(0)
@@ -25,7 +25,7 @@ FTBitmapGlyph::FTBitmapGlyph( FT_Glyph glyph, unsigned int gi)
 	int srcHeight = source->rows;
 	int srcPitch = source->pitch;
     
-	advance = glyph->advance.x >> 16; // this is 6 in the freetype docs!!!!!!
+	advance = glyph->advance.x >> 16;
 
  	pos.x = bitmap->left;
 	pos.y = srcHeight - bitmap->top;
diff --git a/src/FTPixmapGlyph.cpp b/src/FTPixmapGlyph.cpp
index 7011e73..1970be9 100755
--- a/src/FTPixmapGlyph.cpp
+++ b/src/FTPixmapGlyph.cpp
@@ -4,8 +4,8 @@
 #include	"FTGL.h"
 
 
-FTPixmapGlyph::FTPixmapGlyph( FT_Glyph glyph, const unsigned int gi)
-:	FTGlyph(gi),
+FTPixmapGlyph::FTPixmapGlyph( FT_Glyph glyph)
+:	FTGlyph(),
 	destWidth(0),
 	destHeight(0),
 	numGreys(0),
@@ -14,7 +14,9 @@ FTPixmapGlyph::FTPixmapGlyph( FT_Glyph glyph, const unsigned int gi)
 	// This function will always fail if the glyph's format isn't scalable????
 	FT_Error err = FT_Glyph_To_Bitmap( &glyph, ft_render_mode_normal, 0, 1);
 	if( err || ft_glyph_format_bitmap != glyph->format)
-	{ return;}
+	{
+		return;
+	}
 
 	FT_BitmapGlyph  bitmap = (FT_BitmapGlyph)glyph;
 	FT_Bitmap*      source = &bitmap->bitmap;
@@ -27,7 +29,7 @@ FTPixmapGlyph::FTPixmapGlyph( FT_Glyph glyph, const unsigned int gi)
 	int srcPitch = source->pitch;
     
 	numGreys = source->num_grays;
-	advance = glyph->advance.x >> 16; // this is 6 in the freetype docs!!!!!!
+	advance = glyph->advance.x >> 16;
 
  	pos.x = bitmap->left;
 	pos.y = srcHeight - bitmap->top;
@@ -81,6 +83,7 @@ float FTPixmapGlyph::Render( const FT_Vector& pen)
 
 		glDrawPixels( destWidth, destHeight, GL_RGBA, GL_UNSIGNED_BYTE, (const GLvoid*)data);
 
+
 		// Restore the glyph origin
 		glBitmap( 0, 0, 0.0, 0.0, -pen.x - pos.x, -pen.y + pos.y, (const GLubyte *)0);
 
diff --git a/src/FTPolyGlyph.cpp b/src/FTPolyGlyph.cpp
index 3800b53..ded0c01 100644
--- a/src/FTPolyGlyph.cpp
+++ b/src/FTPolyGlyph.cpp
@@ -49,8 +49,8 @@ void ftglCombine( GLdouble coords[3], void* vertex_data[4], GLfloat weight[4], v
 }
 
 
-FTPolyGlyph::FTPolyGlyph( FT_Glyph glyph, unsigned int gi)
-:	FTGlyph(gi),
+FTPolyGlyph::FTPolyGlyph( FT_Glyph glyph)
+:	FTGlyph(),
 	vectoriser(0),
 	numPoints(0),
 	numContours(0),
@@ -77,7 +77,7 @@ FTPolyGlyph::FTPolyGlyph( FT_Glyph glyph, unsigned int gi)
 	vectoriser->Output( data);
 	
 	contourFlag = vectoriser->ContourFlag();
-	advance = glyph->advance.x >> 16; // this is 6 in the freetype docs!!!!!!
+	advance = glyph->advance.x >> 16;
 
 	delete vectoriser;
 
diff --git a/src/FTTextureGlyph.cpp b/src/FTTextureGlyph.cpp
index 7d81b38..a42b8a2 100755
--- a/src/FTTextureGlyph.cpp
+++ b/src/FTTextureGlyph.cpp
@@ -6,8 +6,8 @@
 
 int FTTextureGlyph::activeTextureID = 0;
 
-FTTextureGlyph::FTTextureGlyph( FT_Glyph glyph, unsigned int gi, int id, unsigned char* data, int stride, int height, float u, float v)
-:	FTGlyph(gi),
+FTTextureGlyph::FTTextureGlyph( FT_Glyph glyph, int id, unsigned char* data, int stride, int height, float u, float v)
+:	FTGlyph(),
 	destWidth(0),
 	destHeight(0),
 	numGreys(0),
diff --git a/src/FTVectorGlyph.cpp b/src/FTVectorGlyph.cpp
index 1aea823..975be93 100755
--- a/src/FTVectorGlyph.cpp
+++ b/src/FTVectorGlyph.cpp
@@ -6,8 +6,8 @@
 
 
 
-FTVectorGlyph::FTVectorGlyph( FT_Glyph glyph, unsigned int gi)
-:	FTGlyph(gi),
+FTVectorGlyph::FTVectorGlyph( FT_Glyph glyph)
+:	FTGlyph(),
 	vectoriser(0),
 	numPoints(0),
 	numContours(0),
@@ -35,7 +35,7 @@ FTVectorGlyph::FTVectorGlyph( FT_Glyph glyph, unsigned int gi)
 	data = new double[ numPoints * 3];
 	vectoriser->Output( data);
 	
-	advance = glyph->advance.x >> 16; // this is 6 in the freetype docs!!!!!!
+	advance = glyph->advance.x >> 16;
 
 	delete vectoriser;
 	
diff --git a/src/FTVectorGlyph.h b/src/FTVectorGlyph.h
index ac4e436..560d7a1 100755
--- a/src/FTVectorGlyph.h
+++ b/src/FTVectorGlyph.h
@@ -13,7 +13,7 @@ class	FTVectorGlyph : public FTGlyph
 {
 	public:
 		// methods
-		FTVectorGlyph( FT_Glyph glyph, unsigned int glyphIndex);
+		FTVectorGlyph( FT_Glyph glyph);
 		virtual ~FTVectorGlyph();
 		virtual float Render( const FT_Vector& pen);