Graphviz 12.0.1~dev.20240716.0800
Loading...
Searching...
No Matches
ps.h
Go to the documentation of this file.
1#pragma once
2
3#include <stddef.h>
4
5static const char *ps_txt[] = {
6 // clang-format off
7 "%%BeginProlog\n"
8 "/DotDict 200 dict def\n"
9 "DotDict begin\n"
10 "\n"
11 "/setupLatin1 {\n"
12 "mark\n"
13 "/EncodingVector 256 array def\n"
14 " EncodingVector 0\n"
15 "\n"
16 "ISOLatin1Encoding 0 255 getinterval putinterval\n"
17 "EncodingVector 45 /hyphen put\n"
18 "\n"
19 "% Set up ISO Latin 1 character encoding\n"
20 "/starnetISO {\n"
21 " dup dup findfont dup length dict begin\n"
22 " { 1 index /FID ne { def }{ pop pop } ifelse\n"
23 " } forall\n"
24 " /Encoding EncodingVector def\n"
25 " currentdict end definefont\n"
26 "} def\n"
27 "/Times-Roman starnetISO def\n"
28 "/Times-Italic starnetISO def\n"
29 "/Times-Bold starnetISO def\n"
30 "/Times-BoldItalic starnetISO def\n"
31 "/Helvetica starnetISO def\n"
32 "/Helvetica-Oblique starnetISO def\n"
33 "/Helvetica-Bold starnetISO def\n"
34 "/Helvetica-BoldOblique starnetISO def\n"
35 "/Courier starnetISO def\n"
36 "/Courier-Oblique starnetISO def\n"
37 "/Courier-Bold starnetISO def\n"
38 "/Courier-BoldOblique starnetISO def\n"
39 "cleartomark\n"
40 "} bind def\n"
41 "\n"
42 "%%BeginResource: procset graphviz 0 0\n"
43 "/coord-font-family /Times-Roman def\n"
44 "/default-font-family /Times-Roman def\n"
45 "/coordfont coord-font-family findfont 8 scalefont def\n"
46 "\n"
47 "/InvScaleFactor 1.0 def\n"
48 "/set_scale {\n"
49 " dup 1 exch div /InvScaleFactor exch def\n"
50 " scale\n"
51 "} bind def\n"
52 "\n"
53 "% styles\n"
54 "/solid { [] 0 setdash } bind def\n"
55 "/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def\n"
56 "/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def\n"
57 "/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def\n"
58 "/bold { 2 setlinewidth } bind def\n"
59 "/filled { } bind def\n"
60 "/unfilled { } bind def\n"
61 "/rounded { } bind def\n"
62 "/diagonals { } bind def\n"
63 "/tapered { } bind def\n"
64 "\n"
65 "% hooks for setting color \n"
66 "/nodecolor { sethsbcolor } bind def\n"
67 "/edgecolor { sethsbcolor } bind def\n"
68 "/graphcolor { sethsbcolor } bind def\n"
69 "/nopcolor {pop pop pop} bind def\n"
70 "\n"
71 "/beginpage { % i j npages\n"
72 " /npages exch def\n"
73 " /j exch def\n"
74 " /i exch def\n"
75 " /str 10 string def\n"
76 " npages 1 gt {\n"
77 " gsave\n"
78 " coordfont setfont\n"
79 " 0 0 moveto\n"
80 " (\\() show i str cvs show (,) show j str cvs show (\\)) show\n"
81 " grestore\n"
82 " } if\n"
83 "} bind def\n"
84 "\n"
85 "/set_font {\n"
86 " findfont exch\n"
87 " scalefont setfont\n"
88 "} def\n"
89 "\n"
90 "% draw text fitted to its expected width\n"
91 "/alignedtext { % width text\n"
92 " /text exch def\n"
93 " /width exch def\n"
94 " gsave\n"
95 " width 0 gt {\n"
96 " [] 0 setdash\n"
97 " text stringwidth pop width exch sub text length div 0 text ashow\n"
98 " } if\n"
99 " grestore\n"
100 "} def\n"
101 "\n"
102 "/boxprim { % xcorner ycorner xsize ysize\n"
103 " 4 2 roll\n"
104 " moveto\n"
105 " 2 copy\n"
106 " exch 0 rlineto\n"
107 " 0 exch rlineto\n"
108 " pop neg 0 rlineto\n"
109 " closepath\n"
110 "} bind def\n"
111 "\n"
112 "/ellipse_path {\n"
113 " /ry exch def\n"
114 " /rx exch def\n"
115 " /y exch def\n"
116 " /x exch def\n"
117 " matrix currentmatrix\n"
118 " newpath\n"
119 " x y translate\n"
120 " rx ry scale\n"
121 " 0 0 1 0 360 arc\n"
122 " setmatrix\n"
123 "} bind def\n"
124 "\n"
125 "/endpage { showpage } bind def\n"
126 "/showpage { } def\n"
127 "\n"
128 "/layercolorseq\n"
129 " [ % layer color sequence - darkest to lightest\n"
130 " [0 0 0]\n"
131 " [.2 .8 .8]\n"
132 " [.4 .8 .8]\n"
133 " [.6 .8 .8]\n"
134 " [.8 .8 .8]\n"
135 " ]\n"
136 "def\n"
137 "\n"
138 "/layerlen layercolorseq length def\n"
139 "\n"
140 "/setlayer {/maxlayer exch def /curlayer exch def\n"
141 " layercolorseq curlayer 1 sub layerlen mod get\n"
142 " aload pop sethsbcolor\n"
143 " /nodecolor {nopcolor} def\n"
144 " /edgecolor {nopcolor} def\n"
145 " /graphcolor {nopcolor} def\n"
146 "} bind def\n"
147 "\n"
148 "/onlayer { curlayer ne {invis} if } def\n"
149 "\n"
150 "/onlayers {\n"
151 " /myupper exch def\n"
152 " /mylower exch def\n"
153 " curlayer mylower lt\n"
154 " curlayer myupper gt\n"
155 " or\n"
156 " {invis} if\n"
157 "} def\n"
158 "\n"
159 "/curlayer 0 def\n"
160 "\n"
161 "%%EndResource\n"
162 "%%EndProlog\n"
163 "%%BeginSetup\n"
164 "14 default-font-family set_font\n"
165 "% /arrowlength 10 def\n"
166 "% /arrowwidth 5 def\n"
167 "\n"
168 "% make sure pdfmark is harmless for PS-interpreters other than Distiller\n"
169 "/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse\n"
170 "% make '<<' and '>>' safe on PS Level 1 devices\n"
171 "/languagelevel where {pop languagelevel}{1} ifelse\n"
172 "2 lt {\n"
173 " userdict (<<) cvn ([) cvn load put\n"
174 " userdict (>>) cvn ([) cvn load put\n"
175 "} if\n"
176 "\n"
177 "%%EndSetup",
178 NULL,
179 // clang-format on
180};
node NULL
Definition grammar.y:149
static const char * ps_txt[]
Definition ps.h:5