X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fglyphpoints.cpp;h=0fc62f3cd40af42b8bf2603bc8d5aad7330e2bb2;hb=7169af5d07be6e496cef0ac88d0e13647041d198;hp=d7ce0d5b19d082d629c28aa9f8458142830402e2;hpb=a4763354603a2f8fbaff27a17edab7710ead6c2b;p=ttedit diff --git a/src/glyphpoints.cpp b/src/glyphpoints.cpp index d7ce0d5..0fc62f3 100755 --- a/src/glyphpoints.cpp +++ b/src/glyphpoints.cpp @@ -368,6 +368,11 @@ WriteLogMsg("Exception: GetX(uint16, uint16). poly= %u, pt=%u, numPoints=%u\xD\x return x[pt + (poly == 0 ? 0 : polyEnd[poly - 1] + 1)]; } +int GlyphPoints::GetNextX(uint16 poly, uint16 pt) +{ + return GetX(poly, GetNext(poly, pt)); +} + int GlyphPoints::GetY(uint16 poly, uint16 pt) { if (pt >= GetNumPoints(poly)) @@ -383,6 +388,16 @@ WriteLogMsg("Exception: GetY(uint16, uint16). poly= %u, pt=%u, numPoints=%u\xD\x return y[pt + (poly == 0 ? 0 : polyEnd[poly - 1] + 1)]; } +int GlyphPoints::GetNextY(uint16 poly, uint16 pt) +{ + return GetY(poly, GetNext(poly, pt)); +} + +IPoint GlyphPoints::GetPoint(uint16 poly, uint16 pt) +{ + return IPoint(GetX(poly, pt), GetY(poly, pt)); +} + bool GlyphPoints::GetOnCurve(uint16 poly, uint16 pt) { if (pt >= GetNumPoints(poly)) @@ -398,6 +413,16 @@ WriteLogMsg("Exception: GetOnCurve(uint16, uint16). poly= %u, pt=%u, numPoints=% return onCurve[pt + (poly == 0 ? 0 : polyEnd[poly - 1] + 1)]; } +bool GlyphPoints::GetPrevOnCurve(uint16 poly, uint16 pt) +{ + return GetOnCurve(poly, GetPrev(poly, pt)); +} + +bool GlyphPoints::GetNextOnCurve(uint16 poly, uint16 pt) +{ + return GetOnCurve(poly, GetNext(poly, pt)); +} + uint16 GlyphPoints::GetPolyEnd(uint16 poly) { if (poly >= numPolys)