X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fglyphpoints.h;h=fc0dd2b40fd17d1d56909c8c39bff35c79aba19e;hb=360d040a4727383cc8e78d0b8a3c8151c27d26fc;hp=09b422cde5967b107901e686e68c8d4dc0845060;hpb=76edad3351932d31766083dd7a4e75e69d7b5671;p=ttedit diff --git a/src/glyphpoints.h b/src/glyphpoints.h index 09b422c..fc0dd2b 100755 --- a/src/glyphpoints.h +++ b/src/glyphpoints.h @@ -21,6 +21,7 @@ struct IPoint bool onCurve; IPoint(int32 xx=0, int32 yy=0, bool oc=true): x(xx), y(yy), onCurve(oc) {} + bool operator==(const IPoint & p) { return (p.x == x && p.y == y ? true: false); }; }; // Throws the following exceptions: @@ -63,6 +64,7 @@ class GlyphPoints int GetY(uint16, uint16); int GetNextY(uint16, uint16); IPoint GetPoint(uint16, uint16); + IPoint GetPoint(uint16); bool GetOnCurve(uint16, uint16); bool GetPrevOnCurve(uint16, uint16); bool GetNextOnCurve(uint16, uint16); @@ -83,6 +85,8 @@ class GlyphPoints IPoint GetMidpointToNext(uint16, uint16); IPoint GetPrevPoint(uint16, uint16); IPoint GetNextPoint(uint16, uint16); + uint16 GetPolyForPoint(IPoint point); + uint16 GetPolyForPointNumber(uint16 pointNumber); IPoint RotatePoint(const double angle, const IPoint point, const IPoint center); void RotatePoints(const double angle, const IPoint point);