SCCS-vsn: local/ditroff/ditroff.old.okeeffe/driver/graph.c 1.8
*
* This file contains the functions for producing the graphics
* images in the varian/versatec drivers for ditroff.
*
* This file contains the functions for producing the graphics
* images in the varian/versatec drivers for ditroff.
extern int hpos;
extern int vpos;
extern int hpos;
extern int vpos;
extern vgoto();
extern point();
extern vgoto();
extern point();
register int dh;
register int dv;
{
register int dh;
register int dv;
{
- HGtline (hpos, vpos, hpos + dh, vpos + dv);
+ if (output) HGtline (hpos, vpos, hpos + dh, vpos + dv);
hmot (dh); /* new position is at */
vmot (dv); /* the end of the line */
}
hmot (dh); /* new position is at */
vmot (dv); /* the end of the line */
}
drawcirc(d)
register int d;
{ /* 0.0 is the angle to sweep the arc: = full circle */
drawcirc(d)
register int d;
{ /* 0.0 is the angle to sweep the arc: = full circle */
- HGArc (hpos + d/2, vpos, hpos, vpos, 0.0);
+ if (output) HGArc (hpos + d/2, vpos, hpos, vpos, 0.0);
hmot (d); /* new postion is the right of the circle */
}
hmot (d); /* new postion is the right of the circle */
}
hmot (hd); /* end position is the right-hand side of the ellipse */
hmot (hd); /* end position is the right-hand side of the ellipse */
yk = (int) (k1 * sqrt((double) (k2 + (bx -= 8) * (x += 2))));
HGtline (x-2, oldy1, x, y = vpos + yk); /* top half of ellipse */
yk = (int) (k1 * sqrt((double) (k2 + (bx -= 8) * (x += 2))));
HGtline (x-2, oldy1, x, y = vpos + yk); /* top half of ellipse */
/* "normalize" and round */
angle += (angle < 0.0) ? 360.5 : 0.5;
/* "normalize" and round */
angle += (angle < 0.0) ? 360.5 : 0.5;
- HGArc(hpos + cdh, vpos + cdv, hpos, vpos, (int) angle);
+ if (output) HGArc(hpos + cdh, vpos + cdv, hpos, vpos, (int) angle);
hmot(cdh + pdh);
vmot(cdv + pdv);
}
hmot(cdh + pdh);
vmot(cdv + pdv);
}
}
npts--; /* npts must point to the last coordinate in x and y */
/* now, actually DO the curve */
}
npts--; /* npts must point to the last coordinate in x and y */
/* now, actually DO the curve */
- if (pic)
- picurve(x, y, npts);
- else
- HGCurve(x, y, npts);
+ if (output) {
+ if (pic)
+ picurve(x, y, npts);
+ else
+ HGCurve(x, y, npts);
+ }