+uint16 GlyphPoints::GetPolyForPoint(IPoint point)
+{
+ uint16 poly = 0;
+
+ for(uint16 i=0; i<numPoints; i++)
+ {
+ if (i > polyEnd[poly])
+ poly++;
+
+ if (IPoint(x[i], y[i]) == point)
+ return poly;
+ }
+
+ return 0xFFFF;
+}
+
+
+uint16 GlyphPoints::GetPolyForPointNumber(uint16 pointNumber)
+{
+ // If there's only one poly, we know where the point is...
+ if (numPolys <= 1)
+ return 0;
+
+ // Otherwise, do a linear search through the polys to find the right one
+ for(uint16 i=0; i<numPolys; i++)
+ {
+ if (pointNumber >= GetPolyStart(i) && pointNumber <= polyEnd[i])
+ return i;
+ }
+
+ return 0xFFFF;
+}
+
+