#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <memory.h>
#include <math.h>
#include "drawer.h"
to.y = atoi(getToken(&p));
draw->splineTo(draw, &mid, &to);
}
+ else if(!strncmp(token, "conicTo", 5)) {
+ FPOINT mid,to;
+ mid.x = atoi(getToken(&p));
+ mid.y = atoi(getToken(&p));
+ to.x = atoi(getToken(&p));
+ to.y = atoi(getToken(&p));
+ draw_conicTo(draw, &mid, &to);
+ }
else if(!strncmp(token, "cubicTo", 5)) {
FPOINT mid1,mid2,to;
mid1.x = atoi(getToken(&p));
struct cspline c;
double quality = 80;
double maxerror = (500-(quality*5)>1?500-(quality*5):1)/20.0;
-
- int num = approximate3(&c, q, 128, maxerror*maxerror);
- int t;
+ int t,num;
c.start.x = draw->pos.x;
c.start.y = draw->pos.y;
c.control2.y = control2->y;
c.end.x = to->x;
c.end.y = to->y;
+
+ num = approximate3(&c, q, 128, maxerror*maxerror);
for(t=0;t<num;t++) {
FPOINT mid;