]> Shamusworld >> Repos - ttedit/blobdiff - src/glyphpoints.h
Added individual polygon rotation tool.
[ttedit] / src / glyphpoints.h
index 09b422cde5967b107901e686e68c8d4dc0845060..fc0dd2b40fd17d1d56909c8c39bff35c79aba19e 100755 (executable)
@@ -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);