Commit 538791dad24a313486b24e5655896fbd6b8131ff

henry 2002-12-12T06:12:58

Got rid of numGreys and pushed down pos

diff --git a/include/FTBitmapGlyph.h b/include/FTBitmapGlyph.h
index a06727e..77450d4 100755
--- a/include/FTBitmapGlyph.h
+++ b/include/FTBitmapGlyph.h
@@ -55,6 +55,11 @@ class FTGL_EXPORT FTBitmapGlyph : public FTGlyph
         unsigned int destHeight;
         
         /**
+         * Vector from the pen position to the topleft corner of the bitmap
+         */
+        FTPoint pos;
+        
+        /**
          * Pointer to the 'image' data
          */
         unsigned char* data;
diff --git a/include/FTGlyph.h b/include/FTGlyph.h
index 268defc..cccaa20 100755
--- a/include/FTGlyph.h
+++ b/include/FTGlyph.h
@@ -71,11 +71,6 @@ class FTGL_EXPORT FTGlyph
         float advance;
 
         /**
-         * Vector from the pen position to the topleft corner of the glyph
-         */
-        FTPoint pos;
-        
-        /**
          * The bounding box of this glyph.
          */
         FTBBox bBox;
diff --git a/include/FTPixmapGlyph.h b/include/FTPixmapGlyph.h
index 550e874..52e9df9 100755
--- a/include/FTPixmapGlyph.h
+++ b/include/FTPixmapGlyph.h
@@ -53,10 +53,10 @@ class  FTGL_EXPORT FTPixmapGlyph : public FTGlyph
         int destHeight;
         
         /**
-         * The number of greys or bit depth of the image
+         * Vector from the pen position to the topleft corner of the pixmap
          */
-        int numGreys;
-
+        FTPoint pos;
+        
         /**
          * Pointer to the 'image' data
          */
diff --git a/include/FTTextureGlyph.h b/include/FTTextureGlyph.h
index 0dfd9d3..34be239 100755
--- a/include/FTTextureGlyph.h
+++ b/include/FTTextureGlyph.h
@@ -60,9 +60,9 @@ class FTGL_EXPORT FTTextureGlyph : public FTGlyph
         int destHeight;
 
         /**
-         * The number of greys or bit depth of the image
+         * Vector from the pen position to the topleft corner of the pixmap
          */
-        int numGreys;
+        FTPoint pos;
         
         /**
          * The texture co-ords of this glyph within the texture.
diff --git a/src/FTPixmapGlyph.cpp b/src/FTPixmapGlyph.cpp
index c07a283..1da98f1 100755
--- a/src/FTPixmapGlyph.cpp
+++ b/src/FTPixmapGlyph.cpp
@@ -4,7 +4,6 @@ FTPixmapGlyph::FTPixmapGlyph( FT_Glyph glyph)
 :   FTGlyph( glyph),
     destWidth(0),
     destHeight(0),
-    numGreys(0),
     data(0)
 {
     // This function will always fail if the glyph's format isn't scalable????
@@ -76,7 +75,6 @@ FTPixmapGlyph::FTPixmapGlyph( FT_Glyph glyph)
         destHeight = srcHeight;
     }
 
-    numGreys = source->num_grays;
     pos.x = bitmap->left;
     pos.y = srcHeight - bitmap->top;
     
@@ -87,10 +85,7 @@ FTPixmapGlyph::FTPixmapGlyph( FT_Glyph glyph)
 
 FTPixmapGlyph::~FTPixmapGlyph()
 {
-    if( data)
-    {
-        delete [] data;
-    }
+    delete [] data;
 }
 
 
diff --git a/src/FTTextureGlyph.cpp b/src/FTTextureGlyph.cpp
index a631960..b3fe4f0 100755
--- a/src/FTTextureGlyph.cpp
+++ b/src/FTTextureGlyph.cpp
@@ -5,7 +5,6 @@ FTTextureGlyph::FTTextureGlyph( FT_Glyph glyph, int id, int xOffset, int yOffset
 :   FTGlyph( glyph),
     destWidth(0),
     destHeight(0),
-    numGreys(0),
     glTextureID(id),
     activeTextureID(0)
 {
@@ -47,8 +46,6 @@ FTTextureGlyph::FTTextureGlyph( FT_Glyph glyph, int id, int xOffset, int yOffset
     uv[1].x = static_cast<float>( xOffset + destWidth) / static_cast<float>(width);
     uv[1].y = static_cast<float>( yOffset + destHeight) / static_cast<float>(height);
     
-    numGreys = source->num_grays;
-
     pos.x = bitmap->left;
     pos.y = bitmap->top;