|
|
1.1 root 1: .so tmac.ilib
2: .TH GPACK 2 "The University of Arizona \- 8/12/84"
3: .SH NAME
4: gpack \- graphics package for the Chromatics CG 3999
5: .SH SYNOPSIS
6: .nf
7: .ta 1.7i
8: \*Mbckgrnd(colr)\fR set background color
9: \*M_char()\fR switch to character mode
10: \*Mclip(mode)\fR turn clip mode \*MON\fR/\*MOFF\fR
11: \*Mclipped(object)\fR clip an object to window size (internal)
12: \*Mcolor(colr)\fR set foreground color
13: \*Mcurcol(colr)\fR set cursor color
14: \*Mdraw(object)\fR display object
15: \*Menable(colr)\fR enable particular color guns
16: \*Merase()\fR clear the screen
17: \*M_fill()\fR turn on fill mode
18: \*Mginit()\fR initialize graphics package
19: \*Mmode(newmode)\fR set plot submode (internal)
20: \*Mmovcur(x,\*by)\fR position cursor (internal)
21: \*M_nofill()\fR turn off fill mode
22: \*M_noroll()\fR turn off roll mode
23: \*M_number(n)\fR output number (\*Mn\fR) (internal)
24: \*M_plot()\fR switch to plot mode
25: \*M_point(x,\*by)\fR output point (\*Mx\fR,\*My\fR) (internal)
26: \*M_restore()\fR reset terminal windows
27: \*M_roll()\fR turn on roll mode
28: \*Msetscale(xmin,\*bymin,\*bxmax,\*bymax,\*bcolmin,\*browmin,\*bcolmax,\*browmax)\fR
29: scaling
30: \*Mscale(pt)\fR scale a point
31: \*M_scale(mode)\fR turn \*MON\fR/\*MOFF\fR scaling
32: \*Mtext(x,\*by,\*bs)\fR output string \*Ms\fR at point (\*Mx\fR,\*My\fR)
33: \*Mwindow(w)\fR switch to window \*Mw\fR (1 to 4)
34: \*Mwsize(xmin,\*bymin,\*bxmax,\*bymax)\fR
35: set window size
36: \*Mxfit(x)\fR scale x-coordinate (internal)
37: \*M_xydel(xdelta,\*Mydelta)\fR output incremental motion (internal)
38: \*Myfit(y)\fR scale y-coordinate (internal)
39: .fi
40: .PP
41: \fIGpack\fR is a package designed to interface to the Chromatics CG 3999
42: Color Graphics Terminal.
43: The user must be familiar with the Chromatics terminal and its
44: capabilities.
45: \fIGpack\fR maintains information on the state of each hardware
46: window and avoids the transmission of redundant commands.
47: The following objects, defined as records, are known to \fIgpack\fR:
48: .DS
49: .ta 1.75i
50: \*Mpoint(x,\*by)\fR
51: \*Mdot(x,\*by)\fR
52: \*Mline(a,\*bb)\fR
53: \*Mbox(a,\*bb)\fR
54: \*Mcircle(center,\*bradius)\fR
55: \*Marc(center,\*bradius,\*bstart,\*bstop)\fR
56: \*Mpoints(pts)\fR a collection of points.
57: \*Mlines(pts)\fR a collection of points, joined by vectors
58: \*Mpolygon(pts)\fR a collection of points, joined and closed by vectors
59: \*Mincdots(start,\*bmotions)\fR start point and list of motions
60: \*Mmotion(xdel,\*bydel)\fR an incremental motion
61: .DE
62: The procedure \*Mdraw\fR can display any of these objects, with or
63: without scaling.
64: Additionally, \*Mdraw\fR accepts a co-expression that generates these
65: objects.
66: .PP
67: Two record types are used internally:
68: .DS
69: .in .5i
70: \*Mwind(pmode,\*bsmode,\*bcmode,\*bfmode,\*brmode,\*bpsubmode,\*bfc,\*bbc,\*blowerleft,\*bupperright)\fR
71: \*Mscaling(xslope,\*bxinter,\*byslope,\*byinter)\fR
72: .in
73: .DE
74: .in .5i
75: where
76: .nf
77: .sp
78: \*Mpmode\fR is \*MON\fR if window is in plot mode.
79: \*Msmode\fR is \*MON\fR if scaling is active.
80: \*Mcmode\fR is \*MON\fR if clipping is active.
81: \*Mfmode\fR is \*MON\fR if fill is active.
82: \*Mrmode\fR is \*MON\fR if roll is active.
83: \*Mpsubmode\fR is the plot submode.
84: \*Mfc\fR is the foreground color.
85: \*Mbc\fR is the background color.
86: \*Mlowerleft, upperright\fR are the window bounds.
87: \*Mxslope, xinter\fR are the x-coordinate scaling constants
88: \*Myslope, yinter\fR are the y-coordinate scaling constants
89: .sp
90: .fi
91: The defaults for all windows are:
92: .DS
93: .in .5i
94: \*Mwind(OFF,\*bOFF,\*bOFF,\*bOFF,\*bON,\*b"",\*bNOCOLOR,\*bNOCOLOR,\*bpoint(0,\*b0),\*bpoint(XMAX,\*bYMAX))\fR
95: \*Mscaling(1,\*b0,\*b1,\*b0)\fR
96: .DE
97: .PP
98: The following values are predefined globals, and should not be
99: reassigned:
100: .nf
101: .ta 1.5i
102: .sp .5
103: \*MMODE, ESC\fR used internally
104: \*MON, OFF\fR mode settings
105: \*MXMAX, YMAX\fR maximum screen addresses
106: \*MDOT,VECTOR,RECTANGLE,CIRCLE,ARC,CONCVECT,INCDOT\fR
107: plot submodes
108: \*MBLACK,BLUE,GREEN,CYAN,RED,MAGENTA,YELLOW,WHITE,BLINK\fR
109: colors
110: .fi
111: .PP
112: The following globals are used internally:
113: .nf
114: .sp .5
115: \*M_wno\fR current window (1 to 4), initially 1
116: \*Mwindow\fR list of window attributes
117: \*Mwscale\fR list of window scaling factors
118: .fi
119: .PP
120: The procedure \fIginit()\fR must be called to initialize
121: global constants and set window attributes at the start of
122: any program using \fIgpack\fR.
123: Procedures that are marked `internal' are intended
124: primarily for internal use by \fIgpack\fR.
125: Some procedures are generators that reverse their effects.
126: .SH SEE ALSO
127: worm(6)
128: .SH DEFICIENCIES
129: Object clipping has not been implemented.
130: \*Mradius\fR is not scaled for \*Mcircle\fR and \*Marc\fR.
131: .SH AUTHOR
132: Stephen B. Wampler
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.