X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=pdf2swf%2Fspline.h;h=609a7bd3481c9c6e1eb29111f64aba9dccec065e;hp=f9549cc64ed61af701bdc9f0f402a1dc6f6cc456;hb=235732a3db9cfe3ac8228969ee1ad58410eab843;hpb=baad9b2b637cabbc94f94d2140656d8c84261e1c diff --git a/pdf2swf/spline.h b/pdf2swf/spline.h index f9549cc..609a7bd 100644 --- a/pdf2swf/spline.h +++ b/pdf2swf/spline.h @@ -30,7 +30,24 @@ struct cspline struct plotxy end; }; -int approximate(struct plotxy p0, struct plotxy p1, - struct plotxy p2, struct plotxy p3, struct qspline*q); +typedef enum {APPROXIMATE_INFLECTION=0, APPROXIMATE_RECURSIVE_BINARY=1} approximate_method; + +int approximate(struct plotxy p0, struct plotxy p1, struct plotxy p2, struct plotxy p3, struct qspline*q); + +struct plotxy splinepos(struct plotxy p0, struct plotxy p1, struct plotxy p2, struct plotxy p3, double d); +double plotxy_dist(struct plotxy a, struct plotxy b); + +plotxy cspline_getpoint(cspline*s, double t); +plotxy cspline_getderivative(cspline*s, double t); +plotxy cspline_getderivative2(cspline*s, double t); +plotxy cspline_getderivative3(cspline*s, double t); +void cspline_getequalspacedpoints(cspline*s, float**p, int*num, double dist); +int cspline_approximate(struct cspline*s, struct qspline*q, double quality, approximate_method method); + +plotxy qspline_getpoint(qspline*s, double t); +plotxy qspline_getderivative(qspline*s, double t); +plotxy qspline_getderivative2(qspline*s, double t); +double qspline_getlength(qspline*s); +void qsplines_getequalspacedpoints(qspline**s, int num, float**p, int*pnum, double t); #endif// __spline_h__