[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (a04f34e9532979b00a141e7adebdc6ae073e4831)
The branch, master has been updated
via a04f34e9532979b00a141e7adebdc6ae073e4831 (commit)
from b1626728f9d65f16208cde500fd76046169869df (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/lpr/lpr.c | 1 -
src/hid/ps/ps.c | 21 ++++++++++++++++++---
2 files changed, 18 insertions(+), 4 deletions(-)
=================
Commit Messages
=================
commit a04f34e9532979b00a141e7adebdc6ae073e4831
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
Fix postscript page scaling
Calculate page sizes *after* selecting the page, not before.
:100644 100644 ac3e2db... a79af0a... M src/hid/lpr/lpr.c
:100644 100644 814e23e... eacf826... M src/hid/ps/ps.c
=========
Changes
=========
commit a04f34e9532979b00a141e7adebdc6ae073e4831
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
Fix postscript page scaling
Calculate page sizes *after* selecting the page, not before.
diff --git a/src/hid/lpr/lpr.c b/src/hid/lpr/lpr.c
index ac3e2db..a79af0a 100644
--- a/src/hid/lpr/lpr.c
+++ b/src/hid/lpr/lpr.c
@@ -92,7 +92,6 @@ lpr_do_export (HID_Attr_Val * options)
return;
}
- ps_start_file (f);
ps_hid_export_to_file (f, options);
fclose (f);
diff --git a/src/hid/ps/ps.c b/src/hid/ps/ps.c
index 814e23e..eacf826 100644
--- a/src/hid/ps/ps.c
+++ b/src/hid/ps/ps.c
@@ -339,6 +339,21 @@ ps_start_file (FILE *f)
*/
fprintf (f, "%%%%Pages: (atend)\n" );
+ /*
+ * %%DocumentMedia: <name> <width> <height> <weight> <color> <type>
+ *
+ * Substitute 0 or "" for N/A. Width and height are in points
+ * (1/72").
+ *
+ * Media sizes are in PCB units
+ */
+ fprintf (f, "%%%%DocumentMedia: %s %g %g 0 \"\" \"\"\n",
+ media_data[media].name,
+ media_data[media].Width * 72.0 / 100000.0,
+ media_data[media].Height * 72.0 / 100000.0);
+ fprintf (f, "%%%%DocumentPaperSizes: %s\n",
+ media_data[media].name);
+
/* End General Header Comments. */
/* General Body Comments go here. Currently there are none. */
@@ -446,6 +461,9 @@ ps_hid_export_to_file (FILE * the_file, HID_Attr_Val * options)
drillcopper = options[HA_drillcopper].int_value;
legend = options[HA_legend].int_value;
+ if (f)
+ ps_start_file (f);
+
if (fade_ratio < 0)
fade_ratio = 0;
if (fade_ratio > 1)
@@ -488,7 +506,6 @@ ps_hid_export_to_file (FILE * the_file, HID_Attr_Val * options)
if (strcmp (layer->Name, "outline") == 0 ||
strcmp (layer->Name, "route") == 0)
{
- printf("see outline layer\n");
outline_layer = layer;
}
}
@@ -568,7 +585,6 @@ ps_do_export (HID_Attr_Val * options)
perror (filename);
return;
}
- ps_start_file (f);
}
hid_save_and_show_layer_ons (save_ons);
@@ -850,7 +866,6 @@ ps_set_layer (const char *name, int group, int empty)
&& strcmp (name, "outline")
&& strcmp (name, "route"))
{
- printf("attempting to draw outlines on %s\n", name);
DrawLayer (outline_layer, ®ion);
}
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs