- char d = dict_del2(start,pos,l);
- assert(d);
- }
- while(l) {
- if(l->type == gfx_moveTo && (x!=l->x || y!=l->y || first)) {
- first = 0;
- PDF_moveto(p, l->x, l->y);
- } else if(l->type == gfx_lineTo) {
- PDF_lineto(p, l->x, l->y);
- ret = 1;
- } else {
- /* when converting a quadratic bezier to a cubic bezier, the
- two new control points are both 2/3 the way from the
- endpoints to the old control point */
- double c1x = (x + l->sx*2)/3;
- double c1y = (y + l->sy*2)/3;
- double c2x = (l->x + l->sx*2)/3;
- double c2y = (l->y + l->sy*2)/3;
- PDF_curveto(p, c1x, c1y, c2x, c2y, l->x, l->y);
- ret = 1;
- }
- x = l->x;
- y = l->y;
- pos[0] = x;
- pos[1] = y;
- l = l->next;
- if(l && l->type == gfx_moveTo)
- break;
+ /* when converting a quadratic bezier to a cubic bezier, the
+ two new control points are both 2/3 the way from the
+ endpoints to the old control point */
+ double c1x = (x + line->sx*2)/3;
+ double c1y = (y + line->sy*2)/3;
+ double c2x = (line->x + line->sx*2)/3;
+ double c2y = (line->y + line->sy*2)/3;
+ PDF_curveto(p, c1x, c1y, c2x, c2y, line->x, line->y);
+ ret = 1;