fix ps dashing
authorellson <devnull@localhost>
Thu, 15 Jun 2006 00:01:39 +0000 (00:01 +0000)
committerellson <devnull@localhost>
Thu, 15 Jun 2006 00:01:39 +0000 (00:01 +0000)
lib/common/ps.h
lib/common/ps.txt
lib/common/psgen.c
plugin/core/gvrender_core_ps.c

index dc1db3a40283d6ce925fc011f82c58fdecea9a95..c0165bd5da496579826c1c63c27453dd5b5eec3b 100644 (file)
@@ -39,6 +39,12 @@ char *ps_txt[] = {
 "/default-font-family /Times-Roman def",
 "/coordfont coord-font-family findfont 8 scalefont def",
 "",
+"/InvScaleFactor 1.0 def",
+"/set_scale {",
+"       exch dup 1 exch div /InvScaleFactor exch def",
+"       exch scale",
+"} bind def",
+"",
 "% styles",
 "/solid { [] 0 setdash } bind def",
 "/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def",
index 168c3852d7033edb4cb8b5bbc25a461225b9d070..755e0513271b8dcdf7559f1e9826cbb99c11a09b 100644 (file)
@@ -38,6 +38,12 @@ cleartomark
 /default-font-family /Times-Roman def
 /coordfont coord-font-family findfont 8 scalefont def
 
+/InvScaleFactor 1.0 def
+/set_scale {
+       exch dup 1 exch div /InvScaleFactor exch def
+       exch scale
+} bind def
+
 % styles
 /solid { [] 0 setdash } bind def
 /dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
index dd25e254c6c3656be69fd2c920992c65a745e824..55c1b9c3f3d03c872ac64fa58c3ceec62f1ff000 100644 (file)
@@ -192,7 +192,7 @@ ps_begin_page(graph_t * g, point page, double scale, int rot, point offset)
     fprintf(Output_file, "%d %d %d beginpage\n", page.x, page.y, N_pages);
     if (rot)
         fprintf(Output_file, "grestore\n");
-    fprintf(Output_file, "%g %g scale\n", scale, scale);
+    fprintf(Output_file, "%g %g set_scale\n", scale, scale);
     fprintf(Output_file, "%d %d translate %d rotate\n",
            offset.x, offset.y, rot);
     assert(SP == 0);
index 18afc75557266ba00c8f15b35c6cf55f0770c495..8169a46c4810945df1f881da4dc6e223d83382d1 100644 (file)
@@ -138,7 +138,7 @@ static void psgen_begin_page(GVJ_t * job)
     if (job->common->show_boxes == NULL)
         fprintf(job->output_file, "gsave\n%d %d %d %d boxprim clip newpath\n",
            pbr.LL.x, pbr.LL.y, pbr.UR.x, pbr.UR.y);
-    fprintf(job->output_file, "gsave %g %g scale %d rotate %g %g translate\n",
+    fprintf(job->output_file, "gsave %g %g set_scale %d rotate %g %g translate\n",
                job->scale.x, job->scale.y,
                job->rotation,
                job->translation.x, job->translation.y);