-

advertisement
-
to set thQ
o~de~
t
(0
S'2
t
t h ~':!
CO)
co10~
1 (J r' ,
t h <? n
fo~
a siven polvline,
oj r' 03 I.JJ
t·h<.."1 9r·aphic:. frlOllitor· .. As ·. .·01..1
"'" (0 IJ ,...
Sf"';;.',
first setting the color to the
changins thp
colo~
P
(0
1 '·,..1 i n <?
the··...
fi~5t
ar'~="
hue,
VOll
must first use the command
L.. 0) I) kat
t h <.':!
diff<.:.-r·~"nt
t
til 0
1 i n <", s dr' 03. til non
color·s. This
then drawing the
fi~5t
loa.S
line,
donE.' b'",'
then
by re-exQcutin9 the color command and lastlv drawing the
second polvline. The
comm~nd
to change the color is as follows:
GKS> gsetlin@colour(color)
where color is an integer givjng the desired color as
fo,-'
1"'01··... 1 i
n~~
de5c~ibed
in the table
co'l or·s.
<return> to continu
/*****************************************************************************
*
Name: PolYline Line Type Example
.~
-
* Author: Ken Mikeworth
*
* Da t e Wr· itt~::- n : Febr·u;:l.r-··...
*
* !::::i9n-Off Date:: Febr·uar···. .
*
.~
"*
.-,t::"
.,,::. ....' .,
Purpose/Description: To 9iv~ an example of how to
p(,l··,..l in,.,? ·Functi,)n.
s~t
the line type for
the
.~
~.
110 Data:
*
*
* General
*
The type parameters are passed to the called routine,
9 se t·, i n<? t·y·p,:;.
After initializin9 the var-iables, the absolute
data points to be used in the example are set, then the
is drawn, and finally an expl~nation to the student is
displayed on the screen.
Descr~ption:
.~
*
*
~.
*
·Il·
Callin9 Modules: The Polyline menu module,
Modul~"!s
lin~
fcn._polYlmenu.
The lin~,,; color· set rr,odule, 9s·2tljn~"cc,lol.lr··, ttH:' polylin,;:.
module, 9Polylin2. and the lin~ type set module, 9setlinetype.
C:all~?d:
*
.~
.* VDI
Functions Called: None •
******************************************************************************
#include <stdio.h)
#incll.lde <ctype.h)
#de·Fine void ini:
void fcn_.plinetype()
<:
int type,color,n_.points;
t··,..pedef str·lJct (
....•
•.... .,
i. n t
. ,..;
) 9wF·oint;
9wpoint points[50];
C (J 1 (I r' ::;: ~: ;
n ... pc, i n t s::;:<:~;
p (I i n t s [ 1 ] . >:::::: 10;
p(lints[1].··,..=10;
points[2].>~=200'
i nts [2]. ··,..=:40;;
i nts [:::n. ::·::=15(1;
PO i nts [3] •..
120;
PO
PO
,..=
9setlinetypeCtype);
9setlinecolour(color);
9Polyline(n_points,points);
t··,.. PE.'::::~:;
1 I) r' ::.::::::;
.: (t
n_points:::::3;
poi n 17 s r 1 ] • >::= 1 (;;
i
i
PO i
PO i
PO i
PO
PO
nts [1]. ··,··:::::40;
n t 5 L2] • >::=:2:00;
fits [2]. ··,..=150;
nt 5 [:3]. }:::::: 120;
n t 5 [::=.:] ...... =150;
9S'2t 1 i n':;.t··... pe (t··,··p~,?);
9 S E' t 1 i nee (I 1 0 1.1 r· ( c (I 1 (I r' ) ;
9 Po)I ,,( I 1. I"t f:! (
n .. P (I
1 ,', t
s,
F (, J.
n t s .i
~
fcl"t.J'l?adf i,l<=!( "pl inl?i..·... pf:,. d.:::d:");
}
,-
-
#include <stdio.h>
#include (ctvpe.h>
-
void 9setlinetvpe(tvpe)
int t·...·pe;
(
pr·intf("p(l·I··... lin~"!
}
t··.··p~?
set to t··... pe den(.ted b··... inde::< nI.JIT,ber· I.d\n",t'",·pe);
L.et us now examine the various
line types
av~ilable.
Line type can also help u
to distinsuish lines and make readins a graph or desisn easier and more
interestins.
Asain,
to set the line type for a
polYline,
first set the
line
type usins the command as follows:
GKS> 9setlinetypeCtype)
where
type
15
an integer giving the type as specified in the table for
polyline type.
After setting the type.
then draw the desired polylines.
<return> to continue
/**********~******************************************************************
*
*
-
.It-
Name: Polyline Index Example
Ken Mikeworth
Autho~:
*
* Date Written: February
*
*
.ll-
Sign-Off
.-,1::"
.1::.-,) ,
February
Date~
* Purpose/Description: To give an example of how to set the index
pol··,..l ine furtc1-ion.
*
fOI
the
~:.
* I/O Data: The
.
~
ind~x parameter is passed to the called routine.
'3 s 17! t 1 i n 17! j. r d :.~ >:: •
.ll-
* General Description: After initializing the variables. the absolute
data points to be used in the example are set, then the line
is dr'awn, and fina.ll··,·· an e>::plani1.tion to th,? c:.tu.I:>nt is
displayed on the screen.
"*
*
;1-
*
*
"*
Calling
Modul~s~
The Polyline menu module.
* Modules Call,,~d: The 1 ir,~~ ).r,d·.',·.
*
* VDI Functions Called: None.
~;,.:,t
rrrl)dl.ll~7!,
fcn_polvlmenu.
9setl int"!indt"!>::.
**************************************************~**************************~
#jnclude <stdio.h>
#include <ctype.h>
#d<2fin\? \/I)id int
void fcn_plindexC)
C
int
n_poi nt·,;;
str'uc:-l:- (
int ::{;
indt~::{,
t··,..p~?def
in t
... ;
}
!:;IIJ.IPO
i nt;
9wpoint points[50J;
i rr d~~>::==L~;
n ..._po i nts:::::::;
PO
i n t s; [ 1 ] . >:::::: 1. 0
~
point~.[1].··,..::=:10;
i
i
PO i
PI) i
PO
PI)
nt 5 [:?J. >::=:200;
n t s [:2'] • '",'=40;
n t s [::::] • >:::": 150;
n t ~. [3 J •.".':::: 1. :?();
9setlineindex(index);
'3Polvline(n_puints,Foints);
i n d~~>::c.::(-,;
n ._.P') j n t ~s:::::::;
PI) i n t ~; [ 1. ] • >::::::: 1. 0;
PI) i n t 5 [ 1 ] " "(:::::40;
pc, i nts [2]" >::::::;-:::00;
p (, i n t s [ ::? 1 • ",., ,:.; 1 ")0 ;
points[:::::]. >::.::::120;
PO i n t s [31 ...,..::: 150;
.-
gsetlineindex(ind~x);
1 ··... 1 i n '2 ( n _.. P (, :i. n t :'::." f") i n t f". ) ~
of C f"LJ' e a d f i 1 e ( " P 1 i n d ,,~ >:: < d at-" )
9 PI)
j
~
#include <stdio.h>
#inclurle <ctype.h>
-
void 9setlineindex(index)
l.nt inch:..>::;
(
pr·intf("pol··,··lin~::.
)
inde::-:: s\::.t to inde::-:: denoted b··... nUITlb<.::.r· 'I.d\n",indt"'!::-::);
The index
functions.
-
fo~
the polyline is murh the same as the line type and color
In fact.
it is a listing of
and is an easy method of setting
5eve~al
eve~vthin9
common combinations 0f these
to desired levels.
p~ovided
the
settings desired are listed in the index. Look at the polvlines on the
sc~een.
These are in the index. and
we~e
set bv using the command. as follows:
OKS> 9setlineindex(index)
where index is an
giv~~n
intege~
in th<? ta,ble for-
to the desired level
relating which selection from the irldex is deSIred a
pol--(lin,~
first.
inde::.::. As in thl= ol'h,er--':unctit)r-,s.
Sl~t
th<:?
then draw the desired polvlines.
<r- <.=! t I.J r- n => t
I)
.: (I
n tin 1.1 f!
inde
1***************************************************************************
** Name: Polvmarker Module
.Ii-"*.
** AI.lt hor': K'2 n Mi k('!UJo r' t h
**
** Date Wr'itt~?n: Febr'uar""" /:.:., 19:~:(:.
**
** Sign-Off Date: February 26, 1986
**
** Pur,pose/Descr·iption: To FTO\lick! a m<..~nl.l of ~'i~lec:t:ions for' ·2>::pl":l.:i.nin9 th,,:,
polvmarker attributes.
*"*.
**
** liD data: standard liD library
.ll-*
"*.* Gf=ner'a 1 descr·ipti.orl: A m0nu da.ta f i le is read and displayed. After
acceptins the desired selection. an appropriate submodule is
**
call~~d.
This pr'ocess is f·~?p~::.a.t<..~d until ended bv a m0nu sel~ction
**
Fr·om
the
user.
**
**
** Calling modules: Main module.
**
0):;-* Modules called: fcn_readfile to display text, fc:n_pmrkrex as an example of
a polvmarker, fcn_pmrkrcol to demonstrate polvmarker color.
**
fcrl ..... Pfflr·kr·t··... pe to !.~hoI!J F-·ol··(mar·ker· types. and ":cr,_.. pmr·kr·:ir,de>:: to
**
d~=..monstr·03.t,? the us'.=.. of th,.? pol··... rnar·k,?r· indc.=:~::< fl.lnction.
**
**
.** VD I Fun c t i flS ca. 1 1 ~? d : n n e •
*****************************************************************************
-
(0
(I
#include <stdio.h>
#include <ctvpe.h>
#defin,;;. void int
#define BUFSIZE 81
vo i d
r\.
fcn_po 1 vmITli·nl.1 ( )
f c rL..t"· t;;' a oj f i 1 <:! ( II mr' k J"' me n I.J • oj i';l. t " ) ;
sea n f ( II I. oj " , 8d n t __ r' e s P (I n s~;;. ) ;
getcha.r· ( );
to h i 1 i~ (i n t .. _. r' e s P (I n S e I::; (-;.) (
switch (jnt_response) (
cas t'? 1: fen _ r' e a oj.,= i 1 ,? ( II m r' k r' '.:1 f! n • d at" ) ; to r' e a. k ;
case ~:tcn_pmrkrex();break;
case :3: fcn_PlTlr'kr'col (); br·,'?a.k;
case 4:fcn_pmrkrtvpe();break;
case 5:fcn_pmrkrindex();break;
dei=03ult:printf("\rl\n P1E!';:l.s,:. entcJr' a v;:l.lid
for' (int_ . slE!ep::: 0; int_.sle,:op <::::::::;:00;
}
fcn __.r·,'!'adf i 1,;,. ("mr·kl-·m<2nu. da.t ");
scanf("'l.d",8dnt_J·espons<2);
s,=..tcha.r· ( );
)
}
s(~ll':ch.(ln
(1--6)
int ... sl'.::-';"I"+-+)
\1"1");
int_. i::":l·ll-l;
******************************************************************************
POI_. YI'1ARI<ER 1'1F.:NI...I
*******************************
***********~**************
******************************************************************************
Please enter the number corresponding to your choice:
1)
2)
3)
4)
5)
6)
-
G~neral
Description
Polymarker Example
Polymark~r Color
P ... l··... md.rker· Type
Polymarker Index
Exit this menu
To full··... l.JnriE'r·stand pol··,··mar·kE-r·s, ··... c'lj must ;:).1<;:·0
two are VE'rY much
-
interr~lat@d.
1.lnd~:.r·stand
A polymarker is a special
pol··... 1in~"'s,
as th,::.
symbol at the
E-ndpoints of a polyline so that the pOInts thE-rrtselvE's can be seen more clearly
and easily. Polvmarkers incrE'asE' thE' readability of graphs by markin9 related
points with idE'ntical markE'rs
50
that thE'Y can be
pick~d
out easily and a
viE'wE'r can easily see thesE' points arE' relatE'd in some way.
In graphics,
polYmarkE'rs can help to relate certain elements of the
picturE' to each other,
Now,
let~s
or show other relationships.
look at some examples and see how this really works ••••
(rE't> to continue
-
..
1***************************************************** ***********~*****~******
*
*
-
.1<-
*
.~
*
*
*
*
*
*
*
*
*
*
*
*
*
Name:
Polvmarker Example
Author:
Ken Mikeworth
Date Written:
Sign-Off Date:
February 26.
1986
Februarv 26.
1986
Purpose/Description: To provide an example to the tutorial
polvmarker and how to create one.
110 Data:
General
The number of points and the array of points to
passed to the called GKS function.
viewer of a
b~
graphed are
Description: The proper variables are initiali2~d. th~n after
properly describing what is being done. the absolute valu~s dre
set UP and the GKS function to draw the polymarker to be shown i
c':Llled.
*
* Calling Modules: The polymarker menu. fcn_polymmenu.
*
* Modules Called: The OKS primitive module. gpolvmarker.
*
* VDI Functions Called: None.
******************************************************************************
#include <stdio.h>
#include <ctvpe.h>
#define void in'l:
void fcn_pmrkrex()
(
typedef struct
into >::;
in t . (;
(
)
9ltJPO
i nt;
int n._points;
9wpoint points[50];
n._points::::3;
po :i. n t 5 [ 1 ] • >::=0;
PO i n t s [ 1. J • '·,"::::0;
PO i n t 5 [L.'] • ;:..:::., 1. 00;
PO i n t s [~-:-~] •.".,;:-.;: 1. (10;
PO i n t s [::::] • >::::::: 150;
points(3].··,·:;:::50;
9 pol ..( rna r' k e r' ( r I,.. poi n t s • P (, :i. n t ~.~
fen _,.. e a d f i 1 \7! ( " pm,., k,.· \:~ ::-::. d"l t " )
}
);
~
#include <stdio.h>
#includ@ <ctvpe.h>
tvpedef 5t~UCt
(
in t >::;:
i.nt ..... ,
-
v I) i d '3 po) 1 ··... m"=3. r' k e r- ( n ._. P ,) .i. !"I t s .,
i n t n _. P (0 i n t 5 ;
'3wpo:oint points[50];
I" 0:0
i nt s )
(
P r' i rl t f ( " P (, l y me. r' k e r' P 1 (0 t t <2 d t (0 P (I :i n t s (i rl (I r' oj ~"! r') ");
for' (int_.cnt:=l; int ... cnt(=n __ poin"l·s; i.nt ... ,:n17++)
pro i n t f (" I. d , I. d ", P (I i n t 5 [ i n t _. c n t J • >::, P (0 i n t s [ in t ... en t
pr'intf( "\n");
}
] ...", ) ;
Now we see an example of the polvmarker, with the color,
line width, and
graphics screen. This marker was drawn using the polvmarker command as follows
CW:::::> gPO 1 "(mar' ke r' ( n_po i n t
S,
PO i n t
5 )
where n_points is the number of points specified to plot and
points is an arr'av of coordinates containin9 the endpoints of the segments.
<return> to continue
-
1*****************************************************************************
*
**
**
**
**
*
**
*
**
*
*
**
**
*
**
Name: Pol··... ITI<l.'··k\~r· Color· E::-::ampl,:>
Author: Ken Mikeworth
Date Written: February 26,
Si9n-Off Date:
1986
February 26,
1986
Purpose/DescriPtion: To provid~ Rn example of polymarker color settins and
to explain how to use the po1ymarker co10r functions.
T/O D<lta: Standard 110 file, with the proper GKS
pol··'··'TI03.r·k<~r· color· ftJnction.
param~ters
passed to the
General Description: After initia1izin9 the necessary data e1em~nts, a samp1
polymarker is ~r~wn on the graphics screen. A text file is th~n
displayed, explaining the use of the command and the sample.
Call in9 Modu1<i!s: Th<? p0:01··... ma.r·k,::.r· menu modulE',
fcrL.po1·.,.·'TIITi<?rlu.
Modules Called: The marker color module. 9setmarkercolour. and the polymarke
draw module. 9Po1Ymarker.
VDI Functions called: None.
******************************************************************************
#include <stdio.h>
#inc1ude <ctype.h>
#define void int
void fcn_pmrkrc01()
(
i nt
c 0:0 1 (0 r· , r ,_ . P (0 i r, t: s ;
str·uct (
int ::<;
t··{ped\~f
i nt
'0(;
) 9l1JPoint;
91lJP(,int poi.nts[50];
color-=:2;
n .... po i nts:::::::::;
PO i n t s [ 1 ] , >::::::: 1 (>;
points[11.y:;:;:10;
i nt s [::?J. >:::::;200;
PO i n t 5 [ ; : ] • ··,..:::::40;
P(. i nt 5 [:::::1 • ):::::::1.50;
points[:::n. ··,..;;:;:1::;-':0;
9setmarkerco1our(color);
9Po1ymarker(n_points.points);
PO
co 1 oro:!;::::;
n ... p.:, i n t 5::::::::;
PO i n t s [ 1 J • ::{=.: 1 (>;
PO i n t 5 [ 1 ] • ··,··:::40;
PI) i nt 50 [2] • >::=200;
poi n t s [2] •..,..::::: 1 ~O;
PO i n t So [::::] • >::= 120;
points[31.y:::::150;
9setmarkercolour(color);
9Po1ymark0r(n_points,points);
fen _. r· e a oj f i 1 e ( "pm r· k r· c (01 I) r· • d <':l t " ) ;
)
#include <stdio.h>
#include <ctvp@.h>
-
void
9setma~ke~colou~(colo~)
int color';
(
pr·intf(lI po l·.,.·moar·ker· c(",lor' s<?t to color' denoted b··...
ind~",>::
numb\.~r·
jt~d\n",c(llor'
Now we look at
~n
example of a polvmarker where ths color has been set.
order to set the color for a siven polvmarker.
to set th<'!.' colol',
t h ..."
9
th<i,~n
VO~I
must first use
dr'atu ","our' pol "(iTt03,r'k,?r' , Look r.:l.t th<'?
r' a. phi C 5 rr. (I rlit 0 r' • As",' 0
I.J
S
e \-~ • t: h <:if ,,(
"3,
r' <~.' d iff e r' ,2 n t
tl'JO
In
command
th~
ITld,r'ker's dl-'awn on
col (, r' s • T his to;:"
d ,) neb ,,(
<:-
changing the color bv re-executing the color command and lastlY dratuing the
second polvmarker. The command to change the color is as follows:
GKS> gsetmarkercolourCcolor)
where color is an integer giving the desired color as described in the table
for polvmarker colors.
( r' e
-
t
U f'
n>
t
(I
C
I)
n t j n IJ
1*****************************************************************************
*
**
**
**
**
*
**
*
**
*
*
*
**
**
*
*
**
Nam E!: Pol ",'-'Tla r'~: e r' T"'" 1"'~'7!
E::·:·03. rrt P 1 '.~
Author: Ken Mikeworth
Date Written: February 26,
1986
Si9n-Off Date: February 26.
1986
Purpose/Description: To 9 i ve i:'t n e )::;:.i1Tl P 1 <2 of how to set the marker type for' th
P ,) 1 ··,··lTId. r' k'2 rfunction.
1/0 Data:
The type parameters are passed to the called routine,
9setmar'k,'3!r t'",·pe.
General Description: After initializing the variables. the absolute
dat.3. points to b,'3! used in th<.'3! (?::<aiTIpl~'3! al··<.'3! set. th,-?n th,,,: rflar'k<i'!ris drawn, and finally an explanation to the student is
displayed on the screen.
C~11in9
Modules: The Polymarker menu module.
fcn_polymmenu.
Modules Called: The marker color set module. 9setmarkercolour. the polyrnarke
module, 9Polvmarker. and the marker type set module.
9setmarkertype.
VOl Functions Called: None.
******************************************************************************
#include <stdio.h>
#include <ctype.h>
#defin<? void inl:
void fcn_pmrkrtvpe()
{
int tvpe.color,n_points;
t "'" p,'3! de f s t r' u c t f
i. nt ::<;
in t "(;
} s~\.iJP(lint;
9wpoint points[SO];
type==O;
c (t 1 (I f" ::=;:;
n __ points::::3;
PO i n t So [ 1 ] • ):::::: 1 (I;
F' (I i n t s [ 1. J •..,..== 1. 0;
p (, i n t s [2] • >:::;;::200;
P (I i n t s [ ::] • ",.,:::: 4 0 ;
points[::':]. ::<==:1.50;
i n t s [:::::] • ",.,:::: 120;
9setmark2rtype(type);
9setmarkercolour(color);
9Polymarker(n_points,points);
t',{pe:::::::':;
PO
co 1 of·:::.;:3;
rr __ points::::3;
P (I j. n t s [ 1 ] • >:::::::1. (l;
po i rr t s [ 1 ] • ··... =40;
poini.:s[2]. ::{::::200;
P':, i n t s [2] • ",.,= 1S0;
poi.nts[:3J. >::::::1.:?0;
PO i n t 5 [:::::1 ...... =:: ISO;
9setmarkertypeCtype);
~:I
s <2 '( fila r- ~:: <i"~ r- COl
(t
I_I
r-
~
C () I (.
r-
.> :;
9PolYma~ker(n_point~.points);
-F c rL_ r- ~'" oR, d f
)
1
1 <2
( "P IT! r-
k r- t y P~?" d;:l t " ) ;
#in~lude <stdio.h>
.include <ctvpe.h>
void
9setmarkertvp~(tvpe)
int
(
-
t·.,.·p~,?;
Let us now examine the
va~ious
help us to distinguish
lines and make
interesting.
Ag~,in.
ma~ke~
types available.
~eading
to set the marker type
a
for a
Ma~ke~
type can also
graph or desi9n easier and mar,
polymarker,
first
set the
GKS> gsetmarkertypeCtYP2)
tuhe r'e
PO
type
is
~n
integer giving the type as specified in the table for
l'"I"mar"ker' t"I"pe.
After setting the type.
then draw the desired polYmarkers.
<r"~" t 1.1 1"" n=::-
t
(0
C (0 1ft
i n l.h?
I**************~************************************** ******************~*****
*
**
**
**
**
*
**
*
.*
*
*
*
*
**
*
-)i-
Name: Polvmarker Index Example
Author: Ken Mikeworth
Date Written: Februarv 26,
1986
Si9n-Off Date: Februarv 26,
1986
Purpose/Description: To ~ive an example of how to set the index for the
polvmarker function.
I/O Data: The index parameter is passed to the called routine,
9setmarkerindex •
General Description: After initializin9 the variables, the absolute
data points to be used in the example are set. then the marker
is drawn. and finally an explan~tion to the student is
displayed on the screen.
Calling Modules: The Polvmarker menu module.
fcn_polvmmenu.
Modules Called: The mar·V;?r
9s<.:~tma.r·k<2r·ind\.~>::.
*
.* VDI Furlctions Ca 11 ed:
inck. ::< s,::..t module,
~~orl(:"
******************************************************************************
#include (stdio.h>
<ct··... pe. h>
#d::'fin,=.. void int
H:i.rlcll.ld~=..
vo i d f c rl ... PIli 1". k r· i rl df,..::< ( )
(
i n t i n d~:. ::<, r, ... p (, :i n t s ;
t··... pedef str·I.I,:t (
j nt ::<;
i. nt-or";
) 911.IF·oint;
9wpoint points[SO];
i n d{,~r>::=:;-~;
n._points:::::];
poi n t 5 [ 1 J • >:::::: 1. 0;
points[lJ.··... ::;;:10;
PO i nt s [2]. >:::::;200;
points[2].y:::;:40;
PO i n t s [:~: J • >::=: 1.50;
PI) i n t 5 [ :~: ] •..,.. :::;:t. :20;
9setmarker·index(index);
9Polvmarker(n_points,points);
in de >::=.'::.;
n_p(1 i. n t s::::::~::;
PO i n t s [ 1. J • >::'= 1. (I;
pl)ints[lJ.··... :::::40;
PO i n t s [:7:: J • >::==200;
PI) i nts [2] ...,.. ::::1. 50;
points[3J. >::=::1.:"?0;
-
PO
i nts r:3]. ··,··::;;150;
9setmarke r ·index(index);
9Po1vmarke~(n_point5,points);
f c rL. r· e a d f :i 1 e ( " pm r· k r· i n d e ::<. d d. t
}
" );
#include <stdio.h>
#includ@ <ctvpe.h>
void
9setma~ke~index(index)
int
ind'2::<;
c
pr'intf("pol","t1'!;:t,r'ker'
}
-
ind<E:>:: ',;et to
ind-2::<
denot,-~d
b"", nllrnb.?r'
~~d\f'I"I,:i,nd\~>::);
Th~
f
/j
For the polymarker
ind~x
net i
(I
1'1 S •
In f
and is an e"'.5--'"
5
.:1. C
t ,
i tis
8
IS
much the same as the marker type and color
1 i s til'l ":I
I)
f
S -2 v
e r- 0::1_ 1 c
of 5<.."1:tin9 :,?v-2r---,..thin9 t,)
1T1~~,th(od
e t tin <::i s des i r- <2 dar- e l i s t
~'?
(r
mHI (I n
C (i ITI
l:?v<2.,ls,
desir-~",d
din t h <::.0 i n de>:: • L I) 0 kat t h (~
bin .:t t
P
(I
1 -Y- 1'1"1 a
:i_
(I
n 5 (I f
t h (. 5 <2
pr-ovid'2d th<:.'
r- k E.' r- s
(I
rl ttl e
screen. These are in the index, and were set by using the command. as follows:
GKS> 9setmarkerindexCindex)
I~here
index is an integer relating which selection fr-(Im the index is desired a
9iv.",n in
th~7!
table for-
index to the desired
pol--,--mar-k~:.'I--
lev~l
first.
lnd~'?::<.
A:.; in th<2.' othel-- functions,
set
t:h~-2
then draw the desired polYlTlarkers.
<return> to continue
1***************************************************************************
**
.**
**
**
**
**
**
**
**
Name:
Text module
Author:
Ken Mikeworth
Date Wr·ith:.n:
t9:~:(:'
Febr·ua.r···,.. (-.,
Sign-Off Date:
February 27.
Purpose/Des~ription:
To
1986
demonstrate
the
lise
of
text
on
the graphics
s~reen
-jl.*
**
I/O data:
standard
**
**
C;en,~r·81
Aft<.."!r· displa.··,.-j.ng a t:<?:>::t f i ·1<..:' cor,ta.:inin9 th~? menu for·
tl·le te>::t functions. th:.."! d(~s.i.r·<.?d 5-.'!l<~ctj.c.rr is .3.cc<.?pted fr·orfl th,.:!
k~? ..... b 0 Hr· d "'. n d i::I. nap p r· 0 p r· i at t:' 5- b rrr (I d IJ 1 e i s C 8. 1 1 t"! d • T hi'" PI'· (. C <? S S
r·,.~pe03.ts untj 1 t.?r·'Tlir.ated b··... a In<~nl.1 5{:.1<~ctiorr fr·orrr th<.? U5'::' r·,
~.*
.**
**
**
Ca 11 i
**
.~{.~
Modl.ll,?s
**
~.*
.**
**
d<=:5.~r·iption:
I.'
**
**
110 library
rrg
rrrodil 1 ~~S:
1"18. i rr modl.ll e.
co3l·I,~·d:
f.:n ... r·<.."'adfj 1,?- to displa··... te::<t. fcrl._te::<t<?>:: a.5 an ,"::-::ampl,."! of
use. fcrr_fontprec to set the font and precision of the text
to be displayed. fcn_txco1nr to set the color of the text.
f.:rr .... t,?-:>::h9i: +0 s<~.·t th<::. hei9ht of th<..=: t<..:.:>::t. fcn ... t::<plcmnt to 9iv,::.
th<? 03.1 j~lrrmE'rlt of th<.." te::·::t: o3.1""Ol.lfld the point, and t::d.nde:>:: to 5<..:.t
many popular settings easily and with one command.
t~xt
.*~.
** VDI Functions called: none.
*****************************************************************************
#include <s1:dio.h>
#include <ctype.h>
#define void tnt
#define BUFSIZE 81
void
fcrr_textrrrerru()
(
fcn .... T,"'03.dfi 1,,'( "te:>::tmenIJ. datil);
~.' carr f ( "% d ",
gd rr t ...T e s p (. n s,~ ) ;
gei:chF.!.r· ( );
((.lhi 1<.?- (int"_.f·~~sPr)nse 1= :::;:) {
switch (int_response) (
case 1: ·fcn ... r·e;:i.dfi 1 e ("te::·::t"9<.?n. datil); br·<=:03.k;
cas@ 2:fcn_text@x();br@ak;
case 3:fcn_forrt"pr@c();break;
cas@ 4:fcn_t@xcolor();br@ak;
case 5:fcn_i:exhst();break;
case 6:fcn_txplcmnt();br@ak;
cas<=: 7:fcn_txindex(};break;
d ~:. f 03 I. I 1 t : P r· i n t f ( " \ n \ n F' 1 @ a see n t e r· ':::t ya 1 i d
fOI-· (int .... sl<.?,~p:::;: n; int .. sl\~ep <==800;
)
fen .,_ r·,~ a d f ill;" ( " 17 E' >:: t me n 1.1. d at" ) ;
sca.nf ("/~d". ~d nt_..r·esPof"rs@);
9<..=:tchar· ( );
}
}
1 @ C t: i (I fl (1..-::::> \ n " ) ;
int_sleep++) irrt_i=l*l;
<;;,,~
-
******************************************************************************
TEXT t1ENU
*************************************
*************************~
******************************************************************************
Pl<2as<2
f~ntl?r'
th<2 numb<2r'
1)
2)
::;: )
4-)
(.(',!'·r·,,-:.spondj.I"I!':I
G<2n<2ral D~scription
T<2:>:t" E::·::O::l.fIIP 1 <2
T <,;:. >:: t F (I n t ~;
T<~>:t
Co 1 Cor'
HI?i!':lht
(:.) Wor·k Plac<2rrl<2nt
S)
T<2:>1:
7)
T",-:.::<t
8)
E~it
I nd<2>::
this m<2nu
"(our'
chI) i c,?·?
to ··... our· .:::hojc,:.:
Text can Ilelp ma.ke graphs easier to understand by labeling the graph.
the data,
and the points.
It can also t,elp in graphics design to increase
viewer understanding and comprehension and to enhance the overall
of the desisn.
Fancy title pages for reports can be 8enerated
10sin9 the necessary information.
useful
Now,
Therefore.
text
look at a
~Iithout
is a significant and
part of usins graphics.
Let~s
~uality
few examples and see how this works ••••
<ret> to continue
1***************************************************** ************************
*
*
-
.*
*
Name: Text Example
Autho~:
.* Date
Ken
Mikewo~th
W~itten:
Feb~uarv
26.
1986
*
*
*
.*
*
*
*
*
.~.
liD Data:
Gene~al
*
*
*
*.*
The sta~tin9 point and the string to be printed is passed to the
c8lled GKS function.
Description: The proper variables are initialized, then afte~
tl't,~ 03.bsolute va.lues ar'e set UP and th<.~ e,K:::; fl.fnction to dr',::!!!)
ttte te>::t to be sho')lLln is C03llt~d, a te::<t fj.le is di!'.,pl.:a,··... (':!d to
explain about text and clarify the example.
Calli n 9 Mod u 1 <i:~ S
:
The t e >:' t men u ,
fen _. t e >:: t rn e n 1..1 •
*
* Modules Called: The GKS primitive module, gtext.
*
* VDI Functions Called: None.
******************************************************************************
#include <stdio.h>
#include <ctvpe.h>
#dt"fine \/oj.d int
void fcn_textexl)
(
tvpedef
st~uct
(
int ::<;
:i. nt . ,..;
} 9lL!Point;
cha.r· stn9[25(:.]="This i.:. an <.o->::arrrple
9wpoint position;
it i on. ::<:::;50;
pas i t i on. ··... =:50;
9text(position,stns);
fen ... r' ,~ a d f:i 1 e ( " t ,:;0 >:: t e ::<. d at" ) ;
POS
}
oi:
te::<t
I";
#include (stdio.h>
#include (ctvpe.h>
tvpedef struct
int x;
(
lnt v;
) 9wpoint;
void 9text(position,stng)
char stng[J;
9wpoint position;
(
printf("text
)
~%5~
displayed at position %d,%d\n",stn9,position.x,position
Now we see an example of text.
the t
t~ ::<
t
c
(I 1ft IT!
and a. 5
f
0
1 1 (I III S
with most of the fedtures at their default
:
OKS> stext(position.strins)
where position is a
of the text
point denotins the location of the
lower left hand edse
(unless set otherwise by the align command) and string is
an array of characters containins the str-ing to be printed.
<return> to continue
1*****************************************************************************
*
,-
NaiTle: Te>::t Fe'I'lt "3_nd
Pr·~~ci<=.i(lrl
E::<"3rrtp1~~
*
* Author: Ken Mikeworth
*
* Date Written: February
*
.**
*
-ll'
.Il-
Sign-Off
Date~
1986
February 27.
1986
Purpose/Description: To provide ~n example to the tutorial
f0nts and precision control.
* rio Da.ta: The f')rd: and
*
*
?7.
thi~
pr~"!cj.sion
"31"<2
F-'''3.ss~,:,d
to
th,~
vi~wer
ca.ll~"!d
of text
CW:::;:; function.
9settextfontprec.
.Il-
*
*
*
General
The proper variables are initialized. then after
the absolute values are set UP and the GKS function to set
the text font and precision is called. a text file is displayed
explaining the use nf text font and the example.
Descr~ption:
.Il-
*
*
* Modules C:a11e.:1: The 13K:::; pr·iITIitiv·;~ module. 9s~"!th:~>::tfl)ntpr·<2c.
*
* VDI Functions C:al1~"!d: None.
******************************************************************************
#include <stdio.h>
#include <ctype.h>
#d''"fine void int
void fcn_fontprec()
(
t'Y'pedef sti'UCt
(
char' fOI'lt;
char' pr'<2C;
)
typedef str'uct
int ::<;
9t>::t:p~
(
in I: ..(;
} 9wpoint;
9wpoint position;
char· stng[256]::::IIThis is an e::<aITIPle of te::·::t
gt::-::fp fp;
po sit i (I n. >::::::50;
pos i t i on. · ... :::50;
fp. i:ont:::::··-::::···;
fp. pr'<2c::::"'4"';
gsettextfontprecCfp);
gtext(position.stng);
f c n ._.. r' e a d f i 1 ~~, ( " f (I n t p r' E.' c • d ~t t " ) ;
}
~";
#include <stdio.h>
#incll.lde <ct··,..p{~. h>
-
t""'ped(~
f
s t r'ue t
(
char' f:ont;
.-::h.a.r· pr'ec;
)
9U.1fp;
void 9settextfontprec(fp)
9wfp fp;
(
)
Now we see an example of text font and precision control.
shown on the graphics
command as foll
scr~en.
Look at the text
This was done using the text font and precision
(IWS:
OKS> 9settextfontprec(fp)
where fp is a structure containing the char types of font and prec.
integer
~5
given in the
t~ble
Font is an
for text font selections and precision is
( r' e t
1.1
r' rr>
t
(I
con t :i.
~n
fr Ij ~~
1*****************************************************************************
*
**
**
**
**
-ll.*
*
*
**
*
*
*
**
**
**
Name: Text
Autho~:
Dat@
Colo~
K@n
Example
Mikewo~th
W~itten:
Sien-Off Date:
Feb~uarv
Februa~v
Pu~pose/Description:
C (.
1/0 Data:
27,
27.
1986
1986
To provide an example to the tutorial viewer of text
1 I) r· •
The color to be printed is passed to the called OKS function,
9settextcolour.
General Description: The proper variables are initialized, then after
the absolut~"! values d.r·~~ set UP and thl'? 13K:::;; fl.ln,:t·iorl to S(~t
t /·1 e color· i 5 C d. 1 1 \? d • ate ::< t f i 1 e i s d:i So P 1 ':'f. ..,.. e d e ::< f" 1 <:I. 1. n j n '3 t h \?
e>::03.mplf:! and th~"! ov~:!r·;:l.ll IJse of the.? tl?:>::t col ('r· fIJI·let-ion,
Callin'3 Modules: The text menu.
fcn_textmenu.
Modules Called: The GKS primitive module, 9settextcolour.
VDI Functions Called: None.
***********-ll******************************************************************
#include <stdio.h)
#include <ctvpe.h)
#define void int
void fcn_texcolor()
(
tvpedef struct
int ::-::;
:i. n -j-
(
..... ;
9wpoint position;
char· stn9[256J::::"This is
int color·;
~.n
e>::ampl,::. of T{"!>::t
i t :i. (I n. >:::::50;
po!;,; i t:i. on. · ... :;;:50;
c: .) 1 (I r·:::4 ;
9settextc:olour(color);
etext(position,si:n9);
f c: n_. r· e a d i: i 1 f:! ( " t e >:: C (I 1 I) r· • d a t " ) ;
PO 5
}
III;
#include <stdio.h>
# J. n c 1 1.1 de <: I: t ..... P~".' • h>
v
(I
:i d
'3 ~; e
int
t t e ::< t c () 1 (0 1.1 r' ( 0::: (I 1 (I r' )
CI)l')I';
<:
P
}
r' i n t f (
"t f-: ):: 1""
C
(I
1 (r r'
c:.; ,"
t"
t: (". t· h·;.;:
C
I)
1 (I r'
den (I t
~o'
d
to ..... %d \ n " , c (c 1 (I r' ) ;
Now we s@e an example of text color.
screen.
look at the text shown on the
This was done using the text color
~0mmand
gr~phi~s
as follows:
GKS> 9settextcolourCcolor)
where rolor is
~n
integer denoting the desired color sccordin9 to the table fo
text color.
<return> to continue
1*****************************************************************************
*
**
**
**
**
*
*
*
**
Name: Text Height Example
Author: Ken Mikeworth
D'3.t~'?
Wr·i tt<.."!n:' F\'?br-u03,r---,-- :?7,
j.';':;:::6
Si9n-Off D'3,te:: Febr'l.Iar--'( 27,
1,':;:'86
PurposelDescription: To provide '3n example to the tutorial viewer of text
h~i9ht control.
-~
-ll.
*
*
*.~
1/0 Data:
The text hei9ht as a f1o'3tin9 number is passed to the called GKS
fun c t i (. n , 9 5,'? t c h a r' h \"! i 9 h t .
Ci,'?n,":r-a 1 Description: The proper variables are initialized, then after
tl-,,'? absolut\;, values ar',,? s\~t up, th,'? OK:;::; flJnction to dr-.:;lw th<? te:;.::
to be shown is called. A text file 9iving the description of tex
height control an~ an explanation of the example is displayed.
Ca.11 in9
Modul<i~s:
The t<..:.:;.::t n',enu,
fcn_ . te::-::tm\"!r,u.
OJ}
*
**
Modules Called: The GKS primitive module. 9setcharhei9ht.
VDI Functions Called: None.
******************************************************************************
#incllJde <stdia.h>
#include <ctvpe.h>
#~efine void int
void fcn_texh9t()
(
tvpedef struct
(
in'l- y;
)
char- stngr:?5.1:,]="Thi
9wpoint position;
float: h,;>:i.9hi:;
91A1 P (,
s
:i.'7-
i nt ;
;~,n
hei9ht=::?O;
pas i t ion. ::-:::::50;
pos i t i on. '·,":=50;
9setcharheight(hei9ht);
9 t \"1 >:: t ( PI) S i l' i I) n • !:' t n 9 ) ;
fen ._. r' e a d f i 1 e ( " t e >:: h 9 ~: • oJ;,:1, t: 11
)
-
) ~
:":':-::a.IT,pl,,?
oi:
I:e::<t
111;
#include <stdio.h>
#include <ctvpe.h>
void 9setcharhei9ht(heisht)
flo03.t ht"!isht;
{
P
}
r· i n t f ( " t e >:: the i
9
rd.·
5
et
t
(I
I. f \ nil,
h~:.
i
9
ht ) ;
Now
~e
s~reen.
see an example of text hei3ht.
I.. oak at the text shown on the graphics
This was done using the text height command as follows:
GKS> 9settexthei9htChei9ht)
where height
table for
is a
floating number denoting the desired Ileight according to the
text hei9ht.
<return> to continue
/*****************************************************************************
*
**
Name: Text Placement Example
Autho~:
Ken
M~keworth
iI·
*
**
**
*
**
*
**
*
*
*
**
**
**
Date Writtan: February 27.
1986
Sign-Off Date: February 27,
1986
Purpose/Description: To provide
placement control.
~n
example to
th~
tutorial viewer of text
I/O Data: The text placement as an enumerated data type is passed to the
called OKS function, gsettextalisn.
Oene~al
Descr1ption: Th~ proper variables are initialized, then after
the absolute values are set up, the OKS function to set the text
alignment is called. A text file givins th~ description of text
placement and an explanation of the example is displayed.
(:811 ins
Moduli~"'.:
Th~.'
te:>::t menu,
·J:Cfl .... ti'::·::trn~-:'I""I.
Moduli'S Called: The GKS primitive module, 9settextalisn.
VDI Functions Called: None.
******************************************************************************
#includi' <stdto.h)
#include <ctype.h)
#d\".-:.fine void int
vo i d i:c rl... t::<p 1 crnr,t ( )
(
(
typed<..":' f e r,UIT,
TV_NORMAL.,
TV . _TC)P,
T\) ... CAP,
TV .... HALF ,
T'.')._ BA:;::;E ,
TV_BOTTOM ) stxver;
(
t"I"p<?d,,?f enUIT,
Tl-L.NC)RMAL ,
TH .... LEFT,
TH_ .. C:ENTRE,
TH_RIGHT
) gtxhor;
t··... pedef str'uct
gt::-::hor' hor';
st:>::ver' v<..,,:,r·;
(
)
t .....·p,,? de f s t r' IJ c t
sb·::a 1 i sn;
(
i nt ::<;
int y;
-
)
SI!' P (I i n t ;
cha.r· stns[2561:::"This is an e::<ampl,::. of te::<t''';
swpoir,t pos iti(ln;
st::·::al ign 03.1 isn;
alisfI.hor=TH_.NQRMAL;
align.ver=TV_TOP;
p CI 5 i 17 i (I n • )::::. 5 (> ;
PI) S i. t: ion. ',(:::50;
9se t textalign(alisn);
s17ext(position,stng);
{:cn ... r·~a.dt~i L:.:'( "17::<pl cmnt. datil);
#include (stdio.h>
#includ@ (ctvpe.h>
#define void int
t·.,.·p,,? de f
e num
(
TV _.. NORMAI..,
T\/ .._TOP,
T',i_CAP,
Tl..,I .... HALF,
T'. .,!, •. BA::::;E,
TV_.BOTTOM
t··(P.,? de f·,,! n tilT'
Tl-LNORMAL ,
Tl-L.LEFT,
TI-LCENTRE,
TH_RIGHT
typ~=:def
)
c;1 t >::V~:;· r' ;
(
) 9txhor;
str'uct
9 t· >:: h r) 1'" h (0 r' ;
<3 t ::·::v€' r' v€' r' ;
(
)
typedef str'uct
i rt t >::;
<3t::·::03.1i9f1;
(
int . (;
<3l1JPoint;
)
void 9sett@xtali9nCali9n)
<3 t >::a 1 i <3 n ali 9 n ;
(
c:1t:>::hor'
ah;
<3t::<v~'?r'
;.;tv;
a h =03. 1 i <3 n • tH' r' ;
"i V=03. 1 i <3 rl • v~,~ r' ;
P r' i n t f ( " t e :>:: t s ~;;, t
)
.-
t
(0
",I.
1i
<:;I
n
h (0 r' ::::
..' %d"',
v
@
r· ==
..' %d'" \ n " ,
;:,j
h,
.:l
V) ;
Now LIIE!
S~"'E!
an e>::aITlPle of te::<t pla.cE!ITI·2nt. I._ook .3t th,"!
tt~::·::t
shollJf"I on the 9r'aphic
screen. This was done using th@ text align command as follows:
Hor consists of TH_NORMAL, TH_LEFT. TH_CENTRE. and TH_RIGHT.
V{f:r' consists (If TV._NORt1AL., TV_.TCW, TV ... CAP, TV __ HALF, TV_BASE. ;;I.nd TV .... f;OTTCWI.
ThE! align entry tells how thE! text will
be position{f:d around the point
specified in th0 text command. Be 5Ur{f: to align the text before printing it.
(r@turn> to continue
-
1*****************************************************************************
*
*
*
**
**
*
**
Name: Text Index Example
.~
Autho~:
Ken
Mikewo~th
-jl.
Date
W~itten:
27.
1986
Sisn-Off Dat@: Februarv 27.
To
ind,':!>:: 1..15<2.
Purpose/Desc~iption:
1/0 Data:
General
1986
p~ovide
an example to the
tllto~ial
viewer of text
The text inteser as an inteser is passed to the called GKS
f 1.1 net ion, '3 5 <~ t t \~ ::< tin d ,~::-:: •
-jl.
**
*
*
*
*
**
**
Feb~ua~v
The proper variables a~e initialized. then after
the absolljt<.~ valu,::.s ;:3. r' ,,? s,-:"t up, 17hl'? CiK~::; fl.lncti.on to set th·"" i.nde
is called. A text file sivins the description of text index use
arid a.n e::<planati(lrl of th,'? <?>::;~.mFl<2 is disp18.··... ed.
Desc~iption:
{l.
Callins Modules: The text menu.
fcn_textmenu.
Modules Called: The CiKS primitive module.
s5ettextind~x.
VDI Functions Called: None.
******************************************************************************
# inc 1 1.1 d,~ <: s t d i <) • h:::#include <:ctvpe.h>
#define void int
void fcn_txindexC)
(
tvpedef
~tr'uct
(
int ::<;
i 1'1 t ..... ;
)
s UJ p (I i
char' stns(:?5(~.]:::::IIThis :i.S
swpoint position;
i n t i n d ,,,! >:' ;
i
1'1
t;
art
e:':;:lrrtpl,"! (If
nde::-::::::;~~;
PO
sit i
I)
n • ::<:::50;
sit :i. 0 n • "1,'::'50;
ssettextindexCindex);
stext(position.stns);
fcn._.r·,"!adf.i.l,~( "t::-::ind<.."!>::. d;:l.t":>;
PO
}
t\'?>::tlll~
#incll.ldf:~
<stdi.o.h>
#incll.ld."! <.:t··... P~~. h>
-
void
9 S
('1
int
t t (? >:: til"l.:1 ~~ ::< ( i n de. >:: )
:lnd~"!>::;
(
pr'intf("t~"!}::t
)
-
indt"!::< set
to
v;:'lllJ~~s
d<2rtot,":!d b'.,.'
~'::d\n",irtde>::);
The index
Tn fact.
fo~
it is
the text index is much the same as the
~
listing of several
othe~
functions.
common combinations of these
settings desired are listed in the index. l.ook at the text on the
GKS> 9sett@xtindex(index)
v)
her' e i n de>:: i!':'.
':l n
j.
n t e g e r' r' '''' 1 a tin c;l
given in the table for
to the desired level
te~t
fi~st.
u)
hi ch
5
e 1 e r:: t i
(I
r, f r' 0 rrr the :i n d 'E.' ::< i
index. As in the other functions.
5
oJ (" 5 i r' ,:. .: I
set the index
then display the desired text.
<return> to continue
.::l.
1****************************************************************************
*
*.*
*
.*
*
.li*
*
*
.!**
*
*
*
*
MAIN MODULE FOR THE FUNCTIONS OPEN AND CLOSE WORKSTATION
-R'
BY
V I ~K:ENT PEDRA ZA
*-l!'
DATE WRITTEN
4 _. 10 .,. :::5
1i.
::;IGN-OFF Date
February 27,
WRITTEN
1986
PURPC)SE
The purpose of this module is to present the
user with several options for the use of some OKS
primitives. such as OPEN_WS and CLOSE_WSw
INPUTS
This program uses as inputs numhers from the
keyboard. The valid inputs to the program are ones
requested by the menu driver (1-3).
The program
also uses external files to read the re9uired
option information.
*
-jl.
.li-
*
The outputs of thjs program are the text
that is stored in the external files and the data
passed to the OKS routines as arguments.
OUTPI.JT:::;
*
*
*
*
**
*
*
**
*
*
-l!'
*
**
*
*
.~.
*
*
*
*
*·Il·
*
.*
*.li**.
.;t.
The pr09ram first displays a menu giving
the user several options. Some of these options
include the explanation of several GKS primitjves
The program opens external files and reads their
information. This program does its own error
checking and recovery.
DESCRJPTION
CALLING MODUL.ES
This module will be called by the main prog r' am. T his mod 1.1 1 e ttJ ill not r' i'.' t 1.1 r' n va. 1 1./ (~ s t o t he
main menu driver •
MODUL.ES CALLED
This program calls the fcn_readfile module
to open. read and display the re9uired file.
;}
·lio
*
*
*.li*
**
*
ij.
**
*
-jl.
VDI FUNCTIONS
*
NC)NE.
****************************************************************************1
#include <stdio.h>
#include <ctype.h>
#define void int
#define BUFSIZE 81
void fcn_wsmenu()
(
int int_response=O;
fen .. r'eadf i 1 e ( "IJJSmenu. da t" );
~d n t." r' e s po n 5 (:;,. ) ;
getchar' ( );
whileCint_.response 1= 4) I.r
switchCint_response)
1*
s can f ( "I. d " ,
GET USER RESPONSE
*1
(
fen .... rea. d f :i. 1 f.~ C
II
cas e 2
C <3. S
e
:::::
f c rL. r' e;;i. d f i 1 <? (
i: en ... r' e <3 d f i 1 ,:;,. (
lollS 9 ,:;,.
P \~ n III S •
C
1 (I S ~ ttl S
11
defa.ult: pl.1tS("
Pl~!as\"!
1
1* END SWITCH *1
fcn._.I'·e<ldfi le( "I.JJsIT,,:;,.nIJ. d.3.t");
'.; C 03 n f C"'% d II 1 g~ i n l. _I" I? 5 F' (11"1 S ~~ ) ;
BE't.:::ha,-· ( );
______ )
___ L*F,I'\j[,1 WH I I.E LOOP * 1
n. d a t
II (.
f(lak(:;,.
/*
1/ ) ; b r' e a k ;
d 03. t i l ) ; b j"' e <3. k ;
• d a t i l ) ; b r' e a k ;
a v.:llj.j sel(:;,.ction
GET I. I:~;ER RESPON:::;F.
(1-4)\n");
*1
******************************************************************************
WORK STATION MENU
*********************
*************************~********
******************************************************************************
Please
@nt@~
the nunlber
1)
Gene~al
co~re5Pondin~
D@scription
2) Opening a Workstatjon
Closing a Workstation
4) Exit this menu
3)
your choice?
to
you~
choice:
The system IJS@S the
tinH? ··... ou
us@
a
1.15·,~
C 0 I.J I-~
1 <'"
th,,~
I) {:
work5t~tion
s··,··st,::-rrt.
11.1 (I
number to send and rec0iv@ messages to a
B,-"Cd.IJS'2 of lh,'? applica.tion on
r' k s tat :i. c, n
n 1.1 ffI b \~ r' S
th<~
Inl·:~'l,
n,-~@d
•
<r~t>
-
WI'?
to continl.J@
onl··...
*****************************************************************************
**
**
OPEN WORKSTATION
*****************************************************************************
mitives,
YOU
must open a workstation. After
YOU
have opened a
<return> to continue
The OPEN WORKSTATION primitive commands the OKS
t h <~
"l P P
r- (I p r- i ate d E! vic <..::. d r- i
;'.In--..-
(If
th<'? following:
V'2
r-.
Th i
<;
SI
r- oct phi
C5
to load
5yst~m
d e v :i_ c <.."!
C 0 1.1
1 db . ::..
GRAPHICS MONITOR
GRAPI-H c:::; TABLET
GRAPHICS JOYSTICK
GRAPHICS LIGHTPEN
<return> to continue
A particular WORKSTATION is selected by sending the appropriate
WORKSTATION number to the OPEN_WS primitive.
CALLING SEQUENCE
-
int
tLfs ____
no,
OUTPUT
T his
fun c
t i
(I
n
r- <2 t u r- n s a
Z <2
r- (I
«(»
i f
the
l!J (I
r- k 5 t
03_ t
i
(I
n
II I 03_
5
SUI: C ~~ S
sf
1.1
1 '1 ..(
(I
P ""
n <:> d •
It,..· <:3.' i: I J ,.. n
'1
_.,:1.
:i. f
t h <2 Iv 0 r' k s
t 03. t i
i)
n
regu@sted was not opened.
<: [', @ t
-
u ['. n :>
t
(i
C
I)
nt i
DEFAULT VALUES OF WORKSTATION
l.u r)
r' k s t a i': i
(I
n wit h t h t:>
i: (I
1 1 (I win 9
LINE TYPE
_..
LINt=:: COL.()R
d <? f
'=11 J
1t
V;,;l,
1 IJ <2 S
•
:1.
::a]LID LINE
-
1
DAR~:::
MARKER TYPE
--
:i
::;::TAR
MARKER CelLOR
--
1
[lAR~:::
TEXT FONT
-
:l
PL.AIN
TEXT Cr:::rLOR
..-
l
DARK
(r'et ur'n>
to continu<.:>
fJ 1.1 \':'
After your work is complete,
users of the system after
-
do this,
··... ou on1··... ne<2d to
YOU
must close the workstation
YOU
50
may use that workstation number.
iS51.lf~
that
To
the,? comm.3.nd:
One ,"::! t his s t e p h a. 5 be <2 rl d ,) rl e , . ,. () 1.1
'::1. r·
e f r· \~ e -t- () 1 I) 9
()
f f t: h e
Ci~::: ::=.;
s ..... s t: em"
<ret> to continue
-
BIBLIOGRAPHY
[1]
Standard
for
the Functional
American National
the
Programmer's
Hierarchical
Specification
of
Standard (PHIGS).
(ANSI/X3H3,
Interactive Graphics
Washington, DC). 1985.
[2]
American National Standard Graphical Kernel System
(proposed draft). (ANSI/X3H3, Washington DC). 1984.
[3]
GKS Language Bindings: Ada, Pascal,
Washington DC). November 15, 1984.
[4]
GKS
3D Extensions.
November 16, 1984.
(ANSI/X3H3,
[5]
"Letters to the Editor".
Applications. May 1986.
IEEE
[6]
"Realization and Application of an Intelligent GKS
Workstation". IEEE Computer Graphics and Applications.
May 1986.
[7 ]
"The Professional Workstation Research Project". IEEE
Computer Graphics and Applications. May 1986.
----
[8]
Enderle, G., Kansy, K., and Pfaff, G. computer Graphics
Programming: GKS - The Graphics Standard. (SpringerVerlag, Berlin). 1984.
[9 ]
Hopgood, F.R.A., et al. Introduction to the Graphical
Kernel System -G.K.S.-. (Academic Press, Inc., London).
1983.
[10]
Intel. iRMX86 Operating System
(Intel Corp., Santa Clara, CAl.
C. (ANSI/X3H3,
Washington DC).
computer
Graphics and
Manuals
release 6.
[11] Intel. iVDI 720 Graphics Software Reference Manual.
(Intel Corp., Santa Clara, CAl. 1983.
[12]
-
Kernighan,
Brian W.,
Ritchie, Dennis M. The C
Programming Language. (Prentice-Hall, Englewood Cliffs,
New Jersey).
c 1978.
Download