Commit 0a936162ca2df8b40847e8d46f4c76df823fb376

henry 2001-08-05T22:22:23

Made render() arg const. delete contourList

diff --git a/src/FTVectorGlyph.cpp b/src/FTVectorGlyph.cpp
index 98a35c0..17c6246 100755
--- a/src/FTVectorGlyph.cpp
+++ b/src/FTVectorGlyph.cpp
@@ -12,7 +12,8 @@ FTVectorGlyph::FTVectorGlyph( FT_Glyph glyph, int gi)
 	numPoints(0),
 	numContours(0),
 	contourLength(0),
-	data(0)
+	data(0),
+	glList(0)
 {
 	if( glyph->format == ft_glyph_format_outline)
 	{
@@ -38,7 +39,7 @@ FTVectorGlyph::FTVectorGlyph( FT_Glyph glyph, int gi)
 	
 		delete vectoriser;
 		
-	    if ( ( numContours < 1) || ( numPoints < 1))
+	    if ( ( numContours < 1) || ( numPoints < 3)) // check this
 			return;
 			
  		glList = glGenLists(1);
@@ -64,10 +65,11 @@ FTVectorGlyph::FTVectorGlyph( FT_Glyph glyph, int gi)
 FTVectorGlyph::~FTVectorGlyph()
 {
 	delete [] data;
+	delete [] contourLength;
 }
 
 
-float FTVectorGlyph::Render( FT_Vector& pen)
+float FTVectorGlyph::Render( const FT_Vector& pen)
 {
 	glTranslatef( pen.x, pen.y, 0);
 		glCallList( glList);
diff --git a/src/FTVectorGlyph.h b/src/FTVectorGlyph.h
index 88fe143..3c47435 100755
--- a/src/FTVectorGlyph.h
+++ b/src/FTVectorGlyph.h
@@ -15,7 +15,7 @@ class	FTVectorGlyph : public FTGlyph
 		// methods
 		FTVectorGlyph( FT_Glyph glyph, int glyphIndex);
 		virtual ~FTVectorGlyph();
-		virtual float Render( FT_Vector& pen);
+		virtual float Render( const FT_Vector& pen);
 		
 		// attributes