Made render() arg const. Initialisation list.
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
diff --git a/include/FTTextureGlyph.h b/include/FTTextureGlyph.h
index 23502b3..1efc237 100755
--- a/include/FTTextureGlyph.h
+++ b/include/FTTextureGlyph.h
@@ -14,10 +14,11 @@ class FTTextureGlyph : public FTGlyph
// methods
FTTextureGlyph( FT_Glyph glyph, int gi, unsigned char* data, int stride, float u, float v);
virtual ~FTTextureGlyph();
- virtual float Render( FT_Vector& v);
+ virtual float Render( const FT_Vector& v);
private:
// attributes
+ // What about the other point class in vectoriser?
struct FTPoint
{
float x;
diff --git a/src/FTTextureGlyph.cpp b/src/FTTextureGlyph.cpp
index 15df83d..094e3d2 100755
--- a/src/FTTextureGlyph.cpp
+++ b/src/FTTextureGlyph.cpp
@@ -5,7 +5,10 @@
FTTextureGlyph::FTTextureGlyph( FT_Glyph glyph, int gi, unsigned char* data, int stride, float u, float v)
-: FTGlyph(gi)
+: FTGlyph(gi),
+ destWidth(0),
+ destHeight(0),
+ numGreys(0)
{
if( !glyph->format == ft_glyph_format_bitmap)
{ return;}
@@ -67,7 +70,7 @@ FTTextureGlyph::~FTTextureGlyph()
}
-float FTTextureGlyph::Render( FT_Vector& pen)
+float FTTextureGlyph::Render( const FT_Vector& pen)
{
// int adv = advance/* + pos.x */+ ( v.x >> 16); // FIXME ??? pos.x = bearing X