/*
- * "$Id: hpgl-main.c,v 1.22.2.3 2003/01/07 18:26:52 mike Exp $"
+ * "$Id: hpgl-main.c,v 1.22.2.4 2003/03/21 02:45:03 mike Exp $"
*
* HP-GL/2 filter main entry for the Common UNIX Printing System (CUPS).
*
* Make sure status messages are not buffered...
*/
+ setbuf(stdout, NULL);
setbuf(stderr, NULL);
/*
/*
- * End of "$Id: hpgl-main.c,v 1.22.2.3 2003/01/07 18:26:52 mike Exp $".
+ * End of "$Id: hpgl-main.c,v 1.22.2.4 2003/03/21 02:45:03 mike Exp $".
*/
/*
- * "$Id: hpgl-polygon.c,v 1.9.2.3 2003/01/07 18:26:52 mike Exp $"
+ * "$Id: hpgl-polygon.c,v 1.9.2.4 2003/03/21 02:45:04 mike Exp $"
*
* HP-GL/2 polygon routines for the Common UNIX Printing System (CUPS).
*
params[0].value.number == 0)
{
Outputf("MP\n");
- Outputf("%.3f %.3f MO\n", PenPosition[0], PenPosition[1]);
+/* Outputf("%.3f %.3f MO\n", PenPosition[0], PenPosition[1]);*/
PolygonMode = 1;
}
else if (params[0].value.number == 2)
/*
- * End of "$Id: hpgl-polygon.c,v 1.9.2.3 2003/01/07 18:26:52 mike Exp $".
+ * End of "$Id: hpgl-polygon.c,v 1.9.2.4 2003/03/21 02:45:04 mike Exp $".
*/
/*
- * "$Id: hpgl-vector.c,v 1.14.2.3 2003/01/07 18:26:52 mike Exp $"
+ * "$Id: hpgl-vector.c,v 1.14.2.4 2003/03/21 02:45:04 mike Exp $"
*
* HP-GL/2 vector routines for the Common UNIX Printing System (CUPS).
*
}
if (draw)
- Outputf("%.3f %.3f LI\n", tx, ty);
- else
+ {
+ if (fabs(PenPosition[0] - tx) > 0.001 ||
+ fabs(PenPosition[1] - ty) > 0.001)
+ Outputf("%.3f %.3f LI\n", tx, ty);
+ }
+ else
Outputf("%.3f %.3f MO\n", tx, ty);
PenPosition[0] = (float)tx;
if (PenDown)
{
if (!PolygonMode)
+ {
Outputf("MP\n");
-
- Outputf("%.3f %.3f MO\n", PenPosition[0], PenPosition[1]);
+ Outputf("%.3f %.3f MO\n", PenPosition[0], PenPosition[1]);
+ }
}
for (i = 0; i < num_params; i += 2)
}
if (PenDown)
- Outputf("%.3f %.3f LI\n", x, y);
+ {
+ if (PolygonMode && i == 0)
+ Outputf("%.3f %.3f MO\n", x, y);
+ else if (fabs(PenPosition[0] - x) > 0.001 ||
+ fabs(PenPosition[1] - y) > 0.001)
+ Outputf("%.3f %.3f LI\n", x, y);
+ }
PenPosition[0] = x;
PenPosition[1] = y;
/*
- * End of "$Id: hpgl-vector.c,v 1.14.2.3 2003/01/07 18:26:52 mike Exp $".
+ * End of "$Id: hpgl-vector.c,v 1.14.2.4 2003/03/21 02:45:04 mike Exp $".
*/