comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:cd92449fdb51
1 %!PS-Adobe-3.0 Resource-ProcSet
2 %%LanguageLevel: 2
3 %%BeginResource: procset (uschem-print procedures) 1.0 0
4 40 dict begin
5 /setscale {
6 /xscale printsize_x printmargin 2 mul sub drawingsize_x div def
7 /yscale printsize_y printmargin 2 mul sub drawingsize_y div def
8 xscale yscale ge {
9 printsize_x drawingsize_x yscale mul sub 2 div
10 printmargin translate
11 yscale dup scale
12 } {
13 printsize_y drawingsize_y xscale mul sub 2 div
14 printmargin exch translate
15 xscale dup scale
16 } ifelse
17 } bind def
18 % text stuff
19 /ptsize {
20 textscalefactor mul
21 } bind def
22 /settextfudge {
23 1000 72 div mul
24 /textscalefactor exch def
25 } bind def
26 /selfnt {
27 ptsize selectfont
28 } bind def
29 /selisofnt {
30 exch transfont exch ptsize scalefont setfont
31 } bind def
32 3 dict begin
33 /left 0 def
34 /ctr {
35 1 index stringwidth pop
36 2 div neg
37 } bind def
38 /right {
39 1 index stringwidth pop neg
40 } bind def
41 currentdict end
42 /Tshow_halign exch def
43 3 dict begin
44 /bottom 0 def
45 /ctr {
46 0 0 moveto
47 1 index true charpath flattenpath pathbbox newpath
48 4 1 roll pop pop pop
49 2 div neg
50 } bind def
51 /top {
52 0 0 moveto
53 1 index true charpath flattenpath pathbbox newpath
54 4 1 roll pop pop pop
55 neg
56 } bind def
57 currentdict end
58 /Tshow_valign exch def
59 /Tshow { % string halign valign rot x y
60 gsave translate rotate
61 exch //Tshow_halign exch get exec
62 exch //Tshow_valign exch get exec
63 moveto show
64 grestore
65 } bind def
66 % simple graphic utilities
67 /circlefill {
68 newpath 0 360 arc closepath fill
69 } bind def
70 /circlestroke {
71 newpath 0 360 arc closepath stroke
72 } bind def
73 /setsolid {
74 {} 0 setdash
75 } bind def
76 % for symbols
77 /mirror {
78 mirrored {neg} if
79 } bind def
80 /mirrortext_table <<
81 /left /right
82 /ctr /ctr
83 /right /left
84 >> def
85 /mirrortext {
86 mirrored {//mirrortext_table exch get} if
87 } bind def
88 /mirrorangle {
89 dup sin exch cos neg atan
90 } bind def
91 /mirrorarc {
92 mirrored {mirrorangle exch mirrorangle} if
93 } bind def
94 /drawpin {
95 gsave newpath
96 moveto lineto
97 pinthickness setlinewidth 0 setlinecap setsolid
98 stroke grestore
99 } bind def
100 % schematic stuff
101 /conndot {
102 conndotradius circlefill
103 } bind def
104 currentdict end
105 /$uschem exch def
106 %%EndResource