Got rid of numGreys and pushed down pos
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119
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;