/[groff]/groff/src/devices/grolbp/lbp.h
ViewVC logotype

Diff of /groff/src/devices/grolbp/lbp.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by wl, Thu May 26 21:01:59 2005 UTC revision 1.13 by wl, Sat May 28 07:10:16 2005 UTC
# Line 324  vdmpolyline(int numpoints, int *points) Line 324  vdmpolyline(int numpoints, int *points)
324    for (i = 1; i < numpoints ; i++) {    for (i = 1; i < numpoints ; i++) {
325            vdmprintf("%s%s",vdmnum(*p,xcoord),vdmnum(*(p+1),ycoord));            vdmprintf("%s%s",vdmnum(*p,xcoord),vdmnum(*(p+1),ycoord));
326            p += 2;            p += 2;
327    }; /* for */    } /* for */
328    vdmprintf("\x1e\n");    vdmprintf("\x1e\n");
329  }  }
330                    
# Line 341  vdmpolygon(int numpoints, int *points) Line 341  vdmpolygon(int numpoints, int *points)
341    for (i = 1; i < numpoints ; i++) {    for (i = 1; i < numpoints ; i++) {
342            vdmprintf("%s%s",vdmnum(*p,xcoord),vdmnum(*(p+1),ycoord));            vdmprintf("%s%s",vdmnum(*p,xcoord),vdmnum(*(p+1),ycoord));
343            p += 2;            p += 2;
344    }; /* for */    } /* for */
345    vdmprintf("\x1e\n");    vdmprintf("\x1e\n");
346    
347  }  }
# Line 384  splinerel(double px,double py,int flush) Line 384  splinerel(double px,double py,int flush)
384    char xcoord[4],ycoord[4];    char xcoord[4],ycoord[4];
385    double npend ;    double npend ;
386    
387    if (flush == -1) {lx = (int)px; ly = (int)py; return;};    if (flush == -1) {lx = (int)px; ly = (int)py; return;}
388    
389    if (flush == 0) {    if (flush == 0) {
390    dxnew = (int)px -lx;    dxnew = (int)px -lx;
# Line 396  splinerel(double px,double py,int flush) Line 396  splinerel(double px,double py,int flush)
396            despx = dxnew;            despx = dxnew;
397            if ((sg == sigpend) && (dy == 0)){            if ((sg == sigpend) && (dy == 0)){
398                    return;                    return;
399            };            }
400          dy = 0;          dy = 0;
401    }    }
402    else {    else {
# Line 407  splinerel(double px,double py,int flush) Line 407  splinerel(double px,double py,int flush)
407          else          else
408          { sigpend = sg;          { sigpend = sg;
409          pend = npend;          pend = npend;
410          }; /* else (( npend == pend) && ... */          } /* else (( npend == pend) && ... */
411    }; /* else (if (dynew == 0)) */    } /* else (if (dynew == 0)) */
412    }; /* if (!flush ) */    } /* if (!flush ) */
413    
414    /* if we've changed direction we must draw the line */    /* if we've changed direction we must draw the line */
415  /*  fprintf(stderr," (%d) %.2f,%.2f\n",flush,(float)px,(float)py);*/  /*  fprintf(stderr," (%d) %.2f,%.2f\n",flush,(float)px,(float)py);*/
# Line 420  splinerel(double px,double py,int flush) Line 420  splinerel(double px,double py,int flush)
420    if (flush) {    if (flush) {
421          dxnew = dy = despx = despy = 0;          dxnew = dy = despx = despy = 0;
422          return;          return;
423    }; /* if (flush) */    } /* if (flush) */
424    dxnew -= despx;    dxnew -= despx;
425    dynew -= despy;    dynew -= despy;
426    if ((dxnew != 0) || (dynew != 0)) vdmprintf("%s%s",vdmnum(dxnew,xcoord),\    if ((dxnew != 0) || (dynew != 0)) vdmprintf("%s%s",vdmnum(dxnew,xcoord),\
# Line 467  quadratic_spline(double a_1, double b_1, Line 467  quadratic_spline(double a_1, double b_1,
467              quadratic_spline(x_mid, y_mid,              quadratic_spline(x_mid, y_mid,
468                               ((a_2+3.0*a_3)/4.0), ((b_2+3.0*b_3)/4.0),                               ((a_2+3.0*a_3)/4.0), ((b_2+3.0*b_3)/4.0),
469                               ((a_3+x_4)/2.0), ((b_3+y_4)/2.0), x_4, y_4);                               ((a_3+x_4)/2.0), ((b_3+y_4)/2.0), x_4, y_4);
470          };          }
471  }  }
472    
473    

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26