diff ueda/uschem-print/uschem-procset.ps @ 0:cd92449fdb51

initial import of ueda and ifctf-part-lib from ifctfvax CVS
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 20 Jul 2015 00:24:37 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ueda/uschem-print/uschem-procset.ps	Mon Jul 20 00:24:37 2015 +0000
@@ -0,0 +1,106 @@
+%!PS-Adobe-3.0 Resource-ProcSet
+%%LanguageLevel: 2
+%%BeginResource: procset (uschem-print procedures) 1.0 0
+40 dict begin
+/setscale {
+	/xscale printsize_x printmargin 2 mul sub drawingsize_x div def
+	/yscale printsize_y printmargin 2 mul sub drawingsize_y div def
+	xscale yscale ge {
+		printsize_x drawingsize_x yscale mul sub 2 div
+		printmargin translate
+		yscale dup scale
+	} {
+		printsize_y drawingsize_y xscale mul sub 2 div
+		printmargin exch translate
+		xscale dup scale
+	} ifelse
+} bind def
+% text stuff
+/ptsize {
+	textscalefactor mul
+} bind def
+/settextfudge {
+	1000 72 div mul
+	/textscalefactor exch def
+} bind def
+/selfnt {
+	ptsize selectfont
+} bind def
+/selisofnt {
+	exch transfont exch ptsize scalefont setfont
+} bind def
+3 dict begin
+	/left 0 def
+	/ctr {
+		1 index stringwidth pop
+		2 div neg
+	} bind def
+	/right {
+		1 index stringwidth pop neg
+	} bind def
+currentdict end
+/Tshow_halign exch def
+3 dict begin
+	/bottom 0 def
+	/ctr {
+		0 0 moveto
+		1 index true charpath flattenpath pathbbox newpath
+		4 1 roll pop pop pop
+		2 div neg
+	} bind def
+	/top {
+		0 0 moveto
+		1 index true charpath flattenpath pathbbox newpath
+		4 1 roll pop pop pop
+		neg
+	} bind def
+currentdict end
+/Tshow_valign exch def
+/Tshow {	% string halign valign rot x y
+	gsave translate rotate
+	exch //Tshow_halign exch get exec
+	exch //Tshow_valign exch get exec
+	moveto show
+	grestore
+} bind def
+% simple graphic utilities
+/circlefill {
+	newpath 0 360 arc closepath fill
+} bind def
+/circlestroke {
+	newpath 0 360 arc closepath stroke
+} bind def
+/setsolid {
+	{} 0 setdash
+} bind def
+% for symbols
+/mirror {
+	mirrored {neg} if
+} bind def
+/mirrortext_table <<
+	/left /right
+	/ctr /ctr
+	/right /left
+>> def
+/mirrortext {
+	mirrored {//mirrortext_table exch get} if
+} bind def
+/mirrorangle {
+	dup sin exch cos neg atan
+} bind def
+/mirrorarc {
+	mirrored {mirrorangle exch mirrorangle} if
+} bind def
+/drawpin {
+	gsave newpath
+	moveto lineto
+	pinthickness setlinewidth 0 setlinecap setsolid
+	stroke grestore
+} bind def
+% schematic stuff
+/conndot {
+	conndotradius circlefill
+} bind def
+currentdict end
+/$uschem exch def
+%%EndResource