X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fglyphpoints.h;h=09b422cde5967b107901e686e68c8d4dc0845060;hb=3e731f52cfd35364e9516d09d00b61dd6fdc1919;hp=73195e42d4240c3f048fd9428a4bb27388f1e5a4;hpb=a4763354603a2f8fbaff27a17edab7710ead6c2b;p=ttedit diff --git a/src/glyphpoints.h b/src/glyphpoints.h index 73195e4..09b422c 100755 --- a/src/glyphpoints.h +++ b/src/glyphpoints.h @@ -11,8 +11,10 @@ #define __GLYPHPOINTS_H__ #include "types.h" +#include +// "IPoint" is an Integer based Point struct IPoint { int32 x, y; @@ -46,18 +48,25 @@ class GlyphPoints GlyphPoints operator+(const GlyphPoints &); GlyphPoints operator+(const IPoint &); GlyphPoints& operator+=(const IPoint &); + void Clear(void); void InsertPoint(uint16, int, int, bool); void InsertPoint(uint16, const IPoint &); void DeletePoint(uint16); uint16 GetNumPoints(void); - uint16 GetNumPoints(uint16); + uint16 GetNumPoints(uint16 poly); uint16 GetNumPolys(void); int GetX(uint16); int GetY(uint16); bool GetOnCurve(uint16); int GetX(uint16, uint16); + int GetNextX(uint16, uint16); int GetY(uint16, uint16); + int GetNextY(uint16, uint16); + IPoint GetPoint(uint16, uint16); bool GetOnCurve(uint16, uint16); + bool GetPrevOnCurve(uint16, uint16); + bool GetNextOnCurve(uint16, uint16); + uint16 GetPolyStart(uint16); uint16 GetPolyEnd(uint16); void OffsetPoints(int, int); void OffsetPoly(uint16, int32, int32); @@ -75,8 +84,17 @@ class GlyphPoints IPoint GetPrevPoint(uint16, uint16); IPoint GetNextPoint(uint16, uint16); + IPoint RotatePoint(const double angle, const IPoint point, const IPoint center); + void RotatePoints(const double angle, const IPoint point); + IPoint GetPolyCentroid(const int16 poly); + void RotatePolyAroundCentroid(const int16 poly, const double angle); + + bool LoadGlyphFromFile(FILE *); + bool SaveGlyphToFile(FILE *); + private: void AllocateAndCopy(int, int, int *, int *, bool *, uint16 *); + void FreeAllocatedMemory(void); private: int numPoints, numPolys;