summaryrefslogtreecommitdiff
path: root/app/mpg/2.2/src/WATANABE 3-8.GCONF
blob: 66e4856e8f9234593a25bc4489d7dac44b74c67d (plain)
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
INCLUDE "std primitives"; 
PLOTTER "WATANABE",3,8,3449,2599,34.5,26.0; 
 
COLORS "999000900009090000990"; 
 
LET  terminator = ""13"";
TEXT VAR watanabe polygon :: ""; 
 
PROC watanabe pen (INT CONST nummer):
   draw watanabe polygon; 
   INT VAR pen no := nummer;
   IF pen no > 6 OR pen no < 0
      THEN pen no := 1 
   FI;
   out ("J" + text(pen no) + terminator) 
END PROC watanabe pen;

PROC draw watanabe polygon: 
   IF watanabe polygon <> "" 
      THEN out ("D" + subtext (watanabe polygon,2) + terminator) 
   FI; 
   watanabe polygon := "" 
END PROC draw watanabe polygon; 

PROC prepare:
   continue (channel (plotter))
END PROC prepare; 

PROC initplot: 
   watanabe polygon := ""; 
   TEXT VAR watanabe wait; 
   REP 
   UNTIL incharety = "" PER; 
   out("M1500,1500"13"");          (* Signal ! *)
   inchar(watanabe wait);
   disable stop 
END PROC initplot;

PROC endplot: 
   watanabe pen (0); 
   home;
   IF is error 
      THEN break (quiet) 
   FI; 
   enable stop 
END PROC endplot; 
 
PROC clear: 
   watanabe pen (1)
END PROC clear; 
 
PROC home: 
   draw watanabe polygon; 
   out ("H" + terminator) 
END PROC home; 
 
PROC moveto (INT CONST x,y): 
   draw watanabe polygon; 
   out ( "M" + text(x) + "," + text(y) + terminator) 
END PROC moveto;
 
PROC drawto (INT CONST x,y): 
   watanabe polygon CAT "," + text (x) + "," + text (y) 
END PROC drawto;

PROC setpixel (INT CONST x,y): 
   move to (x,y); 
   out ("N1" + terminator) 
END PROC setpixel;

PROC foreground (INT VAR type): 
   type := min (max (type, 0), 6); 
   watanabe pen (type) 
END PROC foreground; 
 
PROC background (INT VAR type):
   type := 0 
END PROC background; 
        
PROC setpalette: 
END PROC setpalette;

PROC circle (INT CONST x,y,rad,from,to): 
   std circle (x,y,rad,from,to)
END PROC circle; 
 
PROC box (INT CONST x1,y1,x2,y2,pattern): 
   std box (x1,y1,x2,y2,pattern) 
END PROC box; 
 
PROC fill (INT CONST x,y,pattern): 
END PROC fill;