]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Mirror 1.1.x changes.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 21 Mar 2003 02:45:04 +0000 (02:45 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 21 Mar 2003 02:45:04 +0000 (02:45 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/branches/branch-1.2@3506 7a7537e8-13f0-0310-91df-b6672ffda945

CHANGES-1.1.txt
filter/hpgl-main.c
filter/hpgl-polygon.c
filter/hpgl-vector.c

index 5a8022e223d365a20110326a86d7752146e44b7d..8ed26a8e7e4b2819f9bb780267421edcb78a70fb 100644 (file)
@@ -3,6 +3,7 @@ CHANGES-1.1.txt
 
 CHANGES IN CUPS V1.1.19
 
+       - Fixed a polygon drawing bug in the HP-GL/2 filter.
        - Added a robots.txt file to the standard install to
          prevent search engines from indexing the CUPS server.
        - Added support for STATE: messages
index 972a5b8448d1e6f2c5d61a5b4f30350c239a8299..05953a5c2d4560c35e3e2db743bc1b042385443f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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).
  *
@@ -144,6 +144,7 @@ main(int  argc,             /* I - Number of command-line arguments */
   * Make sure status messages are not buffered...
   */
 
+  setbuf(stdout, NULL);
   setbuf(stderr, NULL);
 
  /*
@@ -263,5 +264,5 @@ compare_names(const void *p1,       /* I - First name */
 
 
 /*
- * 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 $".
  */
index c58f9ef392c75f174cf40ae600fbed10a2eccb7c..b6a3817232af92fab27512eeb51e988b86a7f529 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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).
  *
@@ -227,7 +227,7 @@ PM_polygon_mode(int     num_params, /* I - Number of parameters */
       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)
@@ -378,5 +378,5 @@ WG_fill_wedge(int     num_params,   /* I - Number of parameters */
 
 
 /*
- * 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 $".
  */
index ac81cb8e27cb6dac557f623466f9a4400139dbea..40e9f501d1a8e10409dd8f17328a7ee8366c4cbd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$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).
  *
@@ -456,8 +456,12 @@ PE_polyline_encoded(int     num_params,    /* I - Number of parameters */
            }
 
             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;
@@ -687,9 +691,10 @@ plot_points(int     num_params,    /* I - Number of parameters */
   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)
@@ -714,7 +719,13 @@ plot_points(int     num_params,    /* I - Number of parameters */
     }
 
     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;
@@ -729,5 +740,5 @@ plot_points(int     num_params,     /* I - Number of parameters */
 
 
 /*
- * 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 $".
  */