4.3BSD/usr/contrib/icon/man/man2/gpack.2

.so tmac.ilib
.TH GPACK 2 "The University of Arizona \- 8/12/84"
.SH NAME
gpack \- graphics package for the Chromatics CG 3999
.SH SYNOPSIS
.nf
.ta 1.7i
\*Mbckgrnd(colr)\fR	set background color
\*M_char()\fR	switch to character mode
\*Mclip(mode)\fR	turn clip mode \*MON\fR/\*MOFF\fR
\*Mclipped(object)\fR	clip an object to window size (internal)
\*Mcolor(colr)\fR	set foreground color
\*Mcurcol(colr)\fR	set cursor color
\*Mdraw(object)\fR	display object
\*Menable(colr)\fR	enable particular color guns
\*Merase()\fR	clear the screen
\*M_fill()\fR	turn on fill mode
\*Mginit()\fR	initialize graphics package
\*Mmode(newmode)\fR	set plot submode (internal)
\*Mmovcur(x,\*by)\fR	position cursor (internal)
\*M_nofill()\fR	turn off fill mode
\*M_noroll()\fR		turn off roll mode
\*M_number(n)\fR	output number (\*Mn\fR) (internal)
\*M_plot()\fR	switch to plot mode
\*M_point(x,\*by)\fR	output point (\*Mx\fR,\*My\fR) (internal)
\*M_restore()\fR	reset terminal windows
\*M_roll()\fR	turn on roll mode
\*Msetscale(xmin,\*bymin,\*bxmax,\*bymax,\*bcolmin,\*browmin,\*bcolmax,\*browmax)\fR
	scaling
\*Mscale(pt)\fR	scale a point
\*M_scale(mode)\fR	turn \*MON\fR/\*MOFF\fR scaling
\*Mtext(x,\*by,\*bs)\fR	output string \*Ms\fR at point (\*Mx\fR,\*My\fR)
\*Mwindow(w)\fR	switch to window \*Mw\fR (1 to 4)
\*Mwsize(xmin,\*bymin,\*bxmax,\*bymax)\fR
	set window size
\*Mxfit(x)\fR	scale x-coordinate (internal)
\*M_xydel(xdelta,\*Mydelta)\fR	output incremental motion (internal)
\*Myfit(y)\fR	scale y-coordinate (internal)
.fi
.PP
\fIGpack\fR is a package designed to interface to the Chromatics CG 3999
Color Graphics Terminal.
The user must be familiar with the Chromatics terminal and its
capabilities.
\fIGpack\fR maintains information on the state of each hardware
window and avoids the transmission of redundant commands.
The following objects, defined as records, are known to \fIgpack\fR:
.DS
.ta 1.75i
\*Mpoint(x,\*by)\fR
\*Mdot(x,\*by)\fR
\*Mline(a,\*bb)\fR
\*Mbox(a,\*bb)\fR
\*Mcircle(center,\*bradius)\fR
\*Marc(center,\*bradius,\*bstart,\*bstop)\fR
\*Mpoints(pts)\fR	a collection of points.
\*Mlines(pts)\fR	a collection of points, joined by vectors
\*Mpolygon(pts)\fR	a collection of points, joined and closed by vectors
\*Mincdots(start,\*bmotions)\fR	start point and list of motions
\*Mmotion(xdel,\*bydel)\fR	an incremental motion
.DE
The procedure \*Mdraw\fR can display any of these objects, with or
without scaling.
Additionally, \*Mdraw\fR accepts a co-expression that generates these
objects.
.PP
Two record types are used internally:
.DS
.in .5i
\*Mwind(pmode,\*bsmode,\*bcmode,\*bfmode,\*brmode,\*bpsubmode,\*bfc,\*bbc,\*blowerleft,\*bupperright)\fR
\*Mscaling(xslope,\*bxinter,\*byslope,\*byinter)\fR
.in
.DE
.in .5i
where
.nf
.sp
\*Mpmode\fR is \*MON\fR if window is in plot mode.
\*Msmode\fR is \*MON\fR if scaling is active.
\*Mcmode\fR is \*MON\fR if clipping is active.
\*Mfmode\fR is \*MON\fR if fill is active.
\*Mrmode\fR is \*MON\fR if roll is active.
\*Mpsubmode\fR is the plot submode.
\*Mfc\fR is the foreground color.
\*Mbc\fR is the background color.
\*Mlowerleft, upperright\fR are the window bounds.
\*Mxslope, xinter\fR are the x-coordinate scaling constants
\*Myslope, yinter\fR are the y-coordinate scaling constants
.sp
.fi
The defaults for all windows are:
.DS
.in .5i
\*Mwind(OFF,\*bOFF,\*bOFF,\*bOFF,\*bON,\*b"",\*bNOCOLOR,\*bNOCOLOR,\*bpoint(0,\*b0),\*bpoint(XMAX,\*bYMAX))\fR
\*Mscaling(1,\*b0,\*b1,\*b0)\fR
.DE
.PP
The following values are predefined globals, and should not be
reassigned:
.nf
.ta 1.5i
.sp .5
\*MMODE, ESC\fR	used internally
\*MON, OFF\fR	mode settings
\*MXMAX, YMAX\fR	maximum screen addresses
\*MDOT,VECTOR,RECTANGLE,CIRCLE,ARC,CONCVECT,INCDOT\fR
	plot submodes
\*MBLACK,BLUE,GREEN,CYAN,RED,MAGENTA,YELLOW,WHITE,BLINK\fR
	colors
.fi
.PP
The following globals are used internally:
.nf
.sp .5
\*M_wno\fR	current window (1 to 4), initially 1
\*Mwindow\fR	list of window attributes
\*Mwscale\fR	list of window scaling factors
.fi
.PP
The procedure \fIginit()\fR must be called to initialize
global constants and set window attributes at the start of
any program using \fIgpack\fR.
Procedures that are marked `internal' are intended
primarily for internal use by \fIgpack\fR.
Some procedures are generators that reverse their effects.
.SH SEE ALSO
worm(6)
.SH DEFICIENCIES
Object clipping has not been implemented.
\*Mradius\fR is not scaled for \*Mcircle\fR and \*Marc\fR.
.SH AUTHOR
Stephen B. Wampler