|
|
Initial revision
GPACK(2) Icon Program Library GPACK(2)
NNNNAAAAMMMMEEEE
gpack - graphics package for the Chromatics CG 3999
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
bbbbcccckkkkggggrrrrnnnndddd((((ccccoooollllrrrr)))) set background color
____cccchhhhaaaarrrr(((()))) switch to character mode
cccclllliiiipppp((((mmmmooooddddeeee)))) turn clip mode OOOONNNN/OOOOFFFFFFFF
cccclllliiiippppppppeeeedddd((((oooobbbbjjjjeeeecccctttt)))) clip an object to window size (internal)
ccccoooolllloooorrrr((((ccccoooollllrrrr)))) set foreground color
ccccuuuurrrrccccoooollll((((ccccoooollllrrrr)))) set cursor color
ddddrrrraaaawwww((((oooobbbbjjjjeeeecccctttt)))) display object
eeeennnnaaaabbbblllleeee((((ccccoooollllrrrr)))) enable particular color guns
eeeerrrraaaasssseeee(((()))) clear the screen
____ffffiiiillllllll(((()))) turn on fill mode
ggggiiiinnnniiiitttt(((()))) initialize graphics package
mmmmooooddddeeee((((nnnneeeewwwwmmmmooooddddeeee)))) set plot submode (internal)
mmmmoooovvvvccccuuuurrrr((((xxxx,,,,yyyy)))) position cursor (internal)
____nnnnooooffffiiiillllllll(((()))) turn off fill mode
____nnnnoooorrrroooollllllll(((()))) turn off roll mode
____nnnnuuuummmmbbbbeeeerrrr((((nnnn)))) output number (nnnn) (internal)
____ppppllllooootttt(((()))) switch to plot mode
____ppppooooiiiinnnntttt((((xxxx,,,,yyyy)))) output point (xxxx,yyyy) (internal)
____rrrreeeessssttttoooorrrreeee(((()))) reset terminal windows
____rrrroooollllllll(((()))) turn on roll mode
sssseeeettttssssccccaaaalllleeee((((xxxxmmmmiiiinnnn,,,,yyyymmmmiiiinnnn,,,,xxxxmmmmaaaaxxxx,,,,yyyymmmmaaaaxxxx,,,,ccccoooollllmmmmiiiinnnn,,,,rrrroooowwwwmmmmiiiinnnn,,,,ccccoooollllmmmmaaaaxxxx,,,,rrrroooowwwwmmmmaaaaxxxx))))
scaling
ssssccccaaaalllleeee((((pppptttt)))) scale a point
____ssssccccaaaalllleeee((((mmmmooooddddeeee)))) turn OOOONNNN/OOOOFFFFFFFF scaling
tttteeeexxxxtttt((((xxxx,,,,yyyy,,,,ssss)))) output string ssss at point (xxxx,yyyy)
wwwwiiiinnnnddddoooowwww((((wwww)))) switch to window wwww (1 to 4)
wwwwssssiiiizzzzeeee((((xxxxmmmmiiiinnnn,,,,yyyymmmmiiiinnnn,,,,xxxxmmmmaaaaxxxx,,,,yyyymmmmaaaaxxxx))))
set window size
xxxxffffiiiitttt((((xxxx)))) scale x-coordinate (internal)
____xxxxyyyyddddeeeellll((((xxxxddddeeeellllttttaaaa,,,,yyyyddddeeeellllttttaaaa))))output incremental motion (internal)
yyyyffffiiiitttt((((yyyy)))) scale y-coordinate (internal)
_G_p_a_c_k 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. _G_p_a_c_k
maintains information on the state of each hardware window
and avoids the transmission of redundant commands. The fol-
lowing objects, defined as records, are known to _g_p_a_c_k:
ppppooooiiiinnnntttt((((xxxx,,,,yyyy))))
ddddooootttt((((xxxx,,,,yyyy))))
lllliiiinnnneeee((((aaaa,,,,bbbb))))
bbbbooooxxxx((((aaaa,,,,bbbb))))
cccciiiirrrrcccclllleeee((((cccceeeennnntttteeeerrrr,,,,rrrraaaaddddiiiiuuuussss))))
aaaarrrrcccc((((cccceeeennnntttteeeerrrr,,,,rrrraaaaddddiiiiuuuussss,,,,ssssttttaaaarrrrtttt,,,,ssssttttoooopppp))))
ppppooooiiiinnnnttttssss((((ppppttttssss)))) a collection of points.
lllliiiinnnneeeessss((((ppppttttssss)))) a collection of points, joined by vectors
ppppoooollllyyyyggggoooonnnn((((ppppttttssss)))) a collection of points, joined and closed by vectors
Version 5.9 The University of Arizona - 8/12/84 1
GPACK(2) Icon Program Library GPACK(2)
iiiinnnnccccddddoooottttssss((((ssssttttaaaarrrrtttt,,,,mmmmoooottttiiiioooonnnnssss))))start point and list of motions
mmmmoooottttiiiioooonnnn((((xxxxddddeeeellll,,,,yyyyddddeeeellll))))an incremental motion
The procedure ddddrrrraaaawwww can display any of these objects, with or
without scaling. Additionally, ddddrrrraaaawwww accepts a co-expression
that generates these objects.
Two record types are used internally:
wwwwiiiinnnndddd((((ppppmmmmooooddddeeee,,,,ssssmmmmooooddddeeee,,,,ccccmmmmooooddddeeee,,,,ffffmmmmooooddddeeee,,,,rrrrmmmmooooddddeeee,,,,ppppssssuuuubbbbmmmmooooddddeeee,,,,ffffcccc,,,,bbbbcccc,,,,lllloooowwwweeeerrrrlllleeeefffftttt,,,,uuuuppppppppeeeerrrrrrrriiiigggghhhhtttt))))
ssssccccaaaalllliiiinnnngggg((((xxxxssssllllooooppppeeee,,,,xxxxiiiinnnntttteeeerrrr,,,,yyyyssssllllooooppppeeee,,,,yyyyiiiinnnntttteeeerrrr))))
where
ppppmmmmooooddddeeee is OOOONNNN if window is in plot mode.
ssssmmmmooooddddeeee is OOOONNNN if scaling is active.
ccccmmmmooooddddeeee is OOOONNNN if clipping is active.
ffffmmmmooooddddeeee is OOOONNNN if fill is active.
rrrrmmmmooooddddeeee is OOOONNNN if roll is active.
ppppssssuuuubbbbmmmmooooddddeeee is the plot submode.
ffffcccc is the foreground color.
bbbbcccc is the background color.
lllloooowwwweeeerrrrlllleeeefffftttt,,,, uuuuppppppppeeeerrrrrrrriiiigggghhhhtttt are the window bounds.
xxxxssssllllooooppppeeee,,,, xxxxiiiinnnntttteeeerrrr are the x-coordinate scaling constants
yyyyssssllllooooppppeeee,,,, yyyyiiiinnnntttteeeerrrr are the y-coordinate scaling constants
The defaults for all windows are:
wwwwiiiinnnndddd((((OOOOFFFFFFFF,,,,OOOOFFFFFFFF,,,,OOOOFFFFFFFF,,,,OOOOFFFFFFFF,,,,OOOONNNN,,,,"""""""",,,,NNNNOOOOCCCCOOOOLLLLOOOORRRR,,,,NNNNOOOOCCCCOOOOLLLLOOOORRRR,,,,ppppooooiiiinnnntttt((((0000,,,,0000)))),,,,ppppooooiiiinnnntttt((((XXXXMMMMAAAAXXXX,,,,YYYYMMMMAAAAXXXX))))))))
ssssccccaaaalllliiiinnnngggg((((1111,,,,0000,,,,1111,,,,0000))))
The following values are predefined globals, and should not
be reassigned:
MMMMOOOODDDDEEEE,,,, EEEESSSSCCCC used internally
OOOONNNN,,,, OOOOFFFFFFFF mode settings
XXXXMMMMAAAAXXXX,,,, YYYYMMMMAAAAXXXX maximum screen addresses
DDDDOOOOTTTT,,,,VVVVEEEECCCCTTTTOOOORRRR,,,,RRRREEEECCCCTTTTAAAANNNNGGGGLLLLEEEE,,,,CCCCIIIIRRRRCCCCLLLLEEEE,,,,AAAARRRRCCCC,,,,CCCCOOOONNNNCCCCVVVVEEEECCCCTTTT,,,,IIIINNNNCCCCDDDDOOOOTTTT
plot submodes
BBBBLLLLAAAACCCCKKKK,,,,BBBBLLLLUUUUEEEE,,,,GGGGRRRREEEEEEEENNNN,,,,CCCCYYYYAAAANNNN,,,,RRRREEEEDDDD,,,,MMMMAAAAGGGGEEEENNNNTTTTAAAA,,,,YYYYEEEELLLLLLLLOOOOWWWW,,,,WWWWHHHHIIIITTTTEEEE,,,,BBBBLLLLIIIINNNNKKKK
colors
The following globals are used internally:
____wwwwnnnnoooo current window (1 to 4), initially 1
wwwwiiiinnnnddddoooowwww list of window attributes
wwwwssssccccaaaalllleeee list of window scaling factors
The procedure _g_i_n_i_t() must be called to initialize global
constants and set window attributes at the start of any pro-
gram using _g_p_a_c_k. Procedures that are marked `internal' are
intended primarily for internal use by _g_p_a_c_k. Some pro-
cedures are generators that reverse their effects.
Version 5.9 The University of Arizona - 8/12/84 2
GPACK(2) Icon Program Library GPACK(2)
SSSSEEEEEEEE AAAALLLLSSSSOOOO
worm(6)
DDDDEEEEFFFFIIIICCCCIIIIEEEENNNNCCCCIIIIEEEESSSS
Object clipping has not been implemented. rrrraaaaddddiiiiuuuussss is not
scaled for cccciiiirrrrcccclllleeee and aaaarrrrcccc.
AAAAUUUUTTTTHHHHOOOORRRR
Stephen B. Wampler
Version 5.9 The University of Arizona - 8/12/84 3
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.