File: ps.h

package info (click to toggle)
graphviz 2.8-3%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 20,480 kB
  • ctags: 22,071
  • sloc: ansic: 163,260; cpp: 36,565; sh: 25,024; yacc: 2,358; tcl: 1,808; makefile: 1,745; cs: 805; perl: 801; ml: 649; awk: 160; lex: 153; python: 105; ruby: 32; php: 6
file content (200 lines) | stat: -rw-r--r-- 5,240 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
/* $Id: ps.h,v 1.2 2005/05/04 20:16:24 erg Exp $ $Revision: 1.2 $ */
/* vim:set shiftwidth=4 ts=8: */

/**********************************************************
*      This software is part of the graphviz package      *
*                http://www.graphviz.org/                 *
*                                                         *
*            Copyright (c) 1994-2004 AT&T Corp.           *
*                and is licensed under the                *
*            Common Public License, Version 1.0           *
*                      by AT&T Corp.                      *
*                                                         *
*        Information and Software Systems Research        *
*              AT&T Research, Florham Park NJ             *
**********************************************************/

#ifdef __cplusplus
extern "C" {
#endif

    char *ps_txt[] = {
	"%%BeginProlog",
	"/DotDict 200 dict def",
	"DotDict begin",
	"",
	"/setupLatin1 {",
	"mark",
	"/EncodingVector 256 array def",
	" EncodingVector 0",
	"",
	"ISOLatin1Encoding 0 255 getinterval putinterval",
	"EncodingVector 45 /hyphen put",
	"",
	"% Set up ISO Latin 1 character encoding",
	"/starnetISO {",
	"        dup dup findfont dup length dict begin",
	"        { 1 index /FID ne { def }{ pop pop } ifelse",
	"        } forall",
	"        /Encoding EncodingVector def",
	"        currentdict end definefont",
	"} def",
	"/Times-Roman starnetISO def",
	"/Times-Italic starnetISO def",
	"/Times-Bold starnetISO def",
	"/Times-BoldItalic starnetISO def",
	"/Helvetica starnetISO def",
	"/Helvetica-Oblique starnetISO def",
	"/Helvetica-Bold starnetISO def",
	"/Helvetica-BoldOblique starnetISO def",
	"/Courier starnetISO def",
	"/Courier-Oblique starnetISO def",
	"/Courier-Bold starnetISO def",
	"/Courier-BoldOblique starnetISO def",
	"cleartomark",
	"} bind def",
	"",
	"%%BeginResource: procset graphviz 0 0",
	"/coord-font-family /Times-Roman def",
	"/default-font-family /Times-Roman def",
	"/coordfont coord-font-family findfont 8 scalefont def",
	"",
	"/InvScaleFactor 1.0 def",
	"/set_scale {",
	"	dup 1 exch div /InvScaleFactor exch def",
	"	dup scale",
	"} bind def",
	"",
	"% styles",
	"/solid { [] 0 setdash } bind def",
	"/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def",
	"/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def",
	"/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def",
	"/bold { 2 setlinewidth } bind def",
	"/filled { } bind def",
	"/unfilled { } bind def",
	"/rounded { } bind def",
	"/diagonals { } bind def",
	"",
	"% hooks for setting color ",
	"/nodecolor { sethsbcolor } bind def",
	"/edgecolor { sethsbcolor } bind def",
	"/graphcolor { sethsbcolor } bind def",
	"/nopcolor {pop pop pop} bind def",
	"",
	"/beginpage {	% i j npages",
	"	/npages exch def",
	"	/j exch def",
	"	/i exch def",
	"	/str 10 string def",
	"	npages 1 gt {",
	"		gsave",
	"			coordfont setfont",
	"			0 0 moveto",
	"			(\\() show i str cvs show (,) show j str cvs show (\\)) show",
	"		grestore",
	"	} if",
	"} bind def",
	"",
	"/set_font {",
	"	findfont exch",
	"	scalefont setfont",
	"} def",
	"",
	"% draw aligned label in bounding box aligned to current point",
	"/alignedtext {			% width adj text",
	"	/text exch def",
	"	/adj exch def",
	"	/width exch def",
	"	gsave",
	"		width 0 gt {",
	"			text stringwidth pop adj mul 0 rmoveto",
	"		} if",
	"		[] 0 setdash",
	"		text show",
	"	grestore",
	"} def",
	"",
	"/boxprim {				% xcorner ycorner xsize ysize",
	"		4 2 roll",
	"		moveto",
	"		2 copy",
	"		exch 0 rlineto",
	"		0 exch rlineto",
	"		pop neg 0 rlineto",
	"		closepath",
	"} bind def",
	"",
	"/ellipse_path {",
	"	/ry exch def",
	"	/rx exch def",
	"	/y exch def",
	"	/x exch def",
	"	matrix currentmatrix",
	"	newpath",
	"	x y translate",
	"	rx ry scale",
	"	0 0 1 0 360 arc",
	"	setmatrix",
	"} bind def",
	"",
	"/endpage { showpage } bind def",
	"/showpage { } def",
	"",
	"/layercolorseq",
	"	[	% layer color sequence - darkest to lightest",
	"		[0 0 0]",
	"		[.2 .8 .8]",
	"		[.4 .8 .8]",
	"		[.6 .8 .8]",
	"		[.8 .8 .8]",
	"	]",
	"def",
	"",
	"/layerlen layercolorseq length def",
	"",
	"/setlayer {/maxlayer exch def /curlayer exch def",
	"	layercolorseq curlayer 1 sub layerlen mod get",
	"	aload pop sethsbcolor",
	"	/nodecolor {nopcolor} def",
	"	/edgecolor {nopcolor} def",
	"	/graphcolor {nopcolor} def",
	"} bind def",
	"",
	"/onlayer { curlayer ne {invis} if } def",
	"",
	"/onlayers {",
	"	/myupper exch def",
	"	/mylower exch def",
	"	curlayer mylower lt",
	"	curlayer myupper gt",
	"	or",
	"	{invis} if",
	"} def",
	"",
	"/curlayer 0 def",
	"",
	"%%EndResource",
	"%%EndProlog",
	"%%BeginSetup",
	"14 default-font-family set_font",
	"1 setmiterlimit",
	"% /arrowlength 10 def",
	"% /arrowwidth 5 def",
	"",
	"% make sure pdfmark is harmless for PS-interpreters other than Distiller",
	"/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse",
	"% make '<<' and '>>' safe on PS Level 1 devices",
	"/languagelevel where {pop languagelevel}{1} ifelse",
	"2 lt {",
	"    userdict (<<) cvn ([) cvn load put",
	"    userdict (>>) cvn ([) cvn load put",
	"} if",
	"",
	"%%EndSetup",
	(char *) 0
    };

#ifdef __cplusplus
}
#endif