r5287 - trunk/gta02-core/scripts

werner at docs.openmoko.org werner at docs.openmoko.org
Sat Jul 4 15:59:14 CEST 2009


Author: werner
Date: 2009-07-04 15:59:13 +0200 (Sat, 04 Jul 2009)
New Revision: 5287

Modified:
   trunk/gta02-core/scripts/all-sheets
Log:
Added x offset to Postscript generated by all-sheets, so that we have less
(or no) clipping.



Modified: trunk/gta02-core/scripts/all-sheets
===================================================================
--- trunk/gta02-core/scripts/all-sheets	2009-07-03 16:10:20 UTC (rev 5286)
+++ trunk/gta02-core/scripts/all-sheets	2009-07-04 13:59:13 UTC (rev 5287)
@@ -3,15 +3,35 @@
 ps=true
 pdf=false
 shrink=false
-cmd=cat
+cmd=shift_only
 
+
+shift_only()
+{
+    # With the default settings, the right edge of the schematics gets cut off
+    # on the screen and in printouts.
+    # With -25, we get perfect on-screen display and almost no clipping on A4
+    # printouts either.
+    # This can be overridden locally by setting the environment variable
+    # KICAD_PS_XSHIFT.
+
+    pstops "0(0,${KICAD_PS_XSHIFT:--25})" "$@"
+}
+
+
+resize_and_shift()
+{
+    psresize -Pa3 -pa4 "$@" | shift_only
+}
+
+
 while [ "${1#-}" != "$1" ]; do
     case "$1" in
     --pdf)
 	ps=false
 	pdf=true;;
     --shrink)
-	cmd="psresize -Pa3 -pa4"
+	cmd=resize_and_shift
 	shrink=true;;
     esac
     shift




More information about the commitlog mailing list