Made render() arg const. Minor tidy ups
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
diff --git a/include/FTPolyGlyph.h b/include/FTPolyGlyph.h
index b254ce2..36f951a 100644
--- a/include/FTPolyGlyph.h
+++ b/include/FTPolyGlyph.h
@@ -15,7 +15,7 @@ class FTPolyGlyph : public FTGlyph
// methods
FTPolyGlyph( FT_Glyph glyph, int glyphIndex);
virtual ~FTPolyGlyph();
- virtual float Render( FT_Vector& pen);
+ virtual float Render( const FT_Vector& pen);
// attributes
@@ -27,8 +27,9 @@ class FTPolyGlyph : public FTGlyph
FTVectoriser* vectoriser;
int numPoints;
int numContours;
- int * contourLength;
- float* data;
+ int contourFlag;
+ int* contourLength;
+ double* data;
int glList;
};
diff --git a/src/FTPolyGlyph.cpp b/src/FTPolyGlyph.cpp
index 2290a00..39d8c7b 100644
--- a/src/FTPolyGlyph.cpp
+++ b/src/FTPolyGlyph.cpp
@@ -58,7 +58,8 @@ FTPolyGlyph::FTPolyGlyph( FT_Glyph glyph, int gi)
numPoints(0),
numContours(0),
contourLength(0),
- data(0)
+ data(0),
+ glList(0)
{
if( glyph->format == ft_glyph_format_outline)
{
@@ -142,10 +143,11 @@ void FTPolyGlyph::Tesselate()
FTPolyGlyph::~FTPolyGlyph()
{
delete [] data;
+ delete [] contourLength;
}
-float FTPolyGlyph::Render( FT_Vector& pen)
+float FTPolyGlyph::Render( const FT_Vector& pen)
{
glTranslatef( pen.x, pen.y, 0);
glCallList( glList);