File: dfd.ps

package info (click to toggle)
python-pydotplus 2.0.2-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,832 kB
  • sloc: python: 1,755; makefile: 164
file content (31 lines) | stat: -rw-r--r-- 453 bytes parent folder | download | duplicates (22)
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
/xdef {exch def} bind def
/DFDbox {
	10 dict begin
		/fflag xdef
		/sides xdef
		dup
		aload pop
		% draw the sides
		newpath
		moveto
		1 1 sides {
			2 mod 0 ne
			{moveto} % even sides
			{lineto currentpoint stroke moveto} % odd sides
			ifelse
		} for
		fflag   % if shape is filled
		{
			aload pop
			newpath
			moveto
			/y1 xdef
			/x1 xdef
			lineto stroke newpath
			x1 y1 moveto lineto stroke
			pop pop
		}
		{pop}
		ifelse
	end
} bind def