Changes in FTContour
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/FTVectoriser.h b/include/FTVectoriser.h
index 83db373..4e965f3 100644
--- a/include/FTVectoriser.h
+++ b/include/FTVectoriser.h
@@ -200,7 +200,7 @@ class FTGL_EXPORT FTVectoriser
* @param c The contour index
* @return the number of points in contour[c]
*/
- size_t contourSize( int c) const { return contourList[c]->size();}
+ size_t contourSize( int c) const { return contourList[c]->Points();}
/**
* Get the flag for the tesselation rule for this outline
diff --git a/src/FTVectoriser.cpp b/src/FTVectoriser.cpp
index fd125ea..3468da4 100644
--- a/src/FTVectoriser.cpp
+++ b/src/FTVectoriser.cpp
@@ -163,7 +163,7 @@ int FTVectoriser::points()
int s = 0;
for( size_t c = 0; c < contours(); ++c)
{
- s += contourList[c]->size();
+ s += contourList[c]->Points();
}
return s;
@@ -177,10 +177,10 @@ void FTVectoriser::GetOutline( FTGL_DOUBLE* data)
{
const FTContour* contour = contourList[c];
- for( size_t p = 0; p < contour->size(); ++p)
+ for( size_t p = 0; p < contour->Points(); ++p)
{
- data[i] = static_cast<FTGL_DOUBLE>(contour->pointList[p].x / 64.0f);
- data[i + 1] = static_cast<FTGL_DOUBLE>(contour->pointList[p].y / 64.0f);
+ data[i] = static_cast<FTGL_DOUBLE>(contour->Point(p).x / 64.0f);
+ data[i + 1] = static_cast<FTGL_DOUBLE>(contour->Point(p).y / 64.0f);
data[i + 2] = 0.0f;
i += 3;
}
@@ -225,9 +225,9 @@ void FTVectoriser::MakeMesh( FTGL_DOUBLE zNormal)
gluTessBeginContour( tobj);
- for( size_t p = 0; p < contour->size(); ++p)
+ for( size_t p = 0; p < contour->Points(); ++p)
{
- FTGL_DOUBLE* d = const_cast<FTGL_DOUBLE*>(&contour->pointList[p].x);
+ FTGL_DOUBLE* d = const_cast<FTGL_DOUBLE*>(&contour->Point(p).x);
gluTessVertex( tobj, d, d);
}